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.

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 in the encrypted Vault. 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.

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 list shows your apps.
  • npx dockhold logs streams logs for the app in this folder. Add --type build to watch a build, or --type db for the database.
  • npx dockhold open opens 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.
  • Upload rejected as too large: add a .dockholdignore to 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.0 and read PORT. See Troubleshooting.