For the most in-depth resource on running a relay, see the Relay Setup Guide.

  • Do not use the packages in Ubuntu's repositories. They are not reliably updated. If you use them, you will miss important stability and security fixes.
  • Determine your Ubuntu version by running the following command:
     $ lsb_release -c
  • As root, add the following lines to /etc/apt/sources.list. Replace 'version' with the version you found in the previous step:
     $ deb https://deb.torproject.org/torproject.org version main
     $ deb-src https://deb.torproject.org/torproject.org version main
  • Add the gpg key used to sign the packages by running the following commands:
     $ curl https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | sudo apt-key add -
  • Run the following commands to install tor and check its signatures:
     $ sudo apt-get update
     $ sudo apt-get install tor deb.torproject.org-keyring

No. If law enforcement becomes interested in traffic from your exit relay, it's possible that officers will seize your computer. For that reason, it's best not to run your exit relay in your home or using your home internet connection.

Instead, consider running your exit relay in a commercial facility that is supportive of Tor. Have a separate IP address for your exit relay, and don't route your own traffic through it. Of course, you should avoid keeping any sensitive or personal information on the computer hosting your exit relay.