Deploy a Next.js or Nuxt application
Connect a Next.js, Nuxt or Node repository, set its start command, and understand what happens when it does not start.
Deploy a Next.js or Nuxt application
strackt runs a Next.js, Nuxt or other Node application as a server of its own, behind Caddy, which serves your domain and handles HTTPS. Each application has its own port, so several Node applications can run behind the same Caddy on one server. Every deploy installs your dependencies, builds the application, starts it, and checks that both the process and its serving route through Caddy answer before calling the deploy done.
Connect the repository
Create an application and connect the repository. strackt reads it and shows what it found:
- Next.js application when the project depends on
next. - Nuxt application when it depends on
nuxt. - Node.js application for any other Node server, such as Express, Hono or
NestJS, whose
package.jsonhas astartscript.
The card also shows the Node version and the package manager strackt will use.
The Node version comes from engines.node in package.json, then from
.nvmrc or .node-version. With none of them, strackt uses Node 24.
The package manager follows your lockfile: pnpm-lock.yaml means pnpm,
yarn.lock means Yarn, and anything else means npm. Commit the lockfile. A
deploy without the lockfile for your package manager stops before installing
anything.
If the detected type is wrong, choose Not right? Change type and pick another one.
Repositories strackt does not deploy this way
- A PHP application — a repository with a
composer.jsonor anindex.php— uses itspackage.jsonto build front-end assets. strackt treats it as Laravel or PHP, or asks you to choose when it cannot tell. - A workspace with several applications (a
workspaceslist inpackage.json, or apnpm-workspace.yaml) has no single application at its root. strackt names the workspaces it found and does not let you continue. Connect a repository that holds one application. - A static export (
output: 'export'innext.config, ornuxt generate) builds files with no server to start, so strackt does not detect it as a Node application. - A
package.jsonwithout astartscript and without Next.js or Nuxt only builds assets, so strackt does not treat it as a server. If yours is a server, add astartscript or choose Node.js application yourself.
Listen on the port in PORT
strackt gives your application a port and sets it in the PORT environment
variable. Your application must listen on that port. Next.js and Nuxt already
do. For your own server, read it when you start listening:
app.listen(process.env.PORT)
Do not add PORT to your environment variables. strackt refuses a deploy
whose variables set it, because your application would stop answering on the
port your domain points to.
Connect a database
strackt suggests a database and cache from your package.json dependencies:
pg, postgres or @neondatabase/serverless suggest PostgreSQL, mysql2,
mysql or mariadb suggest MySQL, and ioredis or redis suggest a cache.
With Prisma, the provider in prisma/schema.prisma decides. Confirm the
suggestion under Services before your first deploy. If your
DATABASE_URL or REDIS_URL already points at a database or cache hosted
elsewhere, strackt suggests nothing for it.
Connecting a database or cache adds its address to your config template automatically, the first time you connect one:
DATABASE_URL=${strackt:mariadb.url}
PostgreSQL uses ${strackt:postgresql.url}, and a cache uses
REDIS_URL=${strackt:valkey.url}. Deploy again after connecting to pick it up.
strackt only ever adds the line once, and only when your template doesn't already mention it — so if you've removed it on purpose, or your template already had content before you connected anything, it stays exactly as you left it, and you add the token yourself. An application that already had a database or cache connected before this behavior shipped also keeps its existing template unchanged; add the token by hand the same way.
Set the start command
strackt starts your application with the command for its type:
| Type | Start command |
|---|---|
| Next.js | npm start (pnpm start or yarn start with those package managers) |
| Nuxt | node .output/server/index.mjs |
| Node.js | npm start (pnpm start or yarn start with those package managers) |
To use a different command, open Settings → Source & triggers, change Start command, and save. It applies on your next deploy. Until then, the running version keeps the command it started with.
The command runs from the root of your release and must stay on one line.
What the serving check covers
strackt checks one enabled serving domain on the server. It uses the HTTPS route for a directly hosted domain, or the local HTTP origin when your domain is served through the strackt edge. Temporary domains use their HTTP route. A healthy Node process with a failing Caddy route fails the deploy check too.
HTTPS certificate validation stays enabled. If the deploy log reports a certificate-validation failure, check the domain's certificate configuration before deploying again. The serving check does not verify public DNS, your public firewall, CDN availability or the full internet path to your application.
When a deploy does not start
A deploy that fails before your application starts, such as a build error, changes nothing that is live. A deploy that fails while starting ends in one of these outcomes, and the deploy log has the details for each:
| What you see | What it means | What to do |
|---|---|---|
| The new version is answering | The new version is live. If the deploy also says it did not finish cleanly, something after the start went wrong. | Nothing, or read the deploy log when it did not finish cleanly. |
| The version that was live before is answering | The new version did not start answering in time, so strackt put the previous version back. | Read the deploy log, fix the cause, and deploy again. |
| Nothing is answering yet | Your application has not started answering. This is usually a first deploy that could not start. | Check that it listens on PORT and that the start command is right, then deploy again. |
| strackt could not confirm which version is live | strackt could not tell which version is answering. | Read the deploy log for the details. |
A Nuxt application built for another host, such as a leftover Vercel
nitro.preset, never produces the server strackt starts, so it never starts
answering. Remove the preset and deploy again.
Was this helpful?