# Host on Koyeb

> Let your agent do it: Deploy Hermitbox on Koyeb. Create a persistent volume in the service's region, then one web service from the image the Koyeb service fields name, with the volume at `/var/lib/hermitbox` before the first start and the other values from the same file. If you can't act in my Koyeb account, walk me through each step. Have me read the `apiKey` from the service's logs, check `/healthz`, set `HERMITBOX_API_URL` and `HERMITBOX_API_KEY` privately for the CLI, and run `hermitbox run -- echo hello`. Never copy the key into a file or this chat. Follow the exact steps in https://docs.hermitbox.dev/v0.2.1/hosting/koyeb.md.

Deploy Hermitbox on Koyeb as one web service with a persistent volume you create first. The
[Koyeb service fields](https://github.com/hermitbox/hermitbox/blob/75b22d18abc93b8be54b6ae2324b97ed713be910/deploy/platforms/koyeb/template.md) list every value to enter.

Koyeb's deploy button can't attach a volume, so there is no Hermitbox button for Koyeb. Create the
service in the Koyeb dashboard.

## Create the service

1. Create a persistent volume in the region where the service will run.
2. Create one web service from the image the
   [Koyeb service fields](https://github.com/hermitbox/hermitbox/blob/75b22d18abc93b8be54b6ae2324b97ed713be910/deploy/platforms/koyeb/template.md) name. Attach the volume at
   `/var/lib/hermitbox` before the first start, and enter the port, route, health check, instance
   count, memory and variables from the same file.
3. Deploy, then read the `apiKey` the image prints once in **service → Logs** on its first
   successful start.

## Verify the service

```sh
curl -fsS https://<service-address>/healthz
```

It answers with `"status":"ok"`. Point the CLI at the service with its key and run
`hermitbox run -- echo hello`, as [Connect after deployment](https://docs.hermitbox.dev/v0.2.1/hosting.md#connect-after-deployment)
shows.

## Koyeb notes

The deploy-button format supports an image, variables and ports, but not a volume attachment.
Each way around that falls short:

- A bare button loses state on replacement.
- An external database still loses local identity and sandbox data.
- A volume you create first works, but needs the account steps above.

The button format has no documented generated-secret expression, so the fields leave out
`HERMITBOX_BOOTSTRAP_API_KEY` and the key appears only in the log. `KOYEB_PUBLIC_DOMAIN` gives the
HTTPS origin.

Keep one instance with its `/var/lib/hermitbox` volume, port `8080`, a writable root filesystem,
the image's default user and privileged mode off. Admission must establish actual Landlock and
seccomp support; no namespace, cgroup or KVM guarantee is inferred from Koyeb's isolation
technology. See [Tiers and guarantees](https://docs.hermitbox.dev/v0.2.1/hosting.md#tiers-and-guarantees).

[Button format](https://www.koyeb.com/docs/build-and-deploy/deploy-to-koyeb-button),
[volumes](https://www.koyeb.com/docs/reference/volumes), [pricing](https://www.koyeb.com/pricing).
