The Tor relay adventure. The relays are the backbone of the Tor network. You can get a Tor t-shirt for contributing to the Tor project.

Nyx

πŸ“œ Introduction

This article is about my adventure with Tor relay. The Tor network relies on volunteers to donate bandwidth. The more people who run relays, the better the Tor network will be.

The Tor project can reward you by giving you a t-shirt for free by running the Tor relay or contributing in a different way.

πŸ”Ž Choosing a type of relay

If you run the middle/guard relay, you don’t have to worry that Interpol will kick down your door. Running the exit relay might have some implications.

πŸ” Choosing a hosting provider

You can run the relay from your home, or you can choose a hosting provider for your VPS. I have chosen to run it from a hosting provider.

My requirements for choosing the hosting provider was:

The LowEndBox website helped me find the hosting provider matching all requirements.

βš™οΈ Setup Tor relay

To connect to the VPS I created a new pair of SSH keys with the command ssh-keygen -t ed25519 -C tor -f "$HOME/.ssh/tor"}.

To copy a new public key to the server I used the command cat ~/.ssh/tor.pub | ssh root@vps_public_ipv4 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys".

Then I enabled SSH key-based authentication by changing the configuration to PasswordAuthentication no in the sshd config /etc/ssh/sshd_config and restarted sshd with the command systemctl restart sshd.

To set up the Tor relay a followed the automatic updates tutorial (Ubuntu/Debian), the official technical setup tutorial (Ubuntu/Debian) and the post-install article.

You can inspire by my Tor relay configuration /etc/tor/torrc:

SOCKSPort 0
ORPort 443
ORPort [vps_public_ipv6]:443  # Change vps_public_ipv6 with your VPS public IPv6
Nickname myNiceRelay          # Change "myNiceRelay" to something you like
ContactInfo your@e-mail       # Write your e-mail and read notice below
ExitRelay 0
Address vps_public_ipv4       # Change vps_public_ipv4 with your VPS public IPv4
MetricsPort 127.0.0.1:9035
MetricsPortPolicy accept 127.0.0.1

I recommend you create a new e-mail address. You will get a lot of spam e-mails from bots. To minimize spam I recommend you obfuscate an e-mail address (“your [at] e-mail [dot] com”).

With this configuration you can monitor the Tor traffic via nyx tool.

Lastly, I performed some basic hardening of VPS.

πŸ‘• T-shirt

After 2 months you can request the Tor t-shirt and the Tor project will send you one for free.

⚠️ Depending on your home country the custom-house can charge tax from you even if the t-shirt is sent as a gift.

Stickers T-shirt