Tor Hidden Service with Docker Compose
Create and deploy a Tor hidden service using Docker Compose. This project provides a simple setup to host a static HTML webpage as a Tor hidden service using Nginx within Docker containers. The hidden service's hostname is customizable, allowing you to create your own secure and private .onion address on the Tor network.
These instructions will help you clone and set up the project on your local machine.
- Git
- Docker
- Docker Compose
Clone this repository to your local machine using the following command:
git clone https://github.com/ha1fdan/hidden-service-docker.git
- Modify the
tor-config/torrc
file to customize your hidden service settings. - Prepare your HTML content and place it in the
html
directory.
If you have your own vanity address files that you want to use for your Tor hidden service, follow these steps:
-
Generate or obtain your custom vanity address files, including the
hs_ed25519_public_key
,hs_ed25519_secret_key
andhostname
. You can use tools like mkp224o to generate vanity addresses. -
Replace the existing files in the
hidden_service
directory with your custom vanity address files. Make sure thehostname
file contains your desired vanity address.
Launch the Hidden Service
- Navigate to the cloned repository's directory:
cd hidden-service-docker
- Run the following command to start the containers and launch your hidden service:
docker-compose up -d
- Access your hidden service through the generated .onion address. You can find the address in the Tor logs by running:
docker-compose logs tor
This project is for educational and demonstrative purposes. When deploying hidden services in production environments, additional security measures and configurations are recommended.
Contributions and improvements are welcome! Feel free to open issues or pull requests if you have suggestions or enhancements.