All in One Container for Hidden Services
TORNet is all in one system to work as hidden-service. TORNet has all necessary applications such as NGINX, PHP-FPM, MariaDB to host your hidden service. And also to secure and optimize Tor connection, latest version of Vanguards is also installed along side with Tor monitoring software NYX. Also dnsmasq is handling all DNS queries over Tor connection. You may get the images from Docker Hub or GitHub / GitHub Packages.
-
It's wise to use separate Docker Network for TORNet.
docker network create PrivateNet
-
To avoid permission issues pass your UID and GID as ENV variable. Please run following commands at your terminal to get your UID and GID, if you don't know them already.
- UID:
id -u - GID:
id -g
- UID:
-
It's better not to pass your Timezone to Container, default is UTC.
-
You will get your random MariaDB/MySQL password at
/rootfolder. -
Please delete/rename the
phpinfo.phpfile atpublic_htmlafter checking everything is working fine. -
It's better to use Nyx as user
torto avoid warnings about being root and to use proper configuration file.- From the container;
- As user tor, run
nyx
- As user tor, run
- From the host system;
docker exec -u tor -it TORNet nyx
- From the container;
docker network create PrivateNet
docker run -d \
--name TORNet \
-e UID=$(id -u) \
-e GID=$(id -g) \
-v ~/docker/TORNet:/home/tor \
--hostname TORNet \
--network PrivateNet \
--restart unless-stopped \
yanik39/tornet:latest- Supervisor is controlling all services.
- You may control Supervisor with SupervisorCTL
-
Usage is possible only with root user.
-
From the container;
supervisorctl statussupervisorctl reloadsupervisorctl helpsupervisorctl restart TOR..etc
-
From the host system
docker exec -it TORNet supervisorctl statusdocker exec -it TORNet supervisorctl reloaddocker exec -it TORNet supervisorctl restart TOR..etc
-
-
Logging is disabled by default except Tor itself while Tor and Vanguards already hides/scrambles sensitive data from Tor logs. So its safe to remain on. If you may want also turn it off, edit
torrcconfig file at the Tor home folder. -
There is a useful script to manage logging for all managed services (
nginx,php-fpm,mysql/mariadbetc.).-
Usage is possible only with root user.
-
From the container;
torlog statustorlog disabletorlog enable
-
From the host system;
docker exec -it TORNet torlog statusdocker exec -it TORNet torlog enabledocker exec -it TORNet torlog disable
-
-
System starts with NoLog policy, if you like to debug the system just enable logging by running one of the following commands;
torlog enabledocker exec -it TORNet torlog enable
hsto get domain names hosted at your TORNet.nsto see listening sockets and ports.hcto manually trigger HealthCheck.
- System runs three checks to decide being healthy.
- Checks Tor Projects, Tor Check page (Which says 'Congratulations' if the connection is over Tor)
- Checks Debian Onion V3 adress
5ekxbftvqg26oir5wle3p27ax3wksbxcecnm6oemju7bjra2pn26s3qd.onion - Also checks systems own hidden service address.
- If there is many(8) consequent error occurs, Tor is going to be restarted by the HealthCheck script.
dnsmasqhandles all DNS requests and send them over Tor connection.
tor <-> nginxconnection is established with socket. Nginx is not listening any IP or port.nginx <-> php8.1-fpmconnection is established with socket.nginxis hardened, so exposing nothing.phpis hardened by disabling any settings exposes any info.php-fpmclears all ENV variables.supervisor <-> supervisorctlconnection is secured with auto generated random password.MariaDB/MySQLmysql_secure_install is done after first install. Any you get the auto generated random password at/rootfolder.- If you messed with configurations/files/folders etc. just delete file/folder to get default ones after restart of the container.
- Vanguards is hardening tor connections. I suggest also checking related Tor Blog post.
- 5-Eye countries are blocked as any kind of nodes (exit or middle). There is some warnings about this at tor logs, but safe to ignore.
- Nyx is ready to run to check tor connection with nice GUI. With proper settings at tor home folder.