Railway Quick Start
The fastest way to self-host Bittery is with Railway. The template provisions everything you need — Caddy reverse proxy, server, web app, database, object storage, and networking — in a single click.
Deploy in under 5 minutes
Click the deploy button
Open your instance
The template uses Caddy as the only public entry point. Railway terminates HTTPS at the edge; Caddy reaches server and web over private networking (server.railway.internal, web.railway.internal) — not the Docker Compose hostnames server:3000 / web:8080.
Open the caddy service's public URL (or add a custom domain under Settings → Networking).
Create your account
Create your first account in the browser. The first user on a self-hosted instance has full access.
Tip
Railway's free tier includes enough resources to run a personal Bittery instance. For teams, consider upgrading to a paid plan for more memory and storage.
What the template includes
| Service | Details |
|---|---|
| caddy | Public reverse proxy — routes /rpc, /sync, and /cdn to server over private networking; everything else to web |
| bittery-server | Rust API server from ghcr.io/bittery-org/bittery-server:latest |
| bittery-web | Web vault SPA from ghcr.io/bittery-org/bittery-web:latest |
| PostgreSQL | Managed Railway Postgres instance |
| Object storage | S3-compatible bucket for file attachments |
Environment variables
The template pre-configures most variables, including DATABASE_URL, storage bucket credentials, and Caddy upstream reference variables (SERVER_PRIVATE_DOMAIN, WEB_PRIVATE_DOMAIN, etc.). You may want to customize:
| Variable | Service | Default | Description |
|---|---|---|---|
JWT_SECRET | server | Auto-generated | Secret for signing auth tokens |
CORS_ORIGIN | server | Caddy public URL | Allowed origins for API requests |
SHARE_LINK_DAILY_LIMIT | server | 50 | Max shared links per user per day |
Note
VITE_SERVER_URL is not needed. Caddy serves the web app and API on the same domain, so the SPA talks to the server via the current origin.
See Configuration Reference for the full list.
Updating
Railway automatically tracks the latest Docker image tag. To update:
- Go to your Railway project dashboard
- Click Redeploy on each service
- Railway pulls the latest images and restarts
Note
Database migrations run automatically on server startup — no manual migration step is needed.