Deploy from your computer
No repo, no git. Point the command at a folder and it goes live.
Most apps deploy straight from a GitHub repo. But if your code only lives on your machine, you don't need to create a repo first. Run one command in the project folder and Dockhold uploads it, builds it, and runs it at a live HTTPS URL. It works the same for code you wrote and code your AI tool generated. You need Node 18 or newer.
1. Sign in
From your project folder, sign in once. This opens your browser, and the command picks up the session when you approve it.
npx dockhold login
On a machine with no browser, run npx dockhold login --token and
paste an API token from Settings instead.
2. Deploy
Run this from the folder you want to ship:
npx dockhold deploy
The command packs the folder, uploads it, and waits until your app is live,
then prints the URL. Name it yourself with --name my-app, or let
Dockhold name it after the folder.
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, or traffic can't reach it. See
the Quickstart for one-line examples.
How your folder gets built
Common stacks build automatically on every account.
Next.js (standalone output), Vite, Node with a start script,
static sites and FastAPI build with no Dockerfile, free accounts included.
If Dockhold does not recognise the folder, the build says so within
seconds and names the fix.
Any other stack (Go, Django, Flask, Rust, Ruby, Deno, Bun,
Java, PHP and more) builds automatically on any account with compute
added, from $5/month. Or put a Dockerfile at the root of the
folder, which works everywhere. See
Dockerfiles and dockhold.json for
one you can copy.
On any plan, a Dockerfile at the folder root wins over
detection. To keep yours somewhere else, point at it from a
dockhold.json at the root:
{
"build": {
"dockerfile": "docker/Dockerfile.prod"
}
}
What gets uploaded
Only your project files. The command always leaves out .git,
node_modules, and any .env files, so secrets and
bulky build output never get sent. If your folder has a
.gitignore, Dockhold respects it. To exclude anything else, add
a .dockholdignore file (same syntax as .gitignore);
its rules win. Uploads are size-capped, and the command tells you the limit
and stops before you go over.
Environment variables and secrets
Your .env files are never uploaded. Pass configuration on the
command instead, and it's saved with the app:
npx dockhold deploy --env API_KEY=sk-123 --env LOG_LEVEL=info
Repeat --env for each value. For anything sensitive, you can
also set it later in the dashboard, where
secrets are stored encrypted. As with
GitHub deploys, PORT and DATABASE_URL are set by
Dockhold. Read them, don't define them.
Add a database
Need a database? Add --db and Dockhold provisions a managed
Postgres database and injects DATABASE_URL into your app.
npx dockhold deploy --db
Apps are stateless: the filesystem is scratch space and resets on every deploy and restart. Keep anything you need in the managed database, not on local disk, or turn on app storage for the one folder that survives.
Ship a new version
Change your code and run npx dockhold deploy again from the same
folder. It updates the same app in place, at the same URL. There's no
separate release step.
Other commands
npx dockhold listshows your apps.npx dockhold logsstreams logs for the app in this folder. Add--type buildto watch a build, or--type dbfor the database.npx dockhold openopens the app's URL in your browser.
Run any command with --app <id> to target a specific app
from anywhere.
This or GitHub?
Pick by where your code lives. If it's already in a GitHub repo, connect the repo instead so every push redeploys automatically. See How deploys work. Deploying from your computer is for code that isn't in a repo yet, or when you'd rather not set one up. You can always move to the GitHub flow later.
If a deploy fails
- Nothing happens after
login: approve the sign-in in the browser tab it opened. If there's no browser on this machine, use--token. - "Could not build this automatically": Dockhold looked at the folder and could not build it from one of its own recipes. The message names what it saw and the one change that fixes it. Make the change and run
deployagain, add aDockerfileat the folder root (examples here), or add compute to build any stack. - Upload rejected as too large: add a
.dockholdignoreto drop large files you don't need at runtime (datasets, media, local build caches). - App builds but won't come up: almost always the port. Bind to
0.0.0.0and readPORT. See Troubleshooting.