News for hackers. Stuff that matters.
Re:Self-Hosting on the Dark Web by mzajc on Sunday September 27, 2026 @08:45PM (#49872293)
Besides using a separate port, I would also suggest running the hidden service on a non-127.0.0.1 bind address, just in case you ever host something else on that port and forget to disable the hidden service:

> HiddenServicePort 80 127.13.37.1:8080

> listen 127.13.37.1:8080;

This way, strangers won't be able to connect to a service bound to 127.0.0.1, should you ever decide to re-use the port and forget to disable the hidden service.

You'll also need to use separate ports and/or bind addresses if you host multiple hidden services and don't want people to correlate them - if nginx doesn't match the Host header, it will serve whichever site comes first alphabetically.

Re:Self-Hosting on the Dark Web by someonebaggy on Sunday September 27, 2026 @08:48PM (#49872308)
It's also possible to use a Unix socket, which can have a descriptive pathname like /var/run/my-service.sock: https://stackoverflow.com/questions/69313114/using-nginx-to-...
Re:Self-Hosting on the Dark Web by m00dy on Monday September 28, 2026 @01:40AM (#49874046)
using unix socket rather than tcp has advantages
Re:Self-Hosting on the Dark Web by BonerWiener on Monday September 28, 2026 @01:45AM (#49874084)
Can you elaborate?
Re:Self-Hosting on the Dark Web by Tepix on Monday September 28, 2026 @01:50AM (#49874117)
For starters, it’s twice as fast
Re:Self-Hosting on the Dark Web by someonebaggy on Monday September 28, 2026 @02:59AM (#49874507)
AFAIK TCP outperforms Unix sockets for some odd reason, but it's irrelevant anyway because you aren't getting that much bandwidth through Tor.
Re:Self-Hosting on the Dark Web by jeroenhd on Monday September 28, 2026 @04:45AM (#49875225)
Every time I've tried using Unix sockets, I've run into the problem as described in your stackoverflow link. The suggested solution ("just run tor as root") is not exactly best practice.

You can monkey-patch scripts around Tor service activation, but I haven't been able to get my Tor+nginx setup to work reliably after updates/service restarts when using unix sockets.