This entry will show you, how to configure onion domain for your website. This will allow access to your website through the Tor protocol, using .onion domain. Facebook did something similar. I decided that my site will also be available on the Tor network. You can reach 0ut3r Space using it standard address which is http://0ut3r.space and now also using
To open onion address you need to use Tor Browser.
sudo nano /etc/apt/sources.list
and add Tor repository (here you can find list of actual Tor repositories)
deb https://deb.torproject.org/torproject.org stretch main
Add repository keys:
gpg2 --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
Update package list and install Tor:
sudo apt update && sudo apt install tor
Edit Tor configuration file to look like this (don’t forget to open HiddenService port on your firewall, in below example it is set to 8123):
You can also use old version 2 or version 2 and 3 in same time but it is recommended to use next-gen onions version 3.
Now restart Tor:
sudo service tor restart
/var/lib/tor/hidden_service/ you can find your onion domain private key.
Inside file called
hostname you will find your onion domain address.
Next to your virtual host file create another one for onion configuration.
Modify your hidden service port and root folder for your website. Server name should be set to your onion domain. By default, this file should look the same as the configuration of your page except the above changes, so don’t forget about php configuration and other setting you are using on your server.
Save this file and create link to activate this configuration.
sudo ln -s /etc/nginx/sites-available/youronionconfiguration /etc/nginx/sites-enabled/youronionconfiguration
Test Nginx configuration
sudo nginx -t
and if everything is ok restart web server
sudo service nginx restart
Now your website is visible in both networks. As standard domain in Internet and as onion domain in Tor network. You can find more about configuring Onion service in official documentation.