I am trying to use my own custom .onion address using eschalot and after I add my info to hostname and key info into the private key file, upon starting tor, it overwrites my custom address and adds a tor generated address.
I tried setting
HiddenServiceVersion 3
to
HiddenServiceVersion 2
and it still overwrites the hostname file.
I tried setting the immutable bit on the hostname file and my private key using
chattr +i /etc/tor/hidden_service/hostname
and then tor fails to start with error
Mar 28 13:48:10.000 [debug] check_private_dir(): stat()ing /etc/tor/hidden_service/
Mar 28 13:48:10.000 [debug] file_status(): stat()ing /etc/tor/hidden_service//hs_ed25519_secret_key_encrypted
Mar 28 13:48:10.000 [debug] tor_rename(): Renaming /etc/tor/hidden_service//hostname.tmp to /etc/tor/hidden_service//hostname
Mar 28 13:48:10.000 [warn] Error replacing "/etc/tor/hidden_service//hostname": Operation not permitted
Mar 28 13:48:10.000 [warn] Could not write onion address to hostname file "/etc/tor/hidden_service//hostname"
Mar 28 13:48:10.000 [warn] Error loading rendezvous service keys
What's the switch to prevent tor from overwriting your hostname file?