# CentOS 9 Tor relay setup keeps getting this error

**URL:** https://forum.torproject.org/t/centos-9-tor-relay-setup-keeps-getting-this-error/12321
**Category:** Relay Operator
**Tags:** tor
**Created:** [April 15, 2024, 8:57am UTC](https://forum.torproject.org/t/centos-9-tor-relay-setup-keeps-getting-this-error/12321 "2024-04-15T08:57:56Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![sunshinecowboy](https://forum.torproject.org/user_avatar/forum.torproject.org/sunshinecowboy/32/4558_2.png) [@sunshinecowboy](https://forum.torproject.org/u/sunshinecowboy)
#### Post date: [April 17, 2024, 8:45pm UTC](https://forum.torproject.org/t/centos-9-tor-relay-setup-keeps-getting-this-error/12321/10 "2024-04-17T20:45:26Z")

</div>

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:

```auto
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 127.0.0.1:[your_control_port]`

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

---

_[View the full topic](https://forum.torproject.org/t/centos-9-tor-relay-setup-keeps-getting-this-error/12321)._
