CentOS 9 Tor relay setup keeps getting this error

Make sure the user tor exists by checking your /etc/passwd file. If it doesn’t create a new one by: sudo useradd -d /var/lib/tor -s /bin/false -g tor

Then make sure tor has ownership of /var/lib/tor by: sudo ls -la /var/lib/tor
if not do: sudo chown -R tor:tor /var/lib/tor

Now finally add the following lines to /etc/tor/torrc:

User tor
Log notice syslog
DataDirectory /var/lib/tor
CookieAuthentication 1

Finally, let’s cleanly restart the systemd service:

sudo systemctl enable tor
sudo systemctl start tor

If everything works you should be able to check your relay by installing nyx, if it’s not already installed, and typing: nyx -i[your_control_port]

If it doesn’t work now you should get a reading from: sudo cat /var/log/syslog | grep 'Tor'

1 Like