Quickstart
From a GitHub repo to a live URL. No servers, no pipeline to set up.
Dockhold takes any web app, builds it, and runs it at a public HTTPS URL. It works the same for code you wrote and code your AI tool wrote. There are two ways to deploy: connect a GitHub repo and push to your main branch, or run one command in a local folder. This guide covers the GitHub path. To ship a folder with no repo, see Deploy from your computer.
1. Put your app on GitHub
Push your project to a GitHub repository. One requirement matters above all others:
Your app must listen on 0.0.0.0 and read its port from the
PORT environment variable. Don't hardcode a port, and don't
bind to localhost — a container that only listens on
localhost can't receive traffic.
A couple of examples:
// Node / Express
const port = process.env.PORT || 3000;
app.listen(port, "0.0.0.0"); # Python / FastAPI (uvicorn)
import os
uvicorn.run(app, host="0.0.0.0", port=int(os.environ["PORT"])) 2. Connect the repo
Go to the dashboard, connect your GitHub account, and pick the repository. Dockhold auto-detects common stacks (Node, Python, Go, Rust, Ruby, Deno, Bun, Java, PHP) and builds them for you — no Dockerfile required.
If you want to control the build, you have two options:
- Add a
Dockerfileat the repo root — it takes priority over auto-detect. -
Keep a Dockerfile elsewhere and point to it with a
dockhold.jsonat the repo root:
{
"build": {
"dockerfile": "docker/Dockerfile.prod"
}
} 3. Add configuration and secrets
Read all configuration from environment variables. Set plain config values in the dashboard. For anything sensitive — API keys, tokens, passwords — use the Vault; those values are encrypted and injected into your app at runtime, never stored in your repo.
PORT and DATABASE_URL are set by Dockhold and
can't be overridden. Read them; don't define them.
4. Add a database (optional)
If your app needs one, enable the managed Postgres database for it. Dockhold
provisions it and injects a DATABASE_URL into your app's
environment. Read that variable — don't run or configure your own database.
Apps are stateless: the container filesystem is scratch space and is lost on every restart and deploy. Persist anything you need to keep in the managed database, not on local disk.
5. Deploy
Dockhold builds your app and launches it at
https://<your-app>.dockhold.app with HTTPS handled for
you. After the first deploy, every push to your main branch redeploys
automatically.
Next
- Agent rules — drop these into your AI coding tool so it generates Dockhold-ready apps.
- All docs