This is a simple docker-compose script to host a website powered by nginx on a Tor hidden service.
Assumptions:
-
You have docker installed and running.
-
You have docker-compose installed.
-
git clone git@github.com:xxdesmus/Nginx-TorHiddenService.git
-
cd nginx/html
-
edit index.html and place any other files you need for the website into this directory.
-
docker build -t PickNameHere/nginx_alpine .
-
Test that nginx is working with your webpage ->
docker run -d --name nginx -p 80:80 PickNameHere/nginx_alpine
-
docker ps
-> get the container ID ->docker stop container ID
-
cd ..
-
docker-compose up -d
-
docker-compose ps
-> confirm both nginx and tor are running -
docker-compose logs tor
-> look forYour onion address is XXXXXXXX.onion
-
Wait roughly 2-3 minutes for the hidden service to become active, then go to
XXXXXXXX.onion
in the Tor browser. -
Profit. You just published a website on a Tor hidden service.