Railway runs Desk's published image directly, and can update it for you on a schedule. Before you start, read what every deployment needs.
1. Add the image
In a Railway project, choose New → Docker Image and enter:
ghcr.io/modelriver/desk:1
2. Add a volume
Add a volume to the service and mount it at /data. Desk keeps everything there: articles, notes, the database and branding.
3. Set the variables
Under Variables, add:
| Variable | Value |
|---|---|
MODELRIVER_API_KEY | Your project API key |
DESK_SECRET_KEY | The output of openssl rand -base64 32 |
DESK_IDENTITY_SECRET | The output of openssl rand -base64 48 |
CLIENT_IP_HEADER | x-real-ip, the header Railway puts the visitor's address in, so rate limits work |
RAILWAY_RUN_UID | 0 |
Railway mounts volumes owned by root. With RAILWAY_RUN_UID=0, Desk starts as root only to take ownership of /data, then runs as an unprivileged user.
4. Give it an address
Under Settings → Networking, generate a domain on port 3000, or add your own domain and create the DNS record Railway shows. Then add APP_URL under Variables with that address.
5. Create the first admin
Open the service's SSH console (with the Railway CLI, railway ssh) and run:
desk-entrypoint node /app/scripts/create-admin.tsIt asks for the admin's email, name and password. Open /dashboard on your Desk's address and sign in; your first sign-in sets up two-factor authentication.
Automatic updates
Under Settings → Image Auto Updates, Railway checks for new versions of the image and redeploys in a window you choose: at night, at weekends, any time, or your own hours. Choose patch releases only, or minor releases too. A new major version (2.x) never arrives on its own.
Set up email
Recommended. Raising and answering tickets, email verification for account lookups, and team notifications all need email (what changes without it). Use Resend, Postmark or Amazon SES, with EMAIL_FROM on a domain the provider has verified and SUPPORT_REPLY_TO set to a mailbox your team reads.
Under Variables, add:
EMAIL_PROVIDER=resendRESEND_API_KEY=re_…EMAIL_FROM="Acme Support <[email protected]>"SUPPORT_REPLY_TO=support@acme.comRailway redeploys with them.
Then check it with Dashboard → Settings → Send a test email.
Running it
- Logs: open the deployment and its Logs.
- Change settings: edit Variables; Railway redeploys with them. Never change
DESK_SECRET_KEY. - Another admin, or a lost password or phone: run the command from step 5 again.
- Pin a version: change the image to a full tag, like
ghcr.io/modelriver/desk:1.0.1. - Update by hand: Redeploy. See Updating.
- One replica. Keep the service at one replica: Desk's rate limits and database don't share across copies.