This is a simple docker-compose script to host a website powered by nginx on a Tor hidden service.

Build status: Circle CI Build status:

Assumptions:

  1. You have docker installed and running.

  2. You have docker-compose installed.

  3. git clone git@github.com:xxdesmus/Nginx-TorHiddenService.git

  4. cd nginx/html

  5. edit index.html and place any other files you need for the website into this directory.

  6. docker build -t PickNameHere/nginx_alpine .

  7. Test that nginx is working with your webpage -> docker run -d --name nginx -p 80:80 PickNameHere/nginx_alpine

  8. docker ps -> get the container ID -> docker stop container ID

  9. cd ..

  10. docker-compose up -d

  11. docker-compose ps -> confirm both nginx and tor are running

  12. docker-compose logs tor -> look for Your onion address is XXXXXXXX.onion

  13. Wait roughly 2-3 minutes for the hidden service to become active, then go to XXXXXXXX.onion in the Tor browser.

  14. Profit. You just published a website on a Tor hidden service.