Comment on page
🧅

Installing and Configuring your Onion Router Relay

This is Part 3 of the ATOR Relay Education Series.
Hello and welcome to Part 3 in the ATOR Relay Education Series! In the last tutorial, we learned how to install Fedora, a linux based distribution, onto our Virtual Machine preparing our environment for the configuration of our onion router relays!
Onion routing is a technique for anonymous communication over a computer network. In an onion network, messages are encapsulated in layers of encryption. The encrypted data is transmitted through a series of network nodes called "onion routers," each of which "peels" away a single layer, revealing the data's next destination.
For a more detailed guide, there will be a YouTube link at the end of this article, as well as a link to the ATOR discord server where the team, or other relay operators will be happy to assist you if you run into any issues!
═════════════
This tutorial requires connection to the internet, a machine with at least 25GB of free storage and 1GB of memory, as well as a virtual machine with Fedora installed on it. All tutorials are done on a Windows machine running Windows 10 operating system, however, the software is available on most operating systems including Windows, MacOS, and Linux.
An imagined image of an ATOR node
═════════════

Step 1: Load Up Fedora OS

Start by opening up Virtual Box virtual machine and highlighting your Fedora OS and clicking the start button.
═════════════

Step 2: Opening Terminal

Open the Terminal application from your dock or search bar. Once you have opened Terminal, type the command sudo -i and follow the password prompt in order to acquire root privilege’s.
═════════════

Step 3: Bi-Directional Functionality

In order to be able to copy and paste outside information into your virtual machine, click on Devices in the menu bar followed by Shared Clipboard, and then click to choose Bi-Directional”.
═════════════

Step 4: Onion Router Configuration

Open up your browser and go to (https://community.torproject.org/relay/setup/guard/fedora/ ) This is your step by step ToR installation guide.
a) Enable Automatic Software Updates
In terminal use these commands in this order to update our OS:
dnf install dnf-automatic
systemctl enable --now dnf-automatic-install.timer
b) Configure Tor Project’s Repository
Start by typing in this command:
sudo nano /etc/yum.repos.d/Tor.repo
After, copy and paste this exact text line into the file:
[tor]
name=Tor for Fedora $releasever - $basearch
baseurl=https://rpm.torproject.org/fedora/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=https://rpm.torproject.org/fedora/public_gpg.key
cost=100
Finish by typing “CTRL-X” followed by typing “Y” and then pressing enter.
c) Package installation
Install the tor package:
dnf install tor
Follow the “y/n” until the package has been installed.
d) Configuration file
Put the configuration file in place by using the following command:
sudo nano /etc/tor/torrc
Once you have the configuration file open, take a moment to read through it. Any lines with ## are commented out and meant to be instructions or comments within the file. Any lines with a single # are lines of code that are inactive until the # has been removed.
When you are ready, make these changes to the file by removing the # and editing them as follows:
Change “myNiceRelay” to something you like:
#Nickname myNiceRelay
Write your e-mail and be aware it will be published:
#ContactInfo name <[email protected]>
Remove the # from these lines to make the code active.
#Log Notice File /var/log/tor/notices.log
#DataDirectory /var/lib/tor
Remove the # from these lines, and change the values (if different from below) to match these:
#ORPort 9001
#SocksPort 0
#ExitRelay 0
Once you have made the changes, press “CTRL-X” followed by “y” and then press enter to confirm and close the file.
e) Start ToR
Once you have completed your configuration file, you can start ToR by using this command:
systemctl start tor
═════════════

Step 5: Install NYX

In order for us to have a visual representation of our new ToR relay, we can install a visual interface called NYX. To do so we will use the following command:
sudo dnf install nyx
Follow the “y/n” prompts that come up during installation by choosing “y” followed by enter.
a) Open NYX
Once NYX has installed you can open it by using this command:
nyx
b) Closing NYX
To quit the NYX interface you can simply press the “q” key followed by “q” once again.
═════════════

Step 6: Shut Down ToR

In the instance that you must shutdown your relay you can do so by using this command:
systemctl stop tor
a) Restarting ToR After Shut-Down
To restart your relay after you have shut it down, you can use the following command:
systemctl restart tor
Once you have done so, you can confirm that your relay is online by opening your NYX interface.
═════════════

You did it! 🎉

Thanks for following along! For a more detailed explanation, feel free to check out the YouTube video in the links below!
If you run into any issues in the process, please feel free to reach out in the ATOR discord server where a team member or a member of the community will be happy to lend you a hand!
Thanks for following along, and I’ll see you in the next one!