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
- In Railway, create a project and add a PostgreSQL database.
- Add a service from the repository (it builds the
Dockerfile), or from the imageghcr.io/fr3on/imbox:latest. - Set the three variables below.
- Under Networking, choose Generate Domain.
- Open the address. The first person to sign up becomes the owner. Carry on with First run.
| Variable | Value 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_URL | https://${{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.