EasyTorHiddenServicePython
EasyTorHiddenServicePython is a project to run a simple Python webserver to serve files on the darknet. The project was written and tested in Python 3.
- Clone this project to a directory, e.g. /home/{username}/hidden-service/.
- Install Python and Tor using e.g.
sudo apt-get install tor python3-pip python-pip
- Install all required pip package dependencies with:
pip install -r requirements.txt
- Add
HiddenServiceDir /home/{username}/hidden-service/
HiddenServicePort 80 127.0.0.1:8000
to the /etc/tor/torrc
file (Change the directory of course) using
nano /etc/tor/torrc
- Set the execute flags:
chmod +x install.sh
chmod +x run.sh
chmod +x restartTor.sh
chmod +x startTor.sh
chmod +x stopTor.sh
chmod +x statusTor.sh
- Set the rights to the directory properly:
chmod 700 /home/{username}/hidden-service/
- Add files to the web subfolder of your service to serve them.
- Restart tor using
sudo service tor restart
- Get your tor hostname from your service directory:
cat /home/{username}/hidden-service/hostname
- Check that your firewall(s) do not block incoming traffic.
- Access your hidden service over the hostname with the Tor Browser
- https://github.com/whackashoe/tor-hidden-service-setup/blob/master/setting-up-webserver.md
- https://github.com/whackashoe/tor-hidden-service-setup
- https://jordan-wright.com/blog/2014/10/06/creating-tor-hidden-services-with-python/
- https://robindoherty.com/tor/hidden-service.html
- https://robindoherty.com/tor/fancy-dot-onion.html
- https://stackoverflow.com/questions/7943751/what-is-the-python-3-equivalent-of-python-m-simplehttpserver
See the Changelog.