Deploy a static site
Plain HTML, CSS, and JS on a live HTTPS URL.
If your project is just files — an index.html with some CSS and
JavaScript — you only need a small server to hand those files out on the
port Dockhold assigns. This recipe is the whole path.
In a hurry? Start from the ready-made static-starter template — click Use this template on GitHub, then deploy it. Or follow the steps below to add this to a project you already have.
1. Add a one-line static server
Add the serve package and a start script. If you
don't have a package.json yet, create one with
npm init -y first.
npm install --save-dev serve Then in package.json:
{
"scripts": {
"start": "serve -l $PORT ."
}
} serve -l $PORT . serves the current folder (where your
index.html lives) on the assigned port, on all interfaces. If
your files live in a subfolder, point at it: serve -l $PORT public.
Your app must listen on 0.0.0.0 and read its port from the
PORT environment variable — never localhost, never a
hardcoded port. Dockhold assigns PORT at runtime; an app that
ignores it can't receive traffic.
2. Connect the repo and deploy
- Push the project to a GitHub repository.
- Open the dashboard, connect GitHub, and pick the repo.
-
Dockhold detects the Node project, runs
npm install, and starts it withnpm run start. No Dockerfile needed.
Your site goes live at https://<your-app>.dockhold.app
with HTTPS handled for you. Every later push to your main branch redeploys.
Troubleshooting
- 404 at the root: the folder you pass to
servemust contain anindex.html. Useserve -l $PORT publicif it's in a subfolder. - Build fails with "no start script": confirm the
startscript is inpackage.jsonand spelled exactly as above. - A page loads but assets 404: use relative asset paths
(
./style.css), not absolute ones tied to your local folder.
Next
- Upgrade to a Vite + React app
- Agent rules — make your AI tool generate Dockhold-ready apps.
- All recipes