General

Custom tor domain help needed

Started by UserTOR5525 · Apr 24, 2025

#4648
I have a custom tor domain (8char) which I generated some years ago using github/cathugger/mkp224o. Now I'm trying to set up my site on TOR again and I can not seem to get it working, even though I have all the files and around one year ago I set up my site for a short amount of time and had no issues. I tried generating a random 4 character domain just to se if it works and it did.

So I copy the files into the tor directory and if I try to copy the 8char domain files, once I start tor it just generates a random domain and keys instead of using the 8char keys and hostname (replaces my hostname and key files). When I copy the 4 character hostname and keys, it starts up normally on the 4 character domain.

I have tried a lot of things and can't seem to find anything in any logs either

Any ideas? Thanks
#4651
↳ Replying to @femboy_destroyer69
100% bad permission if the configuration in the torrc is right. The key files need to belong to the user/group the Tor daemon is being run with, or have permission to be read by every user.
#4653
↳ Replying to @UserTOR5525
as people said, bad permissions or better said + ownership of files.

tor will overwrite hostname file with onion domain as long as you don't set up correctly who owns folder and hostname files and keys, in debian it is /var/lib/tor/my-onion-folder

the owner should be debian-tor + only read and write permissions as you can see below:

drwx--S--- 2 debian-tor debian-tor ......................... authorized_clients

-rw------- 1 debian-tor debian-tor ............................ hostname

-rw------- 1 debian-tor debian-tor ......................... hs_ed25519_public_key

-rw------- 1 debian-tor debian-tor .......................... hs_ed25519_secret_key