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 /api, /cdn, and related server paths over private networking; everything else to web |
| bittery-server | Rust API server pinned to the template's Bittery release |
| bittery-web | Web vault SPA pinned to the same Bittery release as the server |
| 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
Pin the server and web services to the same exact release tag. To update:
- Go to your Railway project dashboard
- Change both image tags to the same target release
- Redeploy both services as one coordinated update
Note
Database migrations run automatically on server startup — no manual migration step is needed.