Build and ship your tools to your cloud
Mags Self Deploy
Developer platform, built and run by our team
Teams keep building internal tools, agents and small services, and then stall on getting them running somewhere real: a server, a domain, TLS, a database, secrets, a way to roll back. Platform-as-a-service products make that easy but put the app on someone else's infrastructure and bill for it there. We built Mags Self Deploy so a team can deploy to servers it already owns or rents with the same ease. You connect a server over SSH, draw the stack on a canvas (apps from a Git repo or a Docker image, plus Postgres, MySQL, MariaDB, Redis or Valkey), wire apps to databases, and review the deploy. Mags builds each app in a throwaway Firecracker sandbox for the server's architecture, pushes the image to the team's own registry, and rolls it out with Kamal, including HTTPS on the team's domain, health checks and one-click restore. For quick experiments, `mags deploy` puts an image on the Mags cloud with an HTTPS URL in one command.
Visit the live product
At a glance
- Product type
- Developer infrastructure: build and deploy a team's own apps and tools to its own servers, or to the Mags cloud
- Problem
- Internal tools and agents get built but not shipped: servers, TLS, databases, secrets and rollbacks are each a small project, and hosted platforms mean lock-in and their bill
- Solution
- A visual canvas over Kamal: builds run in disposable microVM sandboxes, images go to the team's registry, and apps deploy to the team's servers with HTTPS and attached databases
- Timeline
- Cloud deploys from May 2026, the self-deploy canvas from August 2026, live and iterating since
- Engineering
- 31 commits across the deploy and self-deploy services, about 8,300 lines of Go in the self-deploy service alone
- Stack
- GoKamal 2kamal-proxyDocker buildxFirecrackerPostgreSQLSSH (ed25519)GitHub OAuth / GHCR
The challenge
Shipping a tool is rarely the hard part of building it, but it is the part that most often doesn't happen. Every team rebuilds the same deploy plumbing, or hands its apps and data to a hosted platform.
Your servers, not ours
Many teams already pay for servers, or must keep code and data on infrastructure they control.
Builds are heavy and untrusted
Building arbitrary repositories needs Docker and network access, and must never run on the control plane itself.
Mixed architectures
Servers may be amd64 or arm64, and an image built for the wrong one fails at start-up.
More than one app
Real stacks are several apps and databases with connection strings between them, not a single container.
Secrets and access
Deploying means holding SSH keys, registry tokens and app secrets for someone else's servers, safely.
Our approach
We put a canvas on top of a proven deploy tool instead of inventing a new runtime. Kamal already does zero-downtime deploys, accessories and TLS well; what teams lacked was a way to describe a stack without writing YAML, a safe place to build it, and a record of what was deployed. Mags supplies those, and the generated Kamal config can always be exported, so the team is never locked in.
What we built
Connect your own servers
- Add a server by host, SSH user and port, then either let Mags generate an ed25519 deploy key (one line to add to authorized_keys) or paste an existing key.
- Mags checks access and detects the server's architecture (amd64 or arm64) before anything is built.
- The server's SSH host key is pinned on first connection and passed to every deploy.
A canvas for the whole stack
- Apps come from a Git repo (branch, Dockerfile path, build context) or a prebuilt Docker image, each with its own domain and target server.
- Databases (Postgres 16, MySQL 8, MariaDB 11, Redis 7, Valkey 8) are added as Kamal accessories with generated credentials and persistent storage.
- Drawing a wire from an app to a database injects DATABASE_URL or REDIS_URL automatically.
- Per-app port, health-check path, deploy timeout, background-service mode, startup command and environment variables, with .env upload. Everything saves automatically.
Builds in disposable sandboxes
- Each build runs in a throwaway Mags microVM with Docker and buildx, never on the control plane; if a sandbox can't start, the release fails rather than falling back.
- Images are built for the target server's architecture with a registry cache, and pushed to the team's own registry (Docker Hub, or GHCR through GitHub sign-in).
Deploy, observe, roll back
- Review a deploy for one app or the whole stack; databases boot first, then apps roll out with Kamal and health checks.
- kamal-proxy serves each app on its own domain with automatic HTTPS.
- Live status per app (queued, building, deploying, succeeded, failed), per-artifact logs, cancel, deployment history with restore, and reset for database volumes.
- Export the generated Kamal config at any time; deploy from GitHub on merge, or from GitHub Actions, GitLab CI or Azure DevOps with a CI token.
Quick deploys on the Mags cloud
- `mags deploy` turns a Docker image into an app at an HTTPS URL that stays stable across redeploys, with environment variables, volumes, memory sizing and `mags rollback`.
- `mags db create postgres|mysql|redis|mssql` gives an always-on database with generated credentials.
- Idle apps freeze after a few minutes and wake on the next request in about 1.5 seconds.
Security and operations
- Deploy keys and pasted SSH keys are encrypted at rest with AES-GCM and never returned by the API.
- Environment variables are encrypted at rest; secret-looking values are kept in Kamal secrets, not the config.
- Private and internal addresses are refused when a server is added and again after DNS resolution at connect time.
- Git sources must be HTTPS, and branch, Dockerfile path, context and image references are validated.
- Per-user rate limits on adding servers, access checks and deploys; a revision check stops a stale browser tab overwriting newer settings.
- Kamal is pinned by image digest, so every deploy runs a known version of the tool.
Results
Your infrastructure, platform ease
Teams deploy multi-app stacks with databases and HTTPS to servers they already own, from one canvas.
No lock-in
Images live in the team's registry and the Kamal config can be exported, so the stack runs without Mags if needed.
Builds isolated from everything
Every build runs in its own disposable microVM, so untrusted repositories never touch the control plane.
From experiment to production on one platform
Try an app on the Mags cloud with one command, then move it to your own servers with the canvas.
Key takeaways
-
1
Wrap a proven tool. Building on Kamal gave zero-downtime deploys and TLS from day one; the product effort went into the experience and safety around it.
-
2
Build where it can't hurt. Running builds in disposable sandboxes made arbitrary repositories safe to build.
-
3
Make leaving easy. Exportable config and the team's own registry make adoption an easy decision.
Have a process like this?
Tell us what is costing your team the most time. We will show you how we would scope it, build it and get it into production.