Run your server

Railway

Run imbox on Railway with a managed database and no server to look after.

imbox docs

Railway runs the same image as Docker Compose, with a PostgreSQL database beside it and a web address of its own. railway.json in the project root tells Railway to build the Dockerfile and to check /healthz before it switches to a new version.

Needs a public image or repository

Railway can only pull what it can reach. While the repository and the ghcr.io/fr3on/imbox image are private, a deploy works only from your own Railway account, with access to the repository.

Deploy it

  1. In Railway, create a project and add a PostgreSQL database.
  2. Add a service from the repository (it builds the Dockerfile), or from the image ghcr.io/fr3on/imbox:latest.
  3. Set the three variables below.
  4. Under Networking, choose Generate Domain.
  5. Open the address. The first person to sign up becomes the owner. Carry on with First run.
VariableValue on Railway
DATABASE_URL${{Postgres.DATABASE_URL}}, the PostgreSQL service in the same project
SESSION_SECRET${{secret(64, "abcdef0123456789")}}. Copy the generated value somewhere safe. Changing it later makes everything stored under the old one unreadable.
APP_URLhttps://${{RAILWAY_PUBLIC_DOMAIN}}. Use your own address once you add a custom domain.

The image listens on 0.0.0.0 and takes the port Railway gives it. Google, Microsoft and Resend settings are optional. See Configuration.

Update

Railway redeploys when the repository or the image tag changes. It waits for /healthz before it switches, so a release that does not start leaves the old one running. To go back, redeploy the earlier build from the service's Deployments list.

Back up

Railway's database is yours to look after. Use its backup feature, or dump it with pg_dump from your computer using the connection string in the PostgreSQL service. See Backups and restore.

If it does not start

Open the service's Deploy logs. A message naming DATABASE_URL, APP_URL or SESSION_SECRET means one of the three variables is missing. See Install and site access.