Getting started
Deployment
Ship the template as a Node server, as a static site or on a serverless platform.
Nuxt builds through Nitro, which can target almost any host. Pick the mode that matches where you deploy.
Node server (SSR)
This is the default and the most complete mode: every page is rendered on the server, the auth cookie is read on the first request and nothing flashes on load.
$npm run build$node .output/server/index.mjs
The server listens on port 3000. Change it with the PORT variable. The .output/ folder is self-contained: copy it to your server and run it with Node, no node_modules needed.
Memory
Give the server a heap limit that fits your machine, about half of its memory:
$node --max-old-space-size=512 .output/server/index.mjsWithout a limit, V8 only collects garbage when it needs to and lets the heap grow up to its own ceiling: under 15 requests at a time the template grows to about 1.3 GB, while with --max-old-space-size=256 it serves the same traffic at about 420 MB. On a container with 1 GB that difference is a restart under load, not a leak.
Runtime variables
Every NUXT_PUBLIC_* value can be overridden when the server starts, without rebuilding:
$NUXT_PUBLIC_API_BASE=https://api.example.com PORT=8080 node .output/server/index.mjsStatic site
generate pre-renders every page Nuxt can reach into plain HTML:
$npm run generateUpload .output/public/ to any static host. The demo session lives in a cookie, so sign-in keeps working on the client, but the first paint of signed-in pages is rendered without a user. Prefer the Node mode for a real authenticated product.
Vercel, Netlify and others
Nitro detects Vercel, Netlify, Cloudflare Pages, AWS Amplify and Azure automatically when you deploy from a Git repository, so the default build command works:
Setting | Value |
|---|---|
| Build command | npm run build |
| Output directory | .output (detected automatically) |
| Node version | 24 |
| Environment variables | The NUXT_PUBLIC_* values from your env/.env |
For any other host, set NITRO_PRESET (for example NITRO_PRESET=cloudflare_module) before npm run build. The Nitro deployment guide lists every preset.
Security headers
Every response carries the headers in SECURITY_HEADERS (nuxt.config.ts), applied through routeRules, so Nitro also writes them to the _headers file of static hosts:
Header | Value | Why |
|---|---|---|
Content-Security-Policy | frame-ancestors 'self'; base-uri 'self'; object-src 'none' | No other site can frame the login, and no injected <base> or plugin can take over. |
X-Frame-Options | SAMEORIGIN | The same frame rule for older browsers. |
X-Content-Type-Options | nosniff | Browsers do not guess a file type from its content. |
Referrer-Policy | strict-origin-when-cross-origin | Other sites see only your domain, never the full path. |
Permissions-Policy | camera=(), microphone=(), geolocation=(), payment=() | Blocks browser APIs the template does not use; enable the ones your product needs. |
Strict-Transport-Security | max-age=31536000 (production builds only) | Browsers always use HTTPS for your domain. |
The policy leaves scripts and styles open because Nuxt writes its payload inline. For a full script-src with nonces, add the nuxt-security module and keep these values.
Split the sales page and the demo
To sell the template, you can serve the sales page as a static site and the demo with SSR on another domain, for example example.com and demo.example.com. Both are built from the same code; two variables tell each one where the other lives.
Site | Build | Variables |
|---|---|---|
| Sales page | npm run generate on a static host | NUXT_PUBLIC_SITE_URL=https://example.com, NUXT_PUBLIC_DEMO_URL=https://demo.example.com, NUXT_PUBLIC_DOCS_URL=https://docs.example.com |
| Demo | npm run build on an SSR host | NUXT_PUBLIC_SITE_URL=https://demo.example.com, NUXT_PUBLIC_SALES_URL=https://example.com, NUXT_PUBLIC_DOCS_URL=https://docs.example.com |
| Documentation | npm run docs:generate | NUXT_PUBLIC_SITE_URL=https://docs.example.com, NUXT_PUBLIC_DEMO_URL=https://demo.example.com |
On the sales page, useLandingContent() rewrites every landing link to an app page (to, href and url starting with /) to the demo URL, and every /docs link to the documentation, through resolveLandingLinks() in utils/landing-links.ts. An absolute to opens in the same tab; an absolute href opens a new one. On the demo, / redirects to the sales page, AppDemoReturnBar links back to it and every page is marked noindex so search engines only index the sales page.
Sell on a marketplace
A marketplace has its own checkout, prices and licenses, so the demo you link from its product page must not show your pricing or send buyers to your own checkout. Build that demo with NUXT_PUBLIC_MARKETPLACE_URL set to the product page; the code and the content stay the same as on your own site.
$NUXT_PUBLIC_MARKETPLACE_URL=https://store.example.com/products/my-template npm run buildEvery item of a landing can carry channel: 'direct' (only on your own site) or channel: 'marketplace' (only on the marketplace): sections, actions, menu items and FAQ entries. With the variable set, useLandingContent() drops the direct items through applyLandingChannel() in utils/landing-channel.ts, every link to a dropped section (such as #pricing) points to the product page, and the offers of the structured data go too. The buy button of AppDemoReturnBar points to the product page as well. Without the variable, the marketplace items are the ones dropped.
The sales page marks its pricing section, its Pricing menu item, the hero button with the price and the FAQ entries about its own licenses and support as direct, and adds a hero button without the price as marketplace. Check the rules of the marketplace before you publish: some ask for a demo without links to other stores.
Docker
FROM node:24-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:24-alpine
WORKDIR /app
COPY --from=build /app/.output ./.output
ENV PORT=3000
ENV NODE_OPTIONS=--max-old-space-size=512
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]
Deploy the documentation
The documentation is its own Nuxt app, so it deploys on its own URL. Build it with npm run docs:build and run node docs-site/.output/server/index.mjs, or pre-render it with npm run docs:generate and upload docs-site/.output/public/. Set these variables to link it to your demo and your repository:
Variable | Used for |
|---|---|
NUXT_PUBLIC_DEMO_URL | The Live demo button and every “View in the demo” link. |
NUXT_PUBLIC_DOCS_REPO_URL | Turns the source file chips into links to your repository, for example https://github.com/you/app/blob/main. |
NUXT_PUBLIC_DOCS_NAME | The product name shown in the documentation. |
Continuous integration
The project ships two GitHub Actions workflows in .github/workflows/. They run as soon as you push the project to a GitHub repository, with the Node version from .nvmrc:
Workflow | When | What it runs |
|---|---|---|
ci.yml | Every push to main and every pull request. | npm run lint, npm run format:check, npm run typecheck and npm test. The full template also checks the docs types and generates a starter to lint, typecheck and test it. |
e2e.yml | Every push to main, or by hand from the Actions tab. | npm run test:e2e (build plus Playwright in Chrome). When it fails, the report is attached to the run for a week. |
Both set NODE_OPTIONS=--max-old-space-size=6144: nuxt typecheck and the build need more than the 2 GB that Node gives itself by default on the runner, and stop with "JavaScript heap out of memory" without it. Keep that line if you copy the workflows to another CI.
The runners use Linux, the same system as Netlify, Cloudflare or Vercel, so a problem that only shows up in a Linux build fails here before it reaches your site. For the deployment itself, connect your repository to your host: Netlify, Cloudflare Pages and Vercel build every push to main and give each pull request a preview URL, with no workflow to maintain.