DocumentationTroubleshooting
Docs/Troubleshooting

Troubleshooting

Diagnose Tunnex in layers. First establish whether the control plane is alive, then whether it is ready, then whether the gateway reconciled, and finally whether the encrypted data path exchanged traffic.

Terminal window
cd tunnex
sudo docker compose -f tunnex.yml ps
sudo docker compose -f tunnex.yml exec -T api \
wget -S -O- http://127.0.0.1:8080/healthz
sudo docker compose -f tunnex.yml exec -T api \
wget -S -O- http://127.0.0.1:9090/readyz
sudo docker compose -f tunnex.yml logs --tail=200 api node-agent
sudo docker compose -f tunnex.yml exec -T node-agent wg show
SymptomLikely causeCheck or fix
Installer refuses the public URLMissing scheme, loopback host, path/query, credentials, or direct HTTPS to an IPUse a reachable http:// or https:// origin; use DNS for direct HTTPS
Compose interpolation failsRequired installer values are absent or tunnex.yml was copied aloneRun the public installer; keep its .env, release.json, and Compose file together
/healthz failsAPI or edge process is unavailabledocker compose ... ps and logs for api, nginx, caddy
/healthz is 200, /readyz is 503Process is alive but PostgreSQL is unusableRead the named readiness reason; check postgres health and logs
Sign-in fails for everyoneRedis/session failure, public URL/cookie mismatch, or API failureCheck Redis, APP_BASE_URL, TLS mode, and API logs
Email never arrivesSMTP skipped, provider rejected sender/auth, or port mismatchConfirm console mail state; use STARTTLS on 587, not implicit SMTPS 465
Upgrade refuses an edited fileManaged tunnex.yml no longer matches the installer baselineRestore it by re-running the current installer; move supported config to .env
SymptomLikely causeCheck or fix
Awaiting first connectionEnrollment command was not run, token expired/used, DNS wrong, or TCP 8443 blockedMint a new token; verify gateway DNS/clock and raw L4 reachability to 8443
Gateway offlineAgent stopped, certificate/control network issue, or stale fixtureCheck agent service, local identity, clock, and recent logs
Console healthy, no WireGuard handshakeWrong embedded endpoint, UDP 51820 blocked, NAT/CGNAT, or peer config staleTest 51820/udp end to end; inspect wg show; re-issue configs after endpoint changes
Handshake exists, private host unreachableMissing route, forwarding, cloud return route, or access policyInspect both route tables and gateway forwarding; test IP before DNS
gateway_no_egressFull tunnel requested on a gateway that has not proved NAT/forwardingConfigure and verify egress, then create the device again
Site link is downOne endpoint unreachable or no fresh peer handshakeCheck both gateway endpoints, firewall rules, and clocks
unsupported_policy_versionAgent is older than the artifact it receivedUpgrade the agent; the gateway installs a deny-all interlock instead of partially interpreting the artifact
apply_failing or silent_desyncAgent lacks privileges or cannot program WireGuard/firewall stateInspect agent logs; restore /dev/net/tun, NET_ADMIN, forwarding, and supported tooling
Gateway certificate expiredAgent was unable to renew for its certificate lifetimeA current running agent retries in-place proof-of-possession recovery every five minutes and on boot. If recovery is repeatedly refused or identity is lost, mint/set a new join token and restart or recreate the agent; token fallback is a boot path and creates a new gateway

Tunnex has no hosted relay. A gateway must be reachable through a public address, port-forward, or shared private network. A healthy control plane cannot compensate for an impossible peer path.

  • Configuration was lost: revoke and re-issue it. Private keys and one-time profiles are not retrievable.
  • Device exists but never connects: check Devices → Approvals. A client can hold a config while the device remains pending.
  • New route is absent on an old profile: CLI and standard WireGuard profiles are static. Re-issue the profile, or use a managed desktop flow where supported.
  • Access works before policies are enabled: policy enforcement starts disabled so initial connectivity is not locked out. Build and test default-deny policy, then enable enforcement deliberately.
  • A grant is revoked while the gateway agent is down: new connections are denied when the agent returns, but already-established flows can survive the agent restart until they end naturally. A live policy removal performs a scoped conntrack flush when the gateway has that capability.
  • Enforcement is re-enabled after being off: flows opened while enforcement was disabled are not retroactively flushed. Use a maintenance window when that distinction matters.
  • OpenVPN revocation appears delayed: active clients are cut at their next TLS renegotiation; WireGuard revocation removes the peer immediately after reconcile.
Message or symptomMeaning and action
no server configuredPass --server https://... or set TUNNEX_SERVER
not logged in / credential missingRun tunnex login; confirm the same TUNNEX_STATE_DIR is used
credential expiredRun tunnex login again; current CLI credentials have a 90-day lifetime
Browser login times outThe loopback PKCE callback was not completed on the same workstation within two minutes; use --device for remote/headless hosts
No organization or active gatewayThe account has no usable membership or gateway; an administrator must add/fix it
gateway_no_egressThe selected first active gateway cannot issue full-tunnel configs
Config saved, no handshakeCheck device approval, embedded endpoint, and UDP reachability
wg-quick not foundInstall wireguard-tools
tunnex up under sudo cannot find configPreserve the user’s TUNNEX_STATE_DIR; root has a different config home
New device create replaced a profileThe CLI intentionally stores one device.conf; recover the prior key only from your protected copy, otherwise revoke/re-issue
Logout warns about server revocationLocal credential was removed but server revocation could not be confirmed; ask an admin to revoke it or let it expire

The CLI has no status, doctor, or profile selector. Use sudo wg show, ip route, and the console as separate evidence.

  1. Verify the downloaded checksum before installation.
  2. Confirm the configured server’s /healthz is reachable and its TLS certificate is valid.
  3. Complete browser authentication on the same desktop session.
  4. Inspect the client state: Disconnected, Connecting, Connected, Reconnecting, or Blocked.
  5. For a blocked kill switch, reconnect or intentionally disconnect through the client so its privileged helper removes the rules cleanly.

On Windows, full-tunnel sessions intentionally refuse gateway re-home rather than partially changing the default route. Disconnect and reconnect through the desired gateway. See Desktop client.

SymptomCheck
Provider rejects redirect URIExact scheme, host, and callback path; no trailing-slash variation
Login succeeds at provider but account is not acceptedEmail claim, verified-email requirement, organization membership, and account-link state
Configuration test failsIssuer discovery, client ID, newly entered secret, DNS, outbound HTTPS, and clock
Secret field is blank after saveExpected: client secrets are write-only; blank means unchanged, not missing
Group policy does not updateOIDC login and directory synchronization are separate; configure supported sync and inspect its last result

Use the callback values in SSO setup, copied exactly.

Record versions, edition metadata, timestamps, relevant health states, bounded logs, and sanitized route/handshake output. Never include:

  • .env, master.key, session keys, or SMTP/SSO secrets;
  • join tokens, device codes, bearer tokens, or authorization URLs;
  • gateway certificates/private keys or complete WireGuard/OpenVPN profiles; or
  • unredacted user identity and private resource names unless the recipient is authorized to receive them.
Documentation

Search Tunnex docs