Picture of Raspberry Pi Tor relay
Tor (short for The Onion Router) is a system intended to enable online anonymity. The Tor client software directs internet traffic through a worldwide volunteer network of servers to conceal a user's location or usage from anyone conducting network surveillance or traffic analysis. Using Tor makes it more difficult to trace Internet activity, including "visits to Web sites, online posts, instant messages and other communication forms", back to the user and is intended to protect users' personal freedom, privacy, and ability to conduct confidential business by keeping their internet activities from being monitored.

So obviously, TOR needs a large amount of servers and as TOR network is not a commercial organisation, it requires voluntary supporters. You can be one of them and turn your Raspberry in a TOR relay.

Remove these adsRemove these ads by Signing Up

Step 1: Parts needed

You need the following parts:

- Raspberry Pi
- power supply
- network cable/connection to the Internet
- SDcard with Raspbian (you can find all necessary installation intructions here:

Step 2: Let's start

For security reasons you should not work as "root" all the time, you can fix this problem with the following steps:

Open a terminal

    apt-get install sudo
adduser tor  
    passwd tor

this creates the user "tor" and let's you set a password. Please use at least 8 digits (numeric, alphanumeric and special characters)

Now we have to to add the tor user account to the list of sudoers:

    nano /etc/sudoers

Add the line

    tor ALL=(ALL) ALL

Now we'll install the latest security patchess and updates. Please do this  regularly!!!

    sudo apt-get update
    sudo apt-get upgrade

meyotch1 year ago
I've got a quick question for anyone here who is more conversant with the Tor algorithm. And please point me to resources if there's a project like I describe already in motion somewhere else!

How well will a relay - of any type - function with an intermittent connection?

The scenario I'm imagining is a Tor relay mounted on a vehicle (car or bike) using a wireless connection. If one travels routinely through a crowded wifi environment in stop-and-go conditions, would such a relay be able to negotiate a connection and spend a useful amount of time serving as a relay? Such as while stopped at a light or crawling along in congestion? Or while your bike is parked outside a place with an open network.

I understand some of this might violate TOS for some networks, but be assured, this is just a thought experiment. I have too many other hobbies right now.

I am trying to do something like this for a distributed process grid ...

Asisp2 months ago

Too bad tor its not working anymore...the tor package for Raspberry pi shows 404. I tried a lot.

gar3747 months ago

Nice tutorial - I'd never heard of Tor until tonight when a mate posted on FB about it. Now configured and running. Thanks

n0m made it!7 months ago

Sweet, works smoothly :)

cambaio1 year ago
Alternative tutorial in
Its excellent :)
Piney1 year ago
You forgot
Then add this line to your /etc/apt/sources.list file:
deb wheezy main

Then add the gpg key used to sign the packages by running the following commands at your command prompt:

gpg --keyserver --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
Now refresh your sources, running the following command (as root) at your command prompt:
apt-get update
If there are no errors you're good to continue.
We provide a Debian package to help you keep our signing key current. It is recommended you use it. Install it using

apt-get install
To finally install Tor just run:

apt-get install tor
tor rocks
Ak1r42 years ago
Hi there, thx for the nice how to.
i've got two question about the follwing part:
"Add the line

tor ALL=(ALL) ALL"

i quess this is for the rights the tor user will get. is it ok to give him all? oder am i on the wrong way. i just wanted to know if this influences my normal pi user.

and there ist also the second question if i could run this tor -relay while im logged on with the pi user but start it in terminal with the tor user. or is this a stupid idea?

thx a lot
nice description of tor, how widely is tor being used, how much data passes through any given tor node per day? per hour?
Michael_oz2 years ago
Nice and straight forward.
Perhaps you could add a brief step at the end on how to use TOR?
fNX (author)  Michael_oz2 years ago
Thank you! I've added a step at the end with information how the client works and how to install it.