Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
install tor non-exit relay on digital ocean
# My steps for creating a DigitalOcean server to run non-exit Tor node for just $5/mo
# Screen shots of my setup process: https://plus.google.com/photos/+DrewFustini/albums/6057260188204970945
# Create Digital Ocean account: https://www.digitalocean.com/
# Create Droplet on Digital Ocean: select $5/mo, and select Debian 7.0 64-bit
# This instructions are based on Tor Project: https://www.torproject.org/docs/tor-relay-debian.html.en
afustini@lappy486:~$ ssh root@107.170.203.104
root@107.170.203.104's password:
You are required to change your password immediately (root enforced)
Linux Tor300SoF 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Sep 10 01:57:35 2014 from c-24-1-147-220.hsd1.in.comcast.net
Changing password for root.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
root@Tor300SoF:~# apt-get install tor tor-arm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libevent-2.0-5 python-central python-geoip python-socksipy python-torctl tor-geoipdb torsocks
Suggested packages:
mixmaster xul-ext-torbutton socat polipo privoxy apparmor-utils
The following NEW packages will be installed:
libevent-2.0-5 python-central python-geoip python-socksipy python-torctl tor tor-arm tor-geoipdb torsocks
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,134 kB of archives.
After this operation, 8,750 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://security.debian.org/ wheezy/updates/main tor amd64 0.2.4.23-1~deb7u1 [1,352 kB]
Get:2 http://security.debian.org/ wheezy/updates/main tor-geoipdb all 0.2.4.23-1~deb7u1 [1,065 kB]
Get:3 http://mirrors.digitalocean.com/debian/ wheezy/main libevent-2.0-5 amd64 2.0.19-stable-3 [172 kB]
Get:4 http://mirrors.digitalocean.com/debian/ wheezy/main python-central all 0.6.17 [47.8 kB]
Get:5 http://mirrors.digitalocean.com/debian/ wheezy/main python-geoip amd64 1.2.4-2+b2 [11.9 kB]
Get:6 http://mirrors.digitalocean.com/debian/ wheezy/main python-socksipy all 1.0-1 [11.5 kB]
Get:7 http://mirrors.digitalocean.com/debian/ wheezy/main python-torctl all 20110618git-1 [86.0 kB]
Get:8 http://mirrors.digitalocean.com/debian/ wheezy/main torsocks amd64 1.2-3 [80.4 kB]
Get:9 http://mirrors.digitalocean.com/debian/ wheezy/main tor-arm all 1.4.5.0-1 [307 kB]
Fetched 3,134 kB in 1s (2,175 kB/s)
Selecting previously unselected package libevent-2.0-5:amd64.
(Reading database ... 26315 files and directories currently installed.)
Unpacking libevent-2.0-5:amd64 (from .../libevent-2.0-5_2.0.19-stable-3_amd64.deb) ...
Selecting previously unselected package tor.
Unpacking tor (from .../tor_0.2.4.23-1~deb7u1_amd64.deb) ...
Selecting previously unselected package python-central.
Unpacking python-central (from .../python-central_0.6.17_all.deb) ...
Selecting previously unselected package python-geoip.
Unpacking python-geoip (from .../python-geoip_1.2.4-2+b2_amd64.deb) ...
Selecting previously unselected package python-socksipy.
Unpacking python-socksipy (from .../python-socksipy_1.0-1_all.deb) ...
Selecting previously unselected package python-torctl.
Unpacking python-torctl (from .../python-torctl_20110618git-1_all.deb) ...
Selecting previously unselected package torsocks.
Unpacking torsocks (from .../torsocks_1.2-3_amd64.deb) ...
Selecting previously unselected package tor-arm.
Unpacking tor-arm (from .../tor-arm_1.4.5.0-1_all.deb) ...
Selecting previously unselected package tor-geoipdb.
Unpacking tor-geoipdb (from .../tor-geoipdb_0.2.4.23-1~deb7u1_all.deb) ...
Processing triggers for man-db ...
Setting up libevent-2.0-5:amd64 (2.0.19-stable-3) ...
Setting up tor (0.2.4.23-1~deb7u1) ...
Something or somebody made /var/lib/tor disappear.
Creating one for you again.
Something or somebody made /var/log/tor disappear.
Creating one for you again.
[ ok ] Starting tor daemon...done.
Setting up python-central (0.6.17) ...
Setting up python-geoip (1.2.4-2+b2) ...
Setting up python-socksipy (1.0-1) ...
Setting up torsocks (1.2-3) ...
Setting up tor-geoipdb (0.2.4.23-1~deb7u1) ...
Processing triggers for python-central ...
Setting up python-torctl (20110618git-1) ...
Setting up tor-arm (1.4.5.0-1) ...
Processing triggers for python-support ...
root@Tor300SoF:~# cp /etc/tor
tor/ torsocks.conf
root@Tor300SoF:~# cp /etc/tor
tor/ torsocks.conf
root@Tor300SoF:~# cp /etc/tor/torrc /etc/tor/torrc.orig
root@Tor300SoF:~# vi /etc/tor/torrc
# Edit config per my example here: https://gist.github.com/pdp7/9697b1196c63e0f32c57
ORPort 443
Exitpolicy reject *:*
Nickname EFFisMyHero
ContactInfo <YOUR-EMAIL-ADDRESS-HERE>
Log notice file /var/log/tor/notices.log
RelayBandwidthRate 1024 KB
RelayBandwidthBurst 1024 KB
MaxAdvertisedBandwidth 1024 KB
DisableDebuggerAttachment 0
root@Tor300SoF:~# /etc/init.d/tor restart
root@Tor300SoF:~# sudo -u debian-tor arm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.