Create simple Tor hidden service
In this article I want to share how simple it is to create a service in Onion web (Tor network). We will create simple web page that would be accessible via Tor browser. I will show the example for CentOS 7 (RHEL).
Make sure that your have configured your server as a webserver (nginx is assumed).
Next install tor package
$ yum install epel-release
and configure it
cp /usr/share/tor/defaults-torrc /etc/tor/torrc
Now edit config that was copied and make sure lines below are uncommented
Skip all the lines intented for relays and modify only the one for location-hidden services
Now update nginx configuration to point to your hidden resource
Paste sample configuration in that file
Make sure you have created same sample html page at
Now just restart nginx and tor services for changes to take effect
$ nginx -t && nginx -s reload
Check content of
/var/lib/tor/my_hidden_service/hostname, open Tor browser and point it to the url generated. That’s it.
This is simplified tutorial assuming that you have SELinux disabled. To check current status and disable it if not yet execute following
The other issue that might prevent tor service from start is permissions on directories. So make sure that you have proper access rights on folder
/var/lib/tor/my_hidden_service (or any other folder that you’ve specified)
$ sudo chmod -R toranon:toranon /var/lib/tor/my_hidden_service