The repository's fly.toml runs Desk's published image on Fly.io. Before you start, read what every deployment needs.
fly.toml sets | Value |
|---|---|
| Image | ghcr.io/modelriver/desk:1 |
| Machine | One, always on: shared CPU, 512 MB |
| Volume | desk_data, 1 GB, mounted at /data, created on the first deploy |
| HTTPS | Fly's, with HTTP redirected to HTTPS |
| Health check | GET /robots.txt every 30 seconds |
| Visitor addresses | Read from Fly's Fly-Client-IP header (CLIENT_IP_HEADER), for rate limits |
Desk stays on one machine with autostop off: rate limits live in memory, and team email notifications go out a few seconds after the event.
1. Install flyctl
Install flyctl and sign in with fly auth login.
2. Create the app
In an empty folder:
curl -fsSLO https://raw.githubusercontent.com/modelriver/desk/main/fly.tomlfly launch --copy-config --no-deploy --name your-deskfly launch keeps the settings from fly.toml, asks for a region, and writes your app name into the file. App names are global on Fly, so pick your own.
3. Set the secrets
fly secrets set MODELRIVER_API_KEY=your-key \ DESK_SECRET_KEY="$(openssl rand -base64 32)" \ DESK_IDENTITY_SECRET="$(openssl rand -base64 48 | tr -d '\n')"4. Deploy
fly deploy --ha=false--ha=false keeps Desk to one machine, which it needs. The volume is created with the machine.
5. Create the first admin
fly ssh console --pty -C "desk-entrypoint node /app/scripts/create-admin.ts"It asks for the admin's email, name and password. Desk is at https://your-desk.fly.dev; open /dashboard and sign in. Your first sign-in sets up two-factor authentication.
Your own domain
fly certs add support.acme.comAdd the DNS records it prints. Once the certificate is issued, set the address Desk uses for links:
fly secrets set APP_URL=https://support.acme.comSet 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.
Set them as secrets; the machine restarts with them:
fly secrets set EMAIL_PROVIDER=resend RESEND_API_KEY=re_… \ EMAIL_FROM="Acme Support <[email protected]>" SUPPORT_REPLY_TO=support@acme.comThen check it with Dashboard → Settings → Send a test email.
Running it
- Logs:
fly logs. - Change settings:
fly secrets set NAME=value. The machine restarts with the new value. Never changeDESK_SECRET_KEY. - Another admin, or a lost password or phone: run the command from step 5 again.
- More room:
fly volumes extend <volume-id> --size 3grows the volume (fly volumes listshows the ID);fly scale memory 1024adds memory. - Pin a version: change
imageinfly.tomlto a full tag, likeghcr.io/modelriver/desk:1.0.1, and deploy. - Update:
fly deploypulls the newest image for the tag infly.toml. See Updating to do it on a schedule.