# Fide Connect troubleshooting

A Fide Connect connection passes through four stages:

1. **This device** reaches Fide Connect over the internet.
2. **Fide Connect** verifies your sign-in and host link.
3. **The host's tunnel** (`cloudflared`) forwards the request to the host.
4. **Fide on the host** answers.

When a connection fails, open **Settings → Environments**, select the environment, and choose **Details**—the first failed stage identifies the cause below. On the host itself, run `fide connect status` or check **Settings → Sharing & access**.

## The host's tunnel is offline

Fide Connect could not reach the host's tunnel (host is asleep/offline, Fide isn't running, or outbound port 7844 is blocked).

1. Confirm the host is awake and running Fide.
2. Run `fide connect status` on the host.
3. If the host was offline for 7+ days on an older version, start and update Fide on the host to recreate its tunnel.

## Port 7844 is blocked on the host

`cloudflared` connects outbound to Cloudflare on **TCP and UDP port 7844** (normal web traffic still works when 7844 is blocked).

- **Tailscale exit node**: Run `tailscale set --exit-node=` on the host or allow outbound 7844 on the exit node.
- **Work VPN / firewall**: Allow outbound TCP/UDP 7844, or bypass Fide Connect by adding a direct Tailscale route ([Reach one machine several ways](/docs/remote-access#reach-one-machine-several-ways)).

## The tunnel works, but Fide does not answer

The tunnel is up, but Fide didn't respond on `127.0.0.1` (crashed, starting up, port changed, or `T3CODE_HOST` bound only a non-loopback IP).

Restart Fide on the host (`fide service restart` for a background service) and run `fide connect status`.

## The Fide Connect address does not resolve or answer

The host's Fide Connect address failed DNS, TLS, connection, or timed out.

1. Confirm the host is online and run `fide connect status`.
2. If only the host fails, check DNS/VPN/proxy (stale DNS caches clear in ~30 minutes).
3. If the address no longer points to this host, re-link it: toggle **Fide Connect** off and on in **Settings → Sharing & access**, or run `fide connect link` and restart the server.

## This device can't reach Fide Connect

The issue is on the client device's network:

1. Check for captive portals or dead Wi-Fi.
2. Temporarily disable VPNs, firewalls, ad blockers, or DNS filters (on iPhone, test turning off Wi-Fi **Connectivity Assist**).
3. Try another network or add a direct Tailscale route ([Reach one machine several ways](/docs/remote-access#reach-one-machine-several-ways)).

## Sign-in, account, or link problems

- **Different account**: Sign in to the same Fide account on both sides (on host: `fide connect logout && fide connect`).
- **Fide Connect disabled on host**: Turn on **Settings → Sharing & access → Fide Connect** or run `fide connect`.
- **Link not yet applied**: Restart Fide on the host (`fide service restart` or restart desktop app).
- **Expired session**: Sign out and sign back in.
- **Waiting for device approval**: Approve the displayed code from an existing device or run `fide auth connect-device approve <code>` on the host ([Approve new devices](/docs/remote-access#approve-new-devices)).

## The clock is off

Fide Connect uses short-lived signed proofs. Enable automatic date and time on both the host and client device, then retry.

## The host runs an older Fide

Update Fide on the host machine ([Updating Fide](/docs/updating)).

## Fide Connect returned an error

| Error                             | Fix                                                                                                                           |
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `environment_link_limit_exceeded` | Deregister an unused host, then restart the host.                                                                             |
| `auth_invalid` / `invalid_bearer` | Run `fide connect login` (or `fide connect logout && fide connect`), then restart the server.                                 |
| Expired or invalid link proof     | Sync system clock, update Fide, and restart.                                                                                  |
| HTTP 403 (unrecognized)           | If device approval is on, update the client and approve it; otherwise check proxies/firewalls and save any Cloudflare Ray ID. |
| HTTP 408, 429, or 5xx             | Temporary—wait a few minutes for automatic retry.                                                                             |

After fixing a permanent error, restart the host (`fide service restart` or restart `fide serve`). If Fide stops when SSH disconnects, see [background-service troubleshooting](/docs/background-service#troubleshooting).

## Report a problem

Open an issue on [GitHub](https://github.com/fide/fide/issues) with:

- **Copy diagnostics** from the environment's **Details**
- Output of `fide connect status` on the host
- Trace ID (if shown)
- `~/.t3/userdata/logs/relay-client.ndjson` (tunnel tokens are already stripped)
