1.8 KiB
1.8 KiB
Onion Service Setup
This folder contains a Dockerized setup for hosting an Onion Service using Tor and Nginx. The service is designed to be secure and lightweight, leveraging Docker's isolation and Tor's anonymity.
Overview
The setup includes:
- Nginx: Serves static files from the
site/
directory. - Tor: Configured as an Onion Service to route traffic anonymously.
- Docker Compose: Manages the services and their dependencies.
Prerequisites
- Install Docker and Docker Compose on your system.
- Ensure you have a basic understanding of Docker and Tor.
Setup Steps
-
Clone this repository or copy the files to your local machine.
-
Navigate to the
onion-service/
directory. -
Update the
.env
file with appropriate values forNGINX_UID
andNGINX_GID
if needed. -
Run the
setup.sh
script to initialize the environment and set up necessary configurations../setup.sh init
The
setup.sh
script performs the following tasks:- Sets up the required directory structure.
- Ensures proper permissions for the
data/tor/
directory.
-
Start the services using Docker Compose:
docker-compose up -d
-
Access your Onion Service using the
.onion
address generated by Tor. The address can be found in thedata/tor/tor/hostname
file after the services are running.
Directory Structure
site/
: Contains the static files served by Nginx.tor/
: Contains Tor configuration and data.nginx.conf
: Configuration file for Nginx.docker-compose.yml
: Docker Compose file to manage the services.setup.sh
: Script to initialize the environment.
Notes
- The Nginx service is configured to run with minimal privileges for enhanced security.
- The Tor service is set to read-only mode to prevent unauthorized modifications.