APT 96

About Me Server Info Projects Blog Gallery OSINT Tools RSS Feed

Set Up A Tor Relay In 5 Minutes

In this guide we will set up a Tor relay using the website tor-relay.co.

  1. Prerequisites
  2. Getting Your Relay Configuration File
  3. Deploying your configuration file to the server
  4. View your relay in action

1 Prerequisites

All you will need is a fresh VPS running Debian 10 (Buster). You can create one on Digital Ocean, Hetzner or any other cloud provider. Once you have created your server log in and update it by using the command

sudo apt-get update

2 Getting your relay configuration file

Go to the website tor-relay.co and scroll down until you reach the section marked configuration. We will configure our relay in the following way.

  • Tor Node Type - We will chose “Relay”. This means your relay will only ever be the first or second hop in a Tor circuit. This is generally seen as the safest option to contribute to the network, as you won’t have to deal with any abuse reports like Exit relay operators

  • Relay Name/Contact Info - Give your relay a name and include an email address so you can be contacted if there is a problem with your relay. I would recommend not using your main email address, as you may receive a lot of spam

  • Enable statistics - Optional. If you tick this box, it will allow tor-relay.co to count your relays statistics in their global statistics panel

  • Enable IPv6 support - Optional. If you tick this box, IPv6 will be enabled on your relay if your provider supports it

  • Enable unattended upgrades - Optional. If you tick this box, it will keep your Tor relay up to date automatically.

  • Leave ORort and DirPort as they are

  • Total (Up + Down) monthly traffic limit - If your VPS imposes a monthly limit on traffic, you can set it here. Otherwise leave empty for no limit

  • Maximum bandwidth (empty for no limit) - If your VPS limits your bandwidth you can set the maximum here. Otherwise leave empty for no limit.

  • Tick the box “Enable monitoring through Nyx”. This will allow you to see your relay traffic in a visual interface.

  • Click “Generate Config”

3 Deploying your configuration file to the server

On the website you should now see an output that looks something like this

curl https://tor-relay.co/nf/33fb63bdce1aafdf076db5ee694edf5a.sh | bash

It will not be exactly the same as the one above but it will look similar. Copy the command that you see on the tor-relay website and run it in your VPS. It will fetch the configuration file and begin setting up your relay. The process will only take a minute or so.

If everything has gone well, your relay will now display something like this

Tor will now check if your ports are reachable. This may take up to 20 minutes.
Check /var/log/tor/notices.log for an entry like:
"Self-testing indicates your ORPort is reachable from the outside. Excellent."

Congratulations! Your server is now running a Tor relay helping thousands of people across the world.

4 View your relay in action

If you checked the box “Enable monitoring through Nyx” you can now run the following command to view your relay in action

sudo -u debian-tor nyx

It should look something like this