Table of Contents
The Tor network relies on volunteer-operated relays to provide anonymous internet access worldwide. Running a Tor relay on your Raspberry Pi is a meaningful contribution to internet privacy and freedom. This guide covers setting up a middle relay safely for Indian operators.
Understanding the Tor Network
- Tor routes internet traffic through multiple relays, encrypting at each hop.
- Each relay only knows the previous and next hop, not the complete circuit.
- Volunteers worldwide donate bandwidth by running relays.
- More relays = faster Tor speeds for millions of users globally.
Types of Tor Relays
Middle relay (recommended for beginners): Forwards encrypted traffic between other relays. Low risk, no exit traffic.
Guard relay: First hop for Tor users. Requires high uptime and bandwidth. Becomes a guard after months of reliable operation.
Exit relay: Final hop where traffic exits to the internet. Not recommended for home users as your IP appears as the source of exit traffic.
Bridge relay: Unlisted relay for censored regions. Helps users bypass blocks.
Recommended Components on Zbotic.in
Hardware and Bandwidth Requirements
- Raspberry Pi 4 or 5 (any RAM variant)
- Ethernet connection (WiFi adds latency)
- Broadband with 2+ Mbps upload (Jio Fiber, Airtel, ACT plans typically have 100+ Mbps symmetrical)
- MicroSD card (16GB sufficient)
Installing and Configuring Tor Relay
# Install Tor
sudo apt update && sudo apt install tor -y
# Configure as a middle relay
sudo nano /etc/tor/torrc
# Add these lines:
ORPort 9001
Nickname MyPiRelay
ContactInfo [email protected]
RelayBandwidthRate 1 MBytes # Limit to 1 MB/s
RelayBandwidthBurst 2 MBytes
ExitPolicy reject *:* # IMPORTANT: Not an exit relay
Log notice file /var/log/tor/notices.log
# Restart Tor
sudo systemctl restart tor
# Check status
sudo journalctl -u tor -f
Monitoring Your Relay
# Install nyx (Tor relay monitor)
sudo apt install nyx -y
sudo nyx
# View relay metrics
# https://metrics.torproject.org/rs.html#search/MyPiRelay
# Check bandwidth usage
vnstat -l -i eth0
Security and Legal Considerations
Running a middle relay in India is generally safe and legal:
- Middle relays only forward encrypted traffic — you cannot see or control the content.
- Your IP is listed as a Tor relay but not as an exit point.
- No Indian law specifically prohibits running a Tor relay.
- Do NOT run an exit relay from a residential connection.
- Use a dedicated Pi and IP for the relay, separate from personal activities.
Optimising Relay Performance
# Monitor and adjust bandwidth limits based on your plan
# Check monthly data usage
vnstat -m
# Most Indian broadband plans have unlimited data
# But check your FUP (Fair Usage Policy)
# For optimal relay contribution:
# - Keep uptime above 95%
# - Run for 2+ months to be flagged as Stable
# - After 8+ months, may become a Guard relay
Frequently Asked Questions
Is it legal to run a Tor relay in India?
Running a middle relay is not explicitly illegal in India. India’s IT Act does not prohibit relaying encrypted traffic. However, avoid running an exit relay as it may attract unwanted attention. Consult a legal professional if concerned.
How much bandwidth does a Tor relay use?
You control this with RelayBandwidthRate in torrc. Set it to whatever you are comfortable donating. 1 MB/s (about 2.6 TB/month) is a meaningful contribution. Most Indian unlimited broadband plans handle this easily.
Will running a Tor relay slow my internet?
The RelayBandwidthRate setting caps how much bandwidth Tor uses. Set it to a fraction of your total bandwidth. With a 100 Mbps connection, donating 10 Mbps leaves plenty for personal use.
Can my ISP see that I run a Tor relay?
Yes, your ISP can see Tor traffic but cannot see the content (it is encrypted). Middle relay traffic looks like encrypted connections to other Tor relays. Most Indian ISPs do not flag or throttle Tor traffic.
Does a Tor relay earn any money?
No, Tor relays are volunteer-operated. The reward is contributing to global internet freedom and privacy. The Tor Project occasionally gives out stickers and t-shirts to long-running relay operators.
{“@context”: “https://schema.org”, “@type”: “FAQPage”, “mainEntity”: [{“@type”: “Question”, “name”: “Is it legal to run a Tor relay in India?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “Running a middle relay is not explicitly illegal in India. India’s IT Act does not prohibit relaying encrypted traffic. However, avoid running an exit relay as it may attract unwanted attention. Consult a legal professional if concerned.”}}, {“@type”: “Question”, “name”: “How much bandwidth does a Tor relay use?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “You control this with RelayBandwidthRate in torrc. Set it to whatever you are comfortable donating. 1 MB/s (about 2.6 TB/month) is a meaningful contribution. Most Indian unlimited broadband plans handle this easily.”}}, {“@type”: “Question”, “name”: “Will running a Tor relay slow my internet?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “The RelayBandwidthRate setting caps how much bandwidth Tor uses. Set it to a fraction of your total bandwidth. With a 100 Mbps connection, donating 10 Mbps leaves plenty for personal use.”}}, {“@type”: “Question”, “name”: “Can my ISP see that I run a Tor relay?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “Yes, your ISP can see Tor traffic but cannot see the content (it is encrypted). Middle relay traffic looks like encrypted connections to other Tor relays. Most Indian ISPs do not flag or throttle Tor traffic.”}}, {“@type”: “Question”, “name”: “Does a Tor relay earn any money?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “No, Tor relays are volunteer-operated. The reward is contributing to global internet freedom and privacy. The Tor Project occasionally gives out stickers and t-shirts to long-running relay operators.”}}]}
Get All Your Raspberry Pi Components from Zbotic.in
India’s trusted store for genuine Raspberry Pi boards, HATs, accessories, and components. Fast shipping across India with expert support.
Add comment