A lightweight, easily deployable Tor relay running inside Docker containers. This repository enables you to quickly spin up and maintain a Tor relay using Docker for privacy-enhanced web traffic routing on the Tor network.
- Run your own Tor relay: Contribute to the Tor network by running your own relay node.
- Lightweight and portable: Containerized environment ensures easy setup, deployment, and portability.
- Automatic updates: Always use the latest stable Tor version.
- Custom configurations: Use your own
torrc
configuration file to fine-tune your Tor relay setup. - IPv6-ready: Supports IPv6 alongside IPv4 networking.
- Secure by default: Designed to follow best security practices.
Follow the steps below to get your Tor relay running using Docker and docker-compose
.
git clone https://github.com/steffsas/tor-docker.git
cd tor-docker
Modify the torrc
file if you want to customize your Tor relay. The default torrc
file is already set up to run a middle relay, which contributes to the Tor network.
nano torrc
With Docker and Docker Compose installed, you can launch the Tor relay using:
docker compose up -d
This will start the Tor relay in detached mode, running in the background.
Monitor the Tor relay logs to ensure it’s running smoothly:
docker compose logs -f
To stop the Tor relay, simply run:
docker compose down
The provided docker-compose.yml
is configured to map the necessary ports and persist key data across container restarts.
You can customize the Tor relay's behavior by modifying the torrc
file. For more details on how to configure your Tor relay, refer to the official Tor Project documentation.
Once your Tor relay is up and running, you can monitor its status through various services like:
Add your relay's fingerprint to these services to track its contribution to the Tor network.
To view logs and debug any issues, use:
docker logs tor-relay
- Ports in use: Ensure the ports defined in
docker-compose.yml
(e.g., 9001 for ORPort) are available on your host machine. - Firewall: Make sure that your firewall allows traffic on the required ports, both for IPv4 and IPv6.
Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request. Issues and suggestions can be reported in the Issues section.
This project is licensed under the MIT License. See the LICENSE file for details.
Get started today and contribute to making the internet more private and secure by running a Tor relay with Docker!