# Host on Render

> Let your agent do it: Deploy Hermitbox on Render from the repository's Blueprint. Keep its Standard web-service plan and its disk. If you can't act in my Render account, walk me through each step. When `/healthz` is healthy, have me take `HERMITBOX_BOOTSTRAP_API_KEY` from the service's Environment settings, 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.4/hosting/render.md.

Deploy Hermitbox on Render from the repository Dockerfile, with a state disk and managed Postgres.
The [root Blueprint](https://github.com/hermitbox/hermitbox/blob/c61777fdb140d97cded5ef039bce3a7e7c7a2a18/render.yaml) describes the whole service.

[Deploy on Render](https://render.com/deploy?repo=https://github.com/hermitbox/hermitbox)

## Deploy the Blueprint

1. Open the deploy link above and apply the Blueprint. To deploy your own fork instead, open
   Render's **New → Blueprint**, connect the fork and select the branch that holds `render.yaml`.
2. Keep the Blueprint's Standard web-service plan and its disk. The bundled services and a default
   sandbox need more memory than a 512 MiB instance.
3. Wait for `/healthz` to become healthy, then find `HERMITBOX_BOOTSTRAP_API_KEY` in the service's
   **Environment** settings.

## Verify the service

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

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

## Render notes

The Blueprint builds the repository Dockerfile and keeps one 10 GB state disk at
`/var/lib/hermitbox`. Render creates the Postgres database and passes its connection string to
the service as `DATABASE_URL`.

Render generates `HERMITBOX_BOOTSTRAP_API_KEY`. The key is never logged and never sent with the
public welcome page.

The image reads `RENDER_EXTERNAL_URL`, so agent and port aliases use the service's verified HTTPS
origin. Set `HERMITBOX_PUBLIC_URL` yourself when you add a custom domain.

The image's default user is root, and Render supplies the container filesystem and the disk. Host
namespaces and cgroups are not assumed, and no Docker or KVM is attached. Keep the disk attached
across deployments. [Tiers and guarantees](https://docs.hermitbox.dev/v0.2.4/hosting.md#tiers-and-guarantees) covers what runs here.

[Blueprint reference](https://render.com/docs/blueprint-spec),
[persistent disks](https://render.com/docs/disks), [pricing](https://render.com/pricing).
