Repository navigation
What Changed in 3.0.1
Pull the new image and recreate the container. The compose file, the key folder, your *_TOR_SERVICE_HOSTS lines and the onion address stay as they are, and the healthcheck your compose file already declares keeps working.
The full record is in the CHANGELOG.
Tor picks a few entry guards and is meant to keep them for months: every new pick is another chance of landing on a hostile relay. Until 3.0.1 the choice was lost at every restart, because Tor's data folder is kept in memory, and HiddenForge restarts itself on purpose (a backend that moved, Tor exiting, a host reboot).
Tor's state file is now saved as tor-state in the key folder of the service whose name sorts first, every 10 minutes and when the container stops, and put back before Tor starts. It is owned by the tor user with mode 0600. Nothing needs turning on.
| Question | Answer |
|---|---|
Is it encrypted with --encrypt-keys? |
No. Someone holding the key folder learns which guards the service uses, not its key. |
Do backup and restore carry it? |
Yes, with the keys. |
Does a new address from rotate keep the old guards? |
No. rotate moves the file out with the old key, so the new address starts with guards of its own. |
| What if I delete it? | Tor chooses guards once more at the next start. Nothing else changes. |
Every visitor reaches an onion service from the same place, so a backend cannot tell one visitor from another and cannot rate-limit or block a single abuser. Set this on the tor service, for the service it applies to:
environment:
MYAPP_TOR_SERVICE_HOSTS: "80:web:80"
MYAPP_TOR_EXPORT_CIRCUIT_ID: haproxyTor then starts each connection to that backend with a PROXY protocol v1 header whose source address carries the Tor circuit ID (fc00:dead:beef:4dad::<id>). One circuit is not one person, but one abuser hammering the service usually is one circuit.
The backend must expect the header, or every request fails. For nginx:
listen 80 proxy_protocol;
limit_req_zone $proxy_protocol_addr zone=percircuit:10m rate=5r/s;haproxy is the only accepted value. Anything else is reported as an error in the container log, and the setting stays off.
The image holds only Tor, its libraries, the hiddenforge binary and the vanity generator. 3.0.0 still answered a set of older commands; 3.0.1 does not.
| Instead of | Use |
|---|---|
cat /var/lib/tor/hidden_service/<name>/hostname |
hiddenforge show --name <name>, or <name>.onion in the key folder on the host |
su-exec tor ... |
hiddenforge <command>: show, doctor and healthcheck switch to the tor user by themselves |
python3 /usr/local/bin/healthcheck.py --json |
hiddenforge healthcheck --json |
cat /etc/tor/torrc, cat /var/lib/tor/dropped-mappings
|
hiddenforge inspect --json |
The one old command kept is the healthcheck existing compose files declare, su-exec tor python3 /usr/local/bin/healthcheck.py. It runs the native healthcheck. Any other su-exec form is refused with exit 127 and a message pointing to hiddenforge <command>, and docker exec <container> sh fails with the engine's "executable file not found".
If a script of yours reads the address with cat inside the container, change it to hiddenforge show --name <service>. A deploy.sh written by an earlier hiddenforge setup waits for the address that way, so run hiddenforge setup again before reusing it.
Update the host CLI together with the image: its status and doctor read the container through hiddenforge inspect, which 3.0.0 images do not have.
Start here
Older releases
Going deeper
- The Security Model
- Verifying the Image
- Reproducing the Build
- The hiddenforge CLI
- Rootless Podman
- Backing Up Your Onion Address
- Upgrading Safely
- Running Multiple Services
Help