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.
cd tunnexsudo docker compose -f tunnex.yml pssudo docker compose -f tunnex.yml exec -T api \ wget -S -O- http://127.0.0.1:8080/healthzsudo docker compose -f tunnex.yml exec -T api \ wget -S -O- http://127.0.0.1:9090/readyzsudo docker compose -f tunnex.yml logs --tail=200 api node-agentsudo docker compose -f tunnex.yml exec -T node-agent wg showControl-plane and installer problems
Section titled “Control-plane and installer problems”| Symptom | Likely cause | Check or fix |
|---|---|---|
| Installer refuses the public URL | Missing scheme, loopback host, path/query, credentials, or direct HTTPS to an IP | Use a reachable http:// or https:// origin; use DNS for direct HTTPS |
| Compose interpolation fails | Required installer values are absent or tunnex.yml was copied alone | Run the public installer; keep its .env, release.json, and Compose file together |
/healthz fails | API or edge process is unavailable | docker compose ... ps and logs for api, nginx, caddy |
/healthz is 200, /readyz is 503 | Process is alive but PostgreSQL is unusable | Read the named readiness reason; check postgres health and logs |
| Sign-in fails for everyone | Redis/session failure, public URL/cookie mismatch, or API failure | Check Redis, APP_BASE_URL, TLS mode, and API logs |
| Email never arrives | SMTP skipped, provider rejected sender/auth, or port mismatch | Confirm console mail state; use STARTTLS on 587, not implicit SMTPS 465 |
| Upgrade refuses an edited file | Managed tunnex.yml no longer matches the installer baseline | Restore it by re-running the current installer; move supported config to .env |
Gateway and WireGuard problems
Section titled “Gateway and WireGuard problems”| Symptom | Likely cause | Check or fix |
|---|---|---|
| Awaiting first connection | Enrollment command was not run, token expired/used, DNS wrong, or TCP 8443 blocked | Mint a new token; verify gateway DNS/clock and raw L4 reachability to 8443 |
| Gateway offline | Agent stopped, certificate/control network issue, or stale fixture | Check agent service, local identity, clock, and recent logs |
| Console healthy, no WireGuard handshake | Wrong embedded endpoint, UDP 51820 blocked, NAT/CGNAT, or peer config stale | Test 51820/udp end to end; inspect wg show; re-issue configs after endpoint changes |
| Handshake exists, private host unreachable | Missing route, forwarding, cloud return route, or access policy | Inspect both route tables and gateway forwarding; test IP before DNS |
gateway_no_egress | Full tunnel requested on a gateway that has not proved NAT/forwarding | Configure and verify egress, then create the device again |
| Site link is down | One endpoint unreachable or no fresh peer handshake | Check both gateway endpoints, firewall rules, and clocks |
unsupported_policy_version | Agent is older than the artifact it received | Upgrade the agent; the gateway installs a deny-all interlock instead of partially interpreting the artifact |
apply_failing or silent_desync | Agent lacks privileges or cannot program WireGuard/firewall state | Inspect agent logs; restore /dev/net/tun, NET_ADMIN, forwarding, and supported tooling |
| Gateway certificate expired | Agent was unable to renew for its certificate lifetime | A 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.
Device and policy problems
Section titled “Device and policy problems”- 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.
CLI errors
Section titled “CLI errors”| Message or symptom | Meaning and action |
|---|---|
no server configured | Pass --server https://... or set TUNNEX_SERVER |
not logged in / credential missing | Run tunnex login; confirm the same TUNNEX_STATE_DIR is used |
credential expired | Run tunnex login again; current CLI credentials have a 90-day lifetime |
| Browser login times out | The loopback PKCE callback was not completed on the same workstation within two minutes; use --device for remote/headless hosts |
| No organization or active gateway | The account has no usable membership or gateway; an administrator must add/fix it |
gateway_no_egress | The selected first active gateway cannot issue full-tunnel configs |
| Config saved, no handshake | Check device approval, embedded endpoint, and UDP reachability |
wg-quick not found | Install wireguard-tools |
tunnex up under sudo cannot find config | Preserve the user’s TUNNEX_STATE_DIR; root has a different config home |
New device create replaced a profile | The CLI intentionally stores one device.conf; recover the prior key only from your protected copy, otherwise revoke/re-issue |
| Logout warns about server revocation | Local 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.
Desktop client
Section titled “Desktop client”- Verify the downloaded checksum before installation.
- Confirm the configured server’s
/healthzis reachable and its TLS certificate is valid. - Complete browser authentication on the same desktop session.
- Inspect the client state:
Disconnected,Connecting,Connected,Reconnecting, orBlocked. - 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.
| Symptom | Check |
|---|---|
| Provider rejects redirect URI | Exact scheme, host, and callback path; no trailing-slash variation |
| Login succeeds at provider but account is not accepted | Email claim, verified-email requirement, organization membership, and account-link state |
| Configuration test fails | Issuer discovery, client ID, newly entered secret, DNS, outbound HTTPS, and clock |
| Secret field is blank after save | Expected: client secrets are write-only; blank means unchanged, not missing |
| Group policy does not update | OIDC login and directory synchronization are separate; configure supported sync and inspect its last result |
Use the callback values in SSO setup, copied exactly.
Collect a safe support bundle
Section titled “Collect a safe support bundle”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.