How to Run a Tor Middle Relay on Ubuntu Server
π§ Run a Tor Middle Relay on Ubuntu Server (Simple Guide)
Running a Tor middle relay helps support privacy and censorship resistance on the internet. It is legal in most countries, lightweight to run, and does not expose your personal browsing.
π§ What is a middle relay?
A Tor middle relay forwards encrypted traffic between other Tor nodes. It does NOT:
- See websites you visit
- See your identity
- Act as a proxy for your browsing
It simply helps move encrypted data through the Tor network.
π» Why use Ubuntu Server?
- Stable and reliable for 24/7 operation
- Lightweight (no desktop needed)
- Easy service management
- Works well on old hardware
⚙️ Step 1: Install Tor
sudo apt update && sudo apt upgrade -y sudo apt install tor -y
π§± Step 2: Configure your relay
Edit the Tor configuration file:
sudo nano /etc/tor/torrc
Add the following:
Nickname MyRelay ORPort 9001 ExitRelay 0 SocksPort 0 RelayBandwidthRate 10 MB RelayBandwidthBurst 20 MB ContactInfo youremail@example.com
Important: ExitRelay 0 ensures you are NOT an exit node.
π₯ Step 3: Open firewall port
sudo ufw allow 9001/tcp sudo ufw enable
π Step 4: Enable auto-start
sudo systemctl enable tor sudo systemctl start tor
Make Tor restart automatically if it crashes:
sudo systemctl edit tor
Add:
[Service] Restart=always RestartSec=10
π Step 5: Check logs
journalctl -u tor -f
π Step 6: Verify your relay
After a few hours, check your relay status here:
https://metrics.torproject.org/rs.html
Search your public IP address.
π§© Why run a relay?
- Helps people access the internet privately
- Supports censorship resistance
- Strengthens global privacy infrastructure
- Uses very little resources
⚠️ Notes
- Middle relays do NOT expose your identity or browsing activity
- Bandwidth usage will vary depending on demand
- Uptime improves relay usefulness
π§ Final thought
If you can run a small always-on machine, you can help make the internet more private and resilient. A Tor relay is one of the simplest ways to contribute to global privacy infrastructure.
Comments
Post a Comment