Skip to content

where to put the onion service webserver socket?

On https://community.torproject.org/onion-services/setup/ we have the suggestion

HiddenServiceDir /var/lib/tor/my-website/
HiddenServicePort 80 unix:/var/run/tor-my-website.sock

That second line looks weird -- it looks like they meant to say "/var/run/tor/" but didn't.

Where should we recommend to put the unix socket for the webserver? Maybe the nginx package has a typical place it expects to be able to create its socket? I would expect that on my standard system, my webserver wouldn't be able to write to /var/run/ or to /var/run/tor/.