Hi dev.to! I'm Sten, a developer in Norway. This is my first post here, so let me start with the thing I've been building.
Every few projects, I'd end up building preview environments for pull requests again: shell scripts, a GitHub Actions workflow, some glue to start a database and post a link. It worked, and then the next project needed it all over again. I kept waiting for a product that made this easy and still let me keep my own compose file, my own compute and my own data. It didn't show up, so I built it. It's called Stagd.
The problem it solves
Most teams have one staging environment and more changes than it can hold. Someone deploys their branch, someone else overwrites it, and the reviewer opens a link that's running somebody else's code. "Is my change on staging yet?" gets asked in the team channel every day.
The review suffers most. A pull request gets read, not tried. The designer, the product manager or the client who could have caught the problem in thirty seconds of clicking only sees it after the merge.
What Stagd does
Open a pull request, and Stagd:
- builds your images from the branch (with cache),
- starts a database and restores a seed you choose into it,
- brings your services up and gives each one that needs it a URL,
- catches the mail your app sends in an inbox on the preview, so nothing reaches a real person,
- posts the link in the pull request, and updates the same comment as each step finishes.
A typical app is live in about a minute. The preview sleeps when nobody uses it, wakes on the next visit or push, and is removed with its database when the pull request closes.
One file in your repository
There's no settings page where you click your app together. The setup is a stagd.yaml next to the compose file you already run locally:
version: 1 app: compose: compose.yaml ingress: site: { service: web, port: 3000, primary: true } api: { service: api, port: 8080 } services: postgres: seed: app-anonymized mail: {} lifecycle: { sleep_after: 2h } That gives the preview a URL for the site, one for the API, a Postgres database restored from the app-anonymized seed and an inbox for its mail. Because it lives in the repository, a pull request that adds a worker or a second URL gets a preview that already runs with it, and the change is reviewed like any other.
Postgres, MySQL, MariaDB and MongoDB all work, restored from a dump in your own blob storage.
Your compute, not ours
Previews run in your Namespace workspace, your Kubernetes cluster or a Docker host. Stagd sends the instructions and reads status and logs back, so your code and data stay on your infrastructure, and you pay your provider directly, with no markup. A cluster behind NAT connects with stagd relay, which dials out, so there are no ports to open.
Reviewers without a GitHub account
Who can open a preview is set in Stagd, not in the pull request, so a change can't open up its own access. People outside your GitHub organisation are invited and sign in with Google or a code by email.
Agents can use it too
A preview doesn't need a pull request. You can start one from any branch through the CLI, the API or the MCP server, and that makes it something a coding agent can drive: start a preview of its change, wait for it, take a screenshot, read the logs and the mail, fix what's broken and push again. By the time a person opens the pull request, the change has already been seen running.
stagd mcp install Trying it
curl -fsSL https://stagd.dev/install.sh | bash stagd login stagd init stagd init writes a first stagd.yaml from your compose file, and stagd setup shows what's left (connecting GitHub, picking a repository, connecting compute). The quickstart walks through each step, and the CLI is open source under Apache-2.0.
Stagd is in early access and free while it is. If you want the longer story, it's on the Stagd blog.
I'd love your feedback
What's your team doing for previews today: one shared staging, something home-made, or nothing at all? And what would stop you from trying something like this? Tell me in the comments, or at hello@stagd.dev. I read everything.