This is an old revision of the document!

Setting up a 2nd instance of tor

1. init script

cp /etc/init.d/tor /etc/init.d/tor2

Edit it:

DESC="tor2 daemon"
DEFAULTSFILE=/etc/default/tor # $NAME
DEFAULT_ARGS="--defaults-torrc /etc/tor2/tor-service-defaults-torrc -f /etc/tor2/torrc"

2. etc dir

cp -R /etc/tor /etc/tor2

Edit /etc/tor2/torrc to change ports/nickname/etc.

You will also need to redefine SocksPort and ControlPort, add:

SocksPort 9051
ControlPort 9052

3. tor-service-defaults-torrc

cp /usr/share/tor/tor-service-defaults-torrc /etc/tor2/

Edit /etc/tor2/tor-service-defaults-torrc:

DataDirectory /var/lib/tor2
PidFile /var/run/tor/
ControlSocket /var/run/tor/control2
CookieAuthFile /var/run/tor/control2.authcookie

Log notice file /var/log/tor/log2

4. data dir

mkdir /var/lib/tor2
chown -R debian-tor:debian-tor /var/lib/tor2

5. start-up

Into /etc/rc.local:

/etc/init.d/tor2 start

tor2.1438697939.txt.gz · Last modified: 2015-08-04 14:18 UTC by rm