> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Start with ephemera doctor. Then the errors you're most likely to see, and what to do about each.

## Run ephemera doctor

```bash theme={"theme":"css-variables"}
ephemera doctor
```

```text theme={"theme":"css-variables"}
ok    login   server https://api.ephemera.run (from saved login), token from saved login
ok    server  https://api.ephemera.run answers in 125ms
ok    token   accepted, name my-laptop
ok    hosts   lab-1 is online, its key is pinned, and https://10.0.0.12:7701 answers in 4ms
```

It checks, in order, the saved login, the central server, the token, and each host: online, key pinned, and reachable from this machine, with a TCP connection, a small request and a larger one, so a firewall and an MTU problem get different fixes. For the first check that fails, it prints what's wrong and how to fix it, and exits 1. `--json` prints the same checks for scripts.

## Errors

> [accordion] invalid token; run ephemera login
>
> The token was revoked, or this machine was never signed in to this server. Sign in again:
>
> ```bash theme={"theme":"css-variables"}
> ephemera login
> ```
>
> If `EPHEMERA_TOKEN` or `EPHEMERA_SERVER` is set in your shell, it overrides the saved login. Check with `env | grep EPHEMERA`.

> [accordion] no host can take a sandbox
>
> When every host in your account is offline, `ephemera run` and `ephemera dev` say which, and when it was last seen:
>
> ```text theme={"theme":"css-variables"}
> ephemera: no host can take a sandbox: your only host, lab-1, is offline: it was last seen 4 days ago; on that machine: systemctl status ephemera-host
> ```
>
> `ephemera login` prints the same note when it signs you in, so you find out before the first run. `ephemera hosts` lists every host with when it was last seen. On the host, check the agent is running:
>
> ```bash theme={"theme":"css-variables"}
> systemctl status ephemera-host
> journalctl -u ephemera-host -n 50
> ```
>
> A host that says `connection to central server lost; reconnecting` keeps trying, waiting up to a minute between tries. A host the central server has no record of, because it was removed, says so in its log: join it again with a new code.
>
> If a host is online but the error is `none of this account's hosts is connected with room for a sandbox`, every online host is full. Destroy a sandbox (`ephemera ls`, `ephemera rm`), or raise the host's `--capacity`.

> [accordion] The CLI can't reach a host
>
> Your laptop sends files and reads output straight from the host, at the address the host gave when it joined (`ephemera hosts` lists it). The host's connection to the central server can be fine while your laptop can't reach it. `ephemera doctor` tries the host in three steps, and says which one failed:
>
> | Doctor says | What's wrong | Fix |
> | - | - | - |
> | `a TCP connection to 10.0.0.12:7701 got no answer` | Something on the way drops the connection | Allow tcp:7701 from this machine to the host: in the host's firewall, your cloud provider's firewall or security group, or your VPN's access rules. For a tailnet, see [the access rule](/docs/self-hosting.md#let-your-laptop-reach-port-7701) |
> | `nothing is listening at 10.0.0.12:7701` | The machine answers, but the host agent isn't running on that port | On the host: `systemctl status ephemera-host` |
> | `TCP to 10.0.0.12:7701 connects, but the TLS handshake got no answer` | Large packets don't get through, usually an MTU too big for the path | Lower the MTU of the interface you reach the host through: `sudo ip link set <interface> mtu 1200` |
> | `small requests to 10.0.0.12:7701 work, but an 8 KB one got no answer` | The same: small packets pass, full-size ones are dropped | The same |
>
> The MTU problem is most common on a VPN or tunnel; WSL2's `eth0`, for one, can have an MTU of 1280. It also makes SSH hang at key exchange, which is a quick way to recognise it.
>
> If you can SSH into the host, you can also skip the network: run `ephemera` on the host itself. See [Use it over SSH](/docs/guides/hosts.md#use-it-over-ssh).

> [accordion] host lab-1's key changed
>
> The host presented a different key from the one this CLI pinned. If you rebuilt the host or joined it again, that's expected; accept the new key:
>
> ```bash theme={"theme":"css-variables"}
> ephemera trust lab-1
> ```
>
> If you didn't, don't: something may be between you and the host.

> [accordion] A command can't reach the internet
>
> That's the default. The end of the run names what was blocked:
>
> ```text theme={"theme":"css-variables"}
> ephemera: network: 0 allowed, 1 blocked
> ephemera:   blocked registry.npmjs.org:443 (the sandbox has no network; add --allow registry.npmjs.org)
> ```
>
> Add the host with `--allow registry.npmjs.org`. With an allow list that doesn't have it yet, the reason reads `registry.npmjs.org:443 is not on the sandbox's allow list`. If the summary shows nothing at all, the program ignores proxy settings; Node.js's built-in `fetch` needs `--env NODE_USE_ENV_PROXY=1`. See [Network access](/docs/guides/network.md).

> [accordion] allow lists need the firecracker backend
>
> The host runs the Docker backend, which is for building ephemera only. Run the host with `--backend firecracker`; the installer does.

> [accordion] limit reached
>
> The token has a limit on sandboxes at once or on sandbox-minutes a day:
>
> ```text theme={"theme":"css-variables"}
> limit reached: ci may run 2 sandboxes at once; destroy one first
> limit reached: ci has used today's 600 sandbox-minutes; it resets at midnight UTC
> ```
>
> `ephemera usage` shows the token's use and limits. To change them, make a new token with other limits in the dashboard and revoke the old one, or, on a server you run, use `ephemera-server token limits`. See [Tokens and CI](/docs/guides/tokens.md).

> [accordion] the code expired before it was approved
>
> A sign-in code from `ephemera login` works for 10 minutes. Run `ephemera login` again and approve the new code.

> [accordion] ephemera run exits 125
>
> 125 means ephemera itself failed before or around your command: the message above it says why. Your command's own exit codes pass through untouched; 124 means `--timeout` stopped it.

## Still stuck

Open an issue on [GitHub](https://github.com/pyjeebz/ephemera/issues) with the output of `ephemera doctor` and `ephemera version`. Neither prints your token.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.