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 the Bittery Railway template:

Deploy on Railway

Click Deploy Now to start provisioning.

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

ServiceDetails
caddyPublic reverse proxy — routes /rpc, /sync, and /cdn to server over private networking; everything else to web
bittery-serverRust API server from ghcr.io/bittery-org/bittery-server:latest
bittery-webWeb vault SPA from ghcr.io/bittery-org/bittery-web:latest
PostgreSQLManaged Railway Postgres instance
Object storageS3-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:

VariableServiceDefaultDescription
JWT_SECRETserverAuto-generatedSecret for signing auth tokens
CORS_ORIGINserverCaddy public URLAllowed origins for API requests
SHARE_LINK_DAILY_LIMITserver50Max 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:

  1. Go to your Railway project dashboard
  2. Click Redeploy on each service
  3. Railway pulls the latest images and restarts

Note

Database migrations run automatically on server startup — no manual migration step is needed.