Deploy
How to put Pulze online. Both versions build with one command; what differs is what the host has to do.
Next.js (pulze-nextjs) |
Vite (pulze-vite) |
|
|---|---|---|
| Build | pnpm build |
pnpm build |
| What you upload | The whole project (the host runs pnpm build) |
The dist/ folder, or the project |
| Needs | A Node.js server, or Vercel / Netlify | Any static host with a rewrite rule |
| Sign-in checks | proxy.ts on the server |
In the browser (RequireSignIn guard) |
Pulze expects to sit at the root of a domain or subdomain, for example
https://app.orbit.io, not https://orbit.io/admin. See
Serving from a sub-folder if you need that.
1. Before you deploy
-
urlinsrc/config/site.config.tsis your real address. It's used for link previews androbots.txt. -
demo: false(it already is). - Search engines: most admin apps should block them. See Branding › Search engines.
- A real sign-in provider is connected, or you're fine with the demo sign-in (any email works). See Authentication.
-
pnpm buildpasses on your computer. - Environment variables from your
.env.localare added on the host (see step 5).
2. Next.js on Vercel (recommended)
Vercel makes Next.js, so there's nothing to configure.
- Push the
pulze-nextjsfolder to a private GitHub, GitLab or Bitbucket repository. (Pulze's licence doesn't allow public ones.) - On vercel.com: Add New › Project, pick the repository.
- Vercel detects Next.js and pnpm. Leave the settings as they are. If your repository holds more than Pulze, set Root Directory to the Pulze folder.
- Add your environment variables, then Deploy.
Every push to your main branch deploys again; other branches get preview addresses.
Your own domain: Project › Settings › Domains › Add. Vercel shows the
DNS record to create at your domain provider (usually a CNAME to
cname.vercel-dns.com).
3. Next.js on other hosts
Netlify
Add a new site from your repository. Netlify detects Next.js and installs
its Next.js runtime by itself. Build command pnpm build; leave the
publish directory empty.
Any Node.js server (VPS, Render, Railway, Fly.io)
pnpm install --frozen-lockfile
pnpm build
pnpm start # serves on port 3000; set PORT to change it
Keep it running with your host's process manager (or pm2 start "pnpm start"),
and put Nginx or Caddy in front for HTTPS.
Docker
Turn on Next.js's standalone output, which copies only the files the server needs:
// next.config.ts
const nextConfig: NextConfig = { output: "standalone" }
# Dockerfile
FROM node:24-alpine AS build
WORKDIR /app
RUN corepack enable
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
FROM node:24-alpine
WORKDIR /app
ENV NODE_ENV=production PORT=3000 HOSTNAME=0.0.0.0
COPY --from=build /app/.next/standalone ./
COPY --from=build /app/.next/static ./.next/static
# Once you have a public/ folder (your logo, for example), add:
# COPY --from=build /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]
Add a .dockerignore with node_modules, .next and .env*. Then:
docker build -t pulze .
docker run -p 3000:3000 pulze
Static export (no server)
Next.js can export plain HTML (output: "export"), but you lose
proxy.ts, API routes and server sign-in checks. If you want a static
site, use the Vite version instead: it's built for that.
4. Vite on a static host
pnpm build writes the site to dist/. Any static host can serve it, as
long as every address is answered with index.html (otherwise refreshing
/apps/kanban shows the host's 404). Pulze already includes the rule for
the common hosts.
Vercel
Import the repository; Vercel detects Vite. vercel.json (already in the
project) sends every path to index.html.
Netlify and Cloudflare Pages
Build command pnpm build, output directory dist. public/_redirects
(already in the project) holds the rule:
/* /index.html 200
GitHub Pages
Use a custom domain (Settings › Pages › Custom domain), so Pulze is at the
root. Then copy index.html to 404.html after building, which is how
GitHub Pages serves single-page apps:
pnpm build && cp dist/index.html dist/404.html
Upload dist/ with the official "Deploy static content to Pages" action.
Nginx
server {
listen 80;
server_name app.orbit.io;
root /var/www/pulze/dist;
location / {
try_files $uri /index.html;
}
# Built files have a hash in their name, so they can be cached forever.
location /assets/ {
add_header Cache-Control "public, max-age=31536000, immutable";
}
}
Apache
# dist/.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [L]
Amazon S3 + CloudFront
Upload dist/. In CloudFront, add custom error responses for 403 and 404
that return /index.html with status 200.
5. Environment variables
Pulze needs none to run. You add them when you connect a backend or a
sign-in provider; each guide lists its own. .env.example in each project
shows the format.
| Rule | Next.js | Vite |
|---|---|---|
| Local file (never committed) | .env.local |
.env.local |
| Readable in the browser | starts with NEXT_PUBLIC_ |
starts with VITE_ |
| Server-only secrets (API keys) | no prefix; only in server code and proxy.ts |
don't exist: see below |
| When a change takes effect | next build (browser values), restart (server) | next build |
Never put a secret in a NEXT_PUBLIC_ or VITE_ variable. Everything
with those prefixes is copied into the JavaScript every visitor downloads.
The Vite version runs only in the browser, so its secrets belong in your
API, not in Pulze.
On the host, add the same names and values in its settings (Vercel: Project › Settings › Environment Variables), then deploy again.
6. Security headers (optional)
Hosts send sensible defaults. To add the usual headers yourself:
Next.js (next.config.ts):
const nextConfig: NextConfig = {
async headers() {
return [
{
source: "/(.*)",
headers: [
{ key: "X-Frame-Options", value: "DENY" },
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
],
},
]
},
}
Vite on Vercel (vercel.json, next to rewrites):
"headers": [
{
"source": "/(.*)",
"headers": [
{ "key": "X-Frame-Options", "value": "DENY" },
{ "key": "X-Content-Type-Options", "value": "nosniff" }
]
}
]
Netlify / Cloudflare Pages: a public/_headers file:
/*
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
A full Content-Security-Policy depends on which sign-in provider and API you use, so Pulze doesn't ship one. Each provider documents the domains it needs.
Serving from a sub-folder
Pulze's links, logo and favicon use paths from the root (/apps/kanban,
/logo.svg). To serve it under /admin:
- Next.js: set
basePath: "/admin"innext.config.ts. Links and pages follow automatically; add/adminin front of your own logo paths insite.config.ts. - Vite: set
base: "/admin/"invite.config.ts, passbasename: "/admin"as the second argument tocreateBrowserRouterinsrc/router.tsx, and prefix the logo paths. Update the rewrite rule to/admin/* /admin/index.html 200.
A subdomain (admin.orbit.io) needs none of this, which is why we
recommend it.
Troubleshooting
| You see | Why, and the fix |
|---|---|
| Vite: refreshing a page shows the host's 404 | The rewrite rule is missing. Keep vercel.json / public/_redirects, or add the rule for your host (step 4). |
| The build works locally but fails on the host | The host uses an old Node.js. Set Node 22 or 24 in its settings (Pulze includes .nvmrc with 24). |
ERR_PNPM_OUTDATED_LOCKFILE on the host |
You added a package with npm or yarn. Run pnpm install locally and commit pnpm-lock.yaml. |
A variable is undefined on the live site |
It's missing on the host, or the browser prefix is missing. Add it, then deploy again (it's read at build time). |
| Link previews show the demo address | url in site.config.ts still says https://example.com. |
| Old pages after deploying | The browser cached index.html. Hard-refresh. Hosts above don't cache index.html by default. |
Docker: Cannot find module '/app/server.js' |
output: "standalone" isn't set in next.config.ts. |