I am newbie, first time I try whonix, I didn't find in workstation hidden_service in torrc file and gateway station show me /etc/tor/torrc but there is nothing, I added two lines: HiddenServiceDir /var/lib/tor/hidden_service/ HiddenServicePort 80

so, I don't know how to install Tor hidden service, I followed https://www.whonix.org/wiki/Hidden_Services I installed also lighttpd in workstation but it failed to start, maybe because port 80 is already occupied. in gateway, cd var/lib/tor says permission denied. maybe there is hidden_service folder? I see, owner is debian-tor and I am user in whonix.

what should I do to install testing website as Tor hidden service? I just want to try it and without success.

I did chmod and added index.html beside private_key and hostname but when I try to use Tor browser bundle to connect, no success.

2 Answers 2


In the gateway VM, your hidden service specification goes in /etc/tor/torrc. By default, it's largely empty, and the default configuration has been moved to /usr/share/tor/tor-service-defaults-torrc. In /etc/tor/torrc, add something like this for a webserver:

HiddenServiceDir /var/lib/tor/my_hidden_website/
HiddenServicePort 80

You need to restart Tor to generate the hidden service key and hostname:

user@host:~$ sudo service tor restart

Then get the hostname:

user@host:~$ sudo cat /var/lib/tor/my_hidden_website/hostname

Now, working in the workstation VM, install lighttpd. Once installed, it starts at bootup. Your website root directory is /var/www/ on the workstation VM. It is NOT /var/lib/tor/my_hidden_website/ on the gateway VM. That would be a very bad thing, especially if you somehow made it work!

Using another machine running Tor Browser Bundle, browse your hidden-service hostname: http://mynewthshostname.onion. You should see the lighttpd's default page. Once you have that working, you can replace the lighttpd default with your website.

  • How do I know what the IP of my workstation vm should be here?
    – user23093
    Sep 16, 2018 at 4:26

I didn't find in workstation hidden_service in torrc file and gateway station show me /etc/tor/torrc but there is nothing

There little non-nothingness in /etc/tor/torrc worth reading. It says Please see /etc/tor/torrc.examples for help, options, comments etc.

Having a look at /etc/tor/torrc.examples as well.

cd /var/lib/tor says permission denied

You need to be root (or debian-tor) to get into that folder.

  • Yes, adrelanos and associates have locked down Whonix ;)
    – mirimir
    Oct 22, 2013 at 5:29
  • This particular move shipping an almost empty torrc isn't about lock down. Also permissions of /var/lib/tor come with upstream Tor, no changes there. There move to ship an almost empty /etc/tor/torrc was made to leave that file untouched when Whonix is updated. The goal is users not to prompt with an interactive dpkg conflict resolution dialog. /usr/share/tor/tor-service-defaults-torrc and /etc/tor/torrc.examples can be updated in further Whonix versions without conflicting with user changes in /etc/tor/torrc.
    – adrelanos
    Oct 22, 2013 at 9:10
  • Ah, I get it :)
    – mirimir
    Oct 22, 2013 at 23:45

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.