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, seeDeploy 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 thePORT environment variable. Don't hardcode a port, and don't bind to localhost. An app that only listens onlocalhost 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.

On a paid plan (any account with compute added, from $5/month), Dockhold auto-detects common stacks (Node, Python, Go, Rust, Ruby, Deno, Bun, Java, PHP) and builds them for you, with no Dockerfile required.

On a free account, add a Dockerfile at the root of your repo. Auto-detection is a paid feature, so without one the deploy stops right away and tells you. SeeDockerfiles and dockhold.json for a starting point you can copy.

To control the build yourself on any plan, you have two options:

  • Add a Dockerfile at the repo root. It takes priority over auto-detect.
  • Keep a Dockerfile elsewhere and point to it with adockhold.json at 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. If your app has to write files it keeps (a SQLite file, uploads), turn onapp storage.

5. Deploy

Dockhold builds your app and launches it athttps://<your-app>.dockhold.app with HTTPS handled for you. After the first deploy, every push to your main branch redeploys automatically.

Next