Skip to content

Troubleshooting

Sam Bent edited this page Dec 3, 2026 · 13 revisions

Troubleshooting

The shipped compose files turn container logging off (logging: driver: none) so no record of your onion's activity lands on the host's disk. That means docker compose logs tor shows nothing. Start with the tools that work anyway:

hiddenforge status --container tor --keys ./tor-keys --json   # ready? and if not, why
hiddenforge doctor --container tor --keys ./tor-keys --json   # is the hardening intact?

status reports a reason whenever it is not ready, and dropped_mappings lists any service or port that was skipped. If you need Tor's own log, remove the logging: block from the tor service for the duration of the debugging session, recreate the container, and put it back afterwards.

The image holds only Tor, its libraries, the hiddenforge binary and the vanity generator, so docker exec <container> sh fails with "executable file not found". Every command inside the container is hiddenforge <command>: hiddenforge show --name <service> for the address, hiddenforge healthcheck --json for the health state, hiddenforge inspect --json for the torrc Tor runs with and any dropped mappings, and hiddenforge doctor --keys-only for the key volume.

My address isn't up yet

Most common cause: it's just not finished booting. Tor has to bootstrap to 100%, build circuits, and establish introduction points before the address is published, and fetching the network's relay descriptors can take several minutes on a slow link. hiddenforge status --json says what it is waiting for (for example bootstrap not at 100%). On a slow network it can take several minutes.

"Healthy" means more than "running": bootstrapped, a circuit built, introduction points established and the descriptor uploaded for every service, and the guard monitors running.

The .onion loads but shows an error, not my site

Tor is working; the problem is between Tor and your backend.

  • Is the backend on the internal network? It must share tor-internal with the tor container. If it's on a different network, Tor can't reach it.
  • Do the name and port match? In 80:web:80, the middle part must be the exact service name of your backend in the compose file, and the last part must be the port it listens on.
  • Did the backend just get recreated? HiddenForge re-checks the backend's address every 30 seconds and restarts itself to follow a backend that moved to a new IP, so this heals within about a minute (the address then answers again after the usual restart time). It needs the restart policy the shipped files set (restart: unless-stopped for Docker, always for Podman).

One of my services is missing

A bad service name, port or backend name is skipped, not fatal: the rest of your services still come up. hiddenforge status --json lists every skipped entry in dropped_mappings, with the reason:

  • an invalid service name (lowercase letters, digits and hyphens only, starting with a letter or digit, at most 63 characters);
  • an invalid or malformed mapping (a port out of range, or not port:name:port);
  • two variables that map to the same service name (names are lowercased and _ becomes -, so MY_APP and my-app collide);
  • a backend name that does not resolve yet. This one heals by itself: once the name resolves, HiddenForge restarts and adds the service, typically within a minute. If it never does, check that the backend is running, that its name is spelled the same as in the compose file, and that it is on tor-internal.

For the others, fix the offending variable and recreate the container. ready means every service Tor is configured with is reachable, and a dropped mapping is not configured, so the container can be ready with one service missing: also check that dropped_mappings in hiddenforge status --json is empty. With none configured at all, the container is reported unhealthy.

The container won't stay running

A bad service name or port does not stop the container. If it exits, the cause is lower-level, and startup names it: a service directory that is a symlink or a file, a directory whose permissions cannot be corrected, or a Tor that refused its configuration. Three more refusals are deliberate:

  • Key encryption at rest is on, the volume holds only the sealed key, and the container has no passphrase. It refuses to start rather than generate a new address. Check that the passphrase secret is still in the compose file and the file exists.
  • A plaintext key is still on the volume and differs from the sealed one. The container will not run with two identities; remove the one that is wrong.
  • HIDDENFORGE_VANGUARDS=full is set without TOR_SANDBOX=0.

Enable logging as above to read the one line that explains it.

Two causes that used to stop Tor are handled at startup: a service directory you created yourself is set to the private mode Tor requires, and under rootless Podman a restart does not fail on the directory a previous start prepared.

Vanguards isn't running

hiddenforge status --json reports vanguards: false. Your service still works on Tor's built-in vanguards-lite protection; it's degraded, not down. What is missing is the guard monitors (bandguards and rendguard). HiddenForge restarts them by itself; if they keep crashing it pauses for 10 minutes and tries again. Restarting the container retries at once.

Tor can't reach the network at all

The tor container needs outbound internet to reach the Tor network. Make sure it is on the tor-external network (the non-internal one). Your backend must not be on that network; only Tor. Otherwise, check for a host firewall blocking outbound connections.

Do not add seccomp=unconfined; the shipped compose files do not set it. Tor's sandbox does not need it: the runtime's default seccomp profile and Tor's own sandbox stack correctly (measured on Docker and on rootless Podman), and running unconfined only removes the filter from everything that isn't Tor.

It didn't come back after a reboot (Podman)

Podman restarts containers at boot only if their restart policy is always (the shipped Podman file sets it) and only when two things are enabled for your user, once:

loginctl enable-linger $USER
systemctl --user enable podman-restart.service

hiddenforge doctor checks all three. Docker needs nothing extra.

Permission denied reading the address (Podman)

The shipped Podman file drops DAC_OVERRIDE, so root inside the container cannot enter the tor-owned key directory. Read the address as the tor user:

podman exec <container> hiddenforge show --name myapp

or run hiddenforge show --container tor --keys ./tor-keys --name myapp on the host. Do not add DAC_OVERRIDE back. See Rootless Podman.

Nobody can reach the address after I added a client

With at least one authorized client, Tor encrypts the service descriptor to the clients' keys, so the address alone no longer reaches the service. Each client needs the private line that hiddenforge client-auth add printed once. Check who is authorized with hiddenforge client-auth list --keys ./tor-keys --name myapp, and restart the container after any change. Removing the last client opens the service again.

Nothing works and the clock looks wrong

Tor needs the host clock to be roughly correct, within about 30 minutes of real time. If the host clock has drifted, Tor can't validate the network consensus and won't bootstrap. Fix the host's time sync and restart.

Still stuck

Collect hiddenforge status --json and hiddenforge doctor --json, plus Tor's log with logging temporarily enabled, note your Docker or Podman version, and bring it to the project's channels.

Clone this wiki locally