3

after long consideration I just made the decision to run a tor relay. Thinking of the Internet of my childhood in the 1990s. Installed on a fresh armbian stretch, edited some settings in /etc/tor/torrc and rebooted. Tor seems to be running fine according to /var/log /syslog and also has open (ESTABLISHED) connections to other relays showing after running lsof -ni|grep tor. But....: when I try to run $ tor or # tor it gives me warnings and errors like these: [warn] Could not bind to 0.0.0.0:9001: Address already in use. Is Tor already running?

Obviously, tor is already running. Top says so (user debian-tor). But why will the torcommand not be okay with this? I've read that this is because of the debian package I installed. How do I change this behaviour, i.e. set tor to use only one user?

Thanks in advance!

2
  • May I suggest running a Tor relay using docker? It makes management super easy. I wrote a wikipage about how it could be achieved. You can probably find it by searching for “relay docker”.
    – Birb
    Commented Nov 21, 2019 at 21:12
  • 1
    Thanks! But since the server really only runs tor and nothing else, I figured to keep it simple is best for me.
    – Beres
    Commented Nov 22, 2019 at 4:02

2 Answers 2

3

You Tor is running as a systemd service so trying to run a second instance manually won't work. If you run "sudo systemctl stop tor" then you can use the tor command because you've stopped the process from running.

The tor command doesn't really do much except manually control the service. That would be best done by editing the torrc file and then restarting the service with "sudo systemctl restart tor".

1
  • Thanks! Yes, I understood that tor would start automatically but I was confused why the tor command was mentioned in the manuals. I thought it was used to "configure" tor while the process was running, but actually all (?) settings need to be set in torrc (or the configuration file loaded before), correct?
    – Beres
    Commented Nov 22, 2019 at 4:05
1

Try -

sudo systemctl stop tor

In the worst case scenario -

sudo killall tor

This will kill all the process related to tor

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .