A Node front end doesn't need a platform of its own. On a Cipi server it is one more app, next to your Laravel and WordPress sites: built from Git on every push, served by Nginx with HTTPS, and — for a Node server — switched blue/green, so a release only gets traffic once it answers.
| What you deploy | Mode | Served by |
|---|---|---|
| A Vite SPA (React, Vue, Svelte) | spa | Nginx, from the build; unknown paths fall back to /index.html |
| A pre-rendered site (Astro, Nuxt generate, Next export) | static | Nginx, from the build; real 404s from /404.html |
| A Node server (Next.js, Nuxt, SvelteKit, Astro SSR, Remix) | ssr | Your Node process on localhost, behind Nginx, blue/green |
Before you start#
| You need | Why |
|---|---|
| A server with Cipi (install) | Ubuntu 24.04 or 26.04. Builds want memory: 2 GB of RAM for a Next.js app, more with several |
| The repository on GitHub, GitLab, Bitbucket, Gitea or Azure DevOps | Every deploy is a build of it |
| A lockfile in the repository | package-lock.json, pnpm-lock.yaml, yarn.lock or bun.lockb: the install is frozen to it |
| A domain | An A record to the server |
| For SSR: the framework's Node server | Next.js as is; Nuxt as is (Nitro's node preset); SvelteKit with @sveltejs/adapter-node; Astro with @astrojs/node in standalone mode |
1. Create the app#
The --framework preset fills the mode, the build and the start command:
# Next.js, on Node 24 sudo cipi app create --user=shop --domain=shop.example.com \ --repository=git@github.com:acme/shop.git --node=ssr --framework=next --node-version=24 # Nuxt (server), SvelteKit, Astro SSR, Remix: the same with --framework=nuxt|sveltekit|astro|remix # A Vite SPA sudo cipi app create --user=web --domain=app.example.com \ --repository=git@github.com:acme/web.git --node=spa --framework=vite # A static Astro or Nuxt-generate site sudo cipi app create --user=docs --domain=docs.example.com \ --repository=git@github.com:acme/docs.git --node=static --output=dist
| Preset | Build | Start |
|---|---|---|
next | npm run build | npx next start -H 127.0.0.1 |
nuxt | npm run build | node .output/server/index.mjs |
sveltekit | npm run build | node build |
astro | npm run build | node ./dist/server/entry.mjs |
remix | npm run build | npm run start |
vite | npm run build | — (Nginx serves dist/) |
Anything else is a flag away: --build=, --start=, --output=, --health-path= (the path that must answer below 500 before a release takes traffic, / by default), --db= for a database of the app's own. In the web panel: Apps → New app → Node, with the same presets.
With a provider token saved (Git providers), the deploy key and the webhook are already on the repository. Otherwise add the deploy key — sudo cipi deploy shop --key — as a read-only key.
2. The environment#
sudo cipi app env shop
~/shared/.env is read at build time — so NEXT_PUBLIC_*, NUXT_PUBLIC_* and VITE_* end up in the bundle — and by the server at runtime. Put your API's address, keys and feature flags there:
sudo cipi app env shop --set=NEXT_PUBLIC_API_URL=https://api.example.com sudo cipi app env shop --set=SESSION_SECRET=…
PORT and HOST are Cipi's: each slot gets its own port on 127.0.0.1 (NITRO_PORT and NITRO_HOST for Nuxt), and a value in the .env can't move the server off localhost. A change to a runtime variable takes effect with a restart; one that ends up in the bundle needs a deploy.
3. Deploy#
sudo cipi deploy shop
The branch's commit, in a folder of its own.
npm ci, pnpm install --frozen-lockfile, yarn install --immutable or bun install --frozen-lockfile, with NODE_ENV=production.
With the .env in place. Up to 30 minutes, raised per app.
SSR: the new release starts beside the one that is serving.
It must answer its health path. If it never does, it is stopped and visitors never see it.
Nginx moves to the new slot; the old one finishes its open requests and stops.
For a SPA or a static site the last three steps are one: the build folder must have an index.html, then current moves. A rollback is the same switch backwards:
sudo cipi deploy shop --rollback
Then HTTPS, once the domain points at the server:
sudo cipi ssl install shop
Hashed assets (_next/static, _nuxt, _astro, assets, _app/immutable) are served as immutable; HTML never is.
4. Push to deploy#
A push to the app's branch deploys it. Nothing is added to the project: Cipi's own receiver checks the provider's signature.
| Server | The webhook |
|---|---|
| With its own domain | https://webhooks.example.com/shop |
| Without | https://shop.example.com/cipi/webhook, once the app has HTTPS |
sudo cipi app webhook show shop # the URL, the secret, whether a push deploys sudo cipi app webhook auto shop off # deploy from CI instead
Full details: push-to-deploy.
5. Logs, restarts, Node versions#
sudo cipi node status shop # mode, commands, which slot serves sudo cipi node logs shop --lines=100 # the serving slot's output sudo cipi app logs shop --type=node # both slots, followed sudo cipi node restart shop # zero downtime: the idle slot first sudo cipi app run shop npm ls --depth=0 # a command in the live release, as the app
| Node | Command |
|---|---|
| Install another major | sudo cipi node install 24 |
| Move one app | sudo cipi app edit shop --node-version=24, then deploy |
| Latest patch, SSR restarted without downtime | sudo cipi node upgrade 24 --restart |
| What runs where | sudo cipi node list |
Builds come from the official Node releases, checked against their published checksums. The settings can also live in the repository, in the node: section of cipi.yml.
6. A preview of any branch#
With the server's own domain set:
sudo cipi preview create shop feature/checkout-v2
The branch is built and served on https://shop-feature-checkout-v2-k3m9q.example.com, with its own .env (copied from the app's), its own slots and its own certificate. Every push to the branch deploys it; deleting the branch removes it. Preview branches has the rest — including the panel and opening one per pull request from CI.
7. Next to a Laravel API#
The usual pair — a Laravel API and a Next.js or Nuxt front end — is two apps on the same server: api.example.com and example.com, or one domain with the API behind a proxy route. Server-side calls from the Node app to the API stay on the machine. Step by step: Laravel API + Next.js or Nuxt on one server.
Troubleshooting#
| Problem | Fix |
|---|---|
| no index.html after the build | --output points at the wrong folder: sudo cipi app edit web --output=build |
| An SSR release never goes live | It must answer the health path within 60 seconds: check --start (sudo cipi node status shop) and sudo cipi node logs shop. A server that listens on a fixed port, not PORT, never answers |
| Astro or SvelteKit starts but answers nothing | The Node adapter is missing: @astrojs/node in standalone mode, @sveltejs/adapter-node |
NEXT_PUBLIC_… is empty in the browser | It was set after the build: deploy again |
| The build is killed, or slow on some days | Memory: add swap or RAM, or give the build more time — sudo cipi app deploy-config shop --build-timeout=2700 (slow builds) |
| The install fails on the lockfile | The lockfile and package.json disagree: run the install locally, commit the lockfile |
| A push doesn't deploy | sudo cipi app webhook show shop says what the provider must call and what is missing |
The reference page, with every option: Node apps.
Questions
Is this a Vercel or Netlify alternative?
For apps that run on one Node server, yes: build on push, HTTPS, previews of any branch, rollback — on a VPS with a fixed price, next to your PHP apps. What it doesn't have is an edge network: put Cloudflare in front for that.
Which frameworks?
Vite SPAs (React, Vue, Svelte), static builds (Astro, Nuxt generate, Next export, Eleventy), and Node servers: Next.js, Nuxt, SvelteKit (adapter-node), Astro (the Node adapter, standalone) and Remix. Anything with a build command and a start command works with --build and --start.
Is it really zero downtime for a Node server?
Yes. Each app has two slots. A deploy starts the new release on the idle one, waits until it answers its health path, switches Nginx, then lets the old one finish its requests. A release that never answers never gets traffic.
Which package manager?
npm, pnpm, Yarn or Bun — whichever lockfile the repository has; the install is frozen to it.
Where do environment variables go?
In ~/shared/.env, edited with sudo cipi app env shop. It is read at build time (for NEXT_PUBLIC_*, VITE_*) and by the server at runtime. PORT and HOST are set by Cipi.
Does it need a database?
No. Add one with --db when the server reads it directly (Prisma, Drizzle); a front end that calls a Laravel API needs none.
Can it share a domain with a Laravel API?
Yes: one app per domain and a proxy, or two domains. Laravel API + Next.js or Nuxt walks through both.