
Deploy Happy Server
Self-hosted relay for Happy, the mobile client for Claude Code and Codex
Just deployed
/var/lib/postgresql/data
Happy Server
Just deployed
Deploy and Host Happy Server on Railway
Happy lets you run Claude Code and Codex sessions on your computer and control them from your phone, the web or desktop, with end-to-end encryption. Happy Server is the relay and sync backend between the happy CLI on your machine and the Happy apps. This template runs your own copy instead of the public Happy Cloud.
About Hosting Happy Server
This template builds the official production server (Dockerfile.server, the Rust server) from the repository and runs it next to a private Postgres:
- Happy Server on port 3000 with a public domain
- Postgres with a persistent volume, reachable only over the private network
- Database migrations run in a pre-deploy step on every deploy
- A persistent volume at /data for uploaded files (no S3 needed)
- HANDY_MASTER_SECRET generated per deployment
The first build compiles the Rust server and takes several minutes.
After deploy:
- Open https://YOUR-RAILWAY-DOMAIN/health; it should return {"status":"ok"}.
- On your computer, point the CLI at your server: set
HAPPY_SERVER_URL=https://YOUR-RAILWAY-DOMAIN(orserverUrlin~/.happy/settings.json), then runhappyorhappy daemon startand pair as usual. - In the Happy app, open Settings, set the Custom Server URL to
https://YOUR-RAILWAY-DOMAIN, then sign in or pair. - Session content is end-to-end encrypted on your devices; the server stores ciphertext.
- Optional: voice needs ELEVENLABS_API_KEY, and GitHub login needs the GITHUB_* variables described in the upstream docs.
Common Use Cases
- Control Claude Code or Codex sessions on your workstation from your phone
- Keep session sync and metadata on infrastructure you control
- Give a small team a private Happy backend
- Run Happy where the public cloud is blocked or not allowed
Dependencies for Happy Server Hosting
- Source: https://github.com/slopus/happy (MIT license)
- PostgreSQL (included)
- The Happy CLI (
npm i -g happy) and the Happy apps on your devices
Deployment Dependencies
Implementation Details
- The Rust server is one process per database (it holds a Postgres advisory lock), so keep the service at one replica.
- Redis is not needed by the Rust server, and without S3_HOST files are stored under DATA_DIR on the volume.
- HANDY_MASTER_SECRET derives auth and encryption keys; rotating it signs everyone out and breaks stored keys.
- Metrics are off; set METRICS_ENABLED=true and METRICS_PORT to expose Prometheus metrics on a separate port.
Why Deploy Happy Server 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 Happy Server 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
Happy Server
slopus/happy
