Host on Railway
Deploy Hermitbox on Railway from its published template, https://railway.com/deploy/hermitbox, as one service with one state volume.
Deploy Hermitbox on Railway as one service with one state volume.
The published template sets every value in the Railway fields and generates the first API key. After it deploys, give the service 2 GiB of memory to start, then verify the service.
Create the service yourself
Without the template:
- In Railway’s Template Composer, or in a new project, add one service from the image the Railway fields name, with one replica.
- Add a volume at
/var/lib/hermitbox, generate a domain with target port8080, and set the health check to/healthz. - Set the variables from the same file; outside Template Composer, leave out
HERMITBOX_BOOTSTRAP_API_KEY, whose value is a template function. Start with 2 GiB of memory for embedded Postgres, the store and sandboxes, then deploy.
Verify the service
curl -fsS https://<service-address>/healthzIt answers with "status":"ok". Point the CLI at the service with its key and run
hermitbox run -- echo hello, as Connect after deployment
shows.
Railway notes
In a template, HERMITBOX_BOOTSTRAP_API_KEY=${{secret(64)}} generates the key. Find it in
service → Variables. On a service without that variable, read the apiKey the first
successful start prints once in the service log.
RAILWAY_PUBLIC_DOMAIN gives the HTTPS origin, and the fields also set HERMITBOX_PUBLIC_URL
from it.
Keep one instance, the image’s root user, its writable container filesystem and its one state volume across redeploys. Process admission still requires the kernel policy in Tiers and guarantees; no user namespace, delegated cgroup, Docker or KVM is assumed.
$curl -fsSL https://hbx.sh | shInstall Hermitbox and set it up for me