Version 2 (modified by cypherpunks, 4 years ago) (diff)


Building Command-Line Tor on macOS

Pre-Packaged Alternatives

Go to to install a pre-built Tor Browser on macOS, including a recent command-line tor.

Go to to install a command-line tor binary, or build it from source. The current MacPorts version of tor is

Obtaining a Recent OpenSSL

The included OpenSSL 0.9.8 on macOS is too old to build tor. You need at least OpenSSL 1.0.

Build or install the x86_64 architecture of OpenSSL's stable or developer version:

Installing Pre-Built Binaries

  1. Use the instructions at to install MacPorts, but don't install tor
  2. Run: port install openssl

This installs the OpenSSL libraries (currently 1.0.2k)

Building Stable OpenSSL

  1. Go to
  2. Download the latest stable OpenSSL tarball, currently 1.0.2a
  3. Go to the Building OpenSSL from Source instructions below

Building Development OpenSSL

  1. Go to
  2. Clone the latest development version of OpenSSL using git
  3. Go to the Building OpenSSL from Source instructions below

Building OpenSSL from Source

  1. Run: ./Configure --prefix=/usr/local/ssl darwin64-x86_64-cc
  2. Run: make depend
  3. Run: make
  4. Run: make test # Ignore any gost failures in make test
  5. Run: sudo make install

Building Tor

Obtain Tor source code

Download a tor source tarball from


Clone the tor git repository from and checkout a stable or unstable branch

Configure and Build Tor

  1. Run: configure --prefix=/usr/local/tor --with-openssl-dir=/usr/local/ssl
  2. Run: make
  3. Run: make check
  4. Run: sudo make install

You should now have a working tor installation in /usr/local/tor

Running Tor

See to run Tor under launchd.