Deploy to VPS (systemd + Caddy)
No platform at all. `grit deploy` builds, uploads and runs it as a service.
The cheapest and fastest production setup for a single-binary Grit app. No Docker, no daemon, no control plane — one binary under systemd behind Caddy.
Teams that need rollbacks, several environments, or more than one machine without building that themselves.
Setup
- 1
Let the CLI do it
`grit deploy` cross-compiles for linux/amd64, uploads over SSH, writes a systemd unit and configures Caddy with automatic TLS. It is the shortest path from a laptop to a live URL that Grit has.
grit deploy --host your-server.com --user deploy --domain app.example.com - 2
Or do it by hand
The full manual walkthrough — user creation, hardening, Postgres, systemd unit, Caddyfile, log rotation — is its own page.
What catches people out
A cross-compiled binary that uses cgo will not run on the server. Grit’s default SQLite driver is pure Go for exactly this reason; adding a cgo dependency breaks the build silently until it fails on the box.
There is no rollback. Keep the previous binary next to the current one and know how to swap it back before you need to.
Platform dashboards and CLI flags change faster than these docs. For anything that looks different from what is written here, VPS (systemd + Caddy)'s own documentation is the authority: /docs/infrastructure/deployment
