Deploy Happier
Your own Happier server to run and follow coding agents from any device
Just deployed
/data
Just deployed
/var/lib/postgresql/data
Deploy and Host Happier on Railway
Happier is an open-source (MIT) server and web app for running, following and steering coding agents such as Claude Code, Codex and OpenCode from your phone, desktop or browser. Agents keep running on your own computers and connect out to your Happier server, which syncs sessions end-to-end encrypted.
About Hosting Happier
Hosting Happier means running its Bun-based server, which serves the API, a realtime WebSocket channel and the web app on one HTTPS domain, next to a Postgres database for accounts, sessions and encrypted messages, plus a volume for uploaded files. This template builds the Happier service from a public wrapper repo that pins the official happierdev/relay-server image by version and digest, runs database migrations on start and checks /ready before traffic is switched. Anonymous sign-up is closed from the first boot: the template generates your account's secret key and registers it automatically, so nobody else can claim your server.
Common Use Cases
- Follow and answer Claude Code, Codex or OpenCode sessions from your phone while they run on your workstation
- Start and steer coding agents on several machines from one private web dashboard
- Keep your agent session history on infrastructure you control instead of a hosted relay
Dependencies for Happier Hosting
- Happier server and web app (official
happierdev/relay-serverimage,server-v0.2.21) - Postgres (Railway's own Postgres service)
Deployment Dependencies
- Happier source: https://github.com/happier-dev/happier
- Self-hosting docs: https://docs.happier.dev/self-hosting
- Template repo: https://github.com/aalfath/happier-railway-template
Implementation Details
Services:
- Happier: API, WebSocket channel and web app on the public domain; volume at
/datafor uploaded files; health check/ready. - Postgres: accounts, sessions and messages (message contents are encrypted by your devices).
After deploy:
- Open the Happier service, then Variables, and copy
OWNER_SECRET_KEY(52 characters). Treat it like a password. - Open the service's domain, choose Login — I already use Happier, then Restore with Secret Key Instead, and paste the key.
- On each computer, install the Happier CLI and point it at
https://YOUR-DOMAIN(the web app shows the exact command), or add the server in the Happier mobile or desktop app.
No prompts: secrets are generated. HANDY_MASTER_SECRET signs auth tokens; keep it stable, because changing it signs every device out. GitHub or OIDC sign-in and S3 storage are optional and described in the template repo's README.
Size: Happier idles at about 130 MB RAM, so 0.5 GB and 1 vCPU per service is enough (Free plan works).
Updates: the Happier service builds from the template repo. When a new Happier release is tested, the pinned image is bumped with a CHANGELOG.md entry, and Railway shows you an "update available" notice; you choose when to apply it. Migrations run on start.
Why Deploy Happier on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Happier on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content

