2

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!

  • 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 Nov 21 '19 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 Nov 22 '19 at 4:02
2

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".

| improve this answer | |
  • 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 Nov 22 '19 at 4:05
0

Try -

sudo systemctl stop tor

In the worst case scenario -

sudo killall tor

This will kill all the process related to tor

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.