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 /api, /cdn, and related server paths over private networking; everything else to web
bittery-serverRust API server pinned to the template's Bittery release
bittery-webWeb vault SPA pinned to the same Bittery release as the server
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

Pin the server and web services to the same exact release tag. To update:

  1. Go to your Railway project dashboard
  2. Change both image tags to the same target release
  3. Redeploy both services as one coordinated update

Note

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