I am trying to change the RSA private key for my website. I have heard you have to edit /var/lib/tor/hidden_service/private_key, but that isn't a file. Here's the output of ls /var/lib/tor/hidden_service:

authorized_clients  hostname  hs_ed25519_public_key  hs_ed25519_secret_key

I tried editing hs_ed25519_secret_key but it shows weird symbols, probably because of its encoding. So where is private_key?


The private key of your Onion service is /var/lib/tor/hidden_service/hs_ed25519_secret_key. It uses Ed25519 as signature scheme and not RSA. Furthermore it is also not possible to edit the file directly.

If you want to change the key, you can stop your Tor process, delete the files inside /var/lib/tor/hidden_service and restart Tor. The software will then create new keys and a new hostname for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.