Dokploy
Deploy the node build to a self-hosted Dokploy instance on your own VPS, with Traefik fronting it and the schema migrate riding the start command.
Dokploy is an open-source, self-hosted Heroku/Vercel alternative that runs on your own VPS via Docker. The boilerplate has no Dokploy-specific code - Dokploy just runs the standard node build, the same long-running Docker artifact you'd run anywhere.
Dokploy is a deploy host, not a CLI target. Build with the node deploy target; this page wires that build into Dokploy. There is no --demo-style platform flag for it.
Prerequisites
- A VPS you control (a fresh Ubuntu host is typical).
- A database - self-hosted Postgres or managed Neon/Supabase. See Database.
- A cache - self-hosted Redis or managed Upstash. See Caching.
Dokploy ships Traefik as its built-in reverse proxy, so you do not run your own for the fullstack case.
Deploy
Install Dokploy on the VPS. Run the official one-line installer on a clean host, then open the dashboard and create your admin user.
curl -sSL https://dokploy.com/install.sh | shCreate the application. In the Dokploy dashboard create a new Application and point it at your Git repository, or at a prebuilt image you pushed to a registry. The monorepo ships one Dockerfile per deployable app, so set the build's Dockerfile path to the schema owner: the frontend app's Dockerfile for fullstack, or apps/backend/Dockerfile for separate.
Set production environment variables. Add the required runtime vars (table below) under the application's Environment tab. You supply your own database and cache here - Dokploy does not provision them. See Environment variables.
Confirm the schema step rides the start command. The CLI prepends pnpm -F @repo/database migrate onto the owner app's start script (packages/cli/src/generators/deploy-scripts.ts). The image's CMD is pnpm start, so migrations run on every container start - no manual migrate step in Dokploy.
Point a domain and enable TLS. Add a Domain to the application, target the app's port (frontend 3000; backend 3010 for separate), and toggle HTTPS to have Traefik issue a Let's Encrypt certificate.
Deploy. Trigger the deploy. The image builds, CMD pnpm start migrates the schema, then boots the server; Traefik routes your domain to it.
The image defines a Docker HEALTHCHECK (90s start-period to cover the migrate window) so Traefik holds traffic until the container is healthy - avoiding 5xx responses while the schema step is still running.
Required environment variables
These must be set on the Dokploy application before the first deploy:
| Variable | Purpose |
|---|---|
DATABASE_URL | Postgres connection string - required by the CMD-time migrate. See Database. |
REDIS_URL or UPSTASH_REDIS_REST_URL + UPSTASH_REDIS_REST_TOKEN | Cache + rate limiting. See Caching. |
BETTER_AUTH_SECRET | Auth signing secret - min 32 chars. |
INNGEST_APP_ID, INNGEST_EVENT_KEY, INNGEST_BASE_URL | Background-jobs connection (all three required; INNGEST_BASE_URL must be a valid URL). See Background jobs. |
See Environment variables for the complete list, including OAuth, mail, payments, and storage providers.
Never deploy a build generated with --demo. Its schema step is a destructive reset && push --force that wipes the database on every container start.
Separate architecture
For the separate architecture you deploy two Dokploy applications - the standalone Hono backend (apps/backend, EXPOSE 3010) and the frontend - each with its own domain. Traefik fronts both; route api.yourdomain.com (or /api/) to the backend and strip prefixes as needed.
- Separate backend - wiring
API_URLandTRUSTED_ORIGINSacross the two apps. - Reverse proxy - host/path routing and TLS rules that apply to Traefik too.