> For the complete documentation index, see [llms.txt](https://docs.hostinger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostinger.com/node.js/overview-1/nuxt.md).

# Nuxt.js

Vue framework with SSR, static generation, and universal rendering. Hostinger supports both static and server modes.

**`app_type`:** `nuxt`

## `package.json`

```json
{
  "scripts": {
    "dev": "nuxt dev",
    "build": "nuxt build",
    "generate": "nuxt generate",
    "preview": "nuxt preview"
  }
}
```

## Static generation

Pre-renders every route at build time. No server code runs at request time.

Run `nuxt generate` instead of `nuxt build`:

**hPanel settings:**

| Field            | Value      |
| ---------------- | ---------- |
| Application type | `nuxt`     |
| Build script     | `generate` |
| Output directory | `dist`     |
| Entry file       | —          |

Use when your data is known at build time and you want zero-cost hosting.

## SSR / universal

Default Nuxt mode. Runs a Node server that renders pages on each request.

**hPanel settings:**

| Field            | Value                      |
| ---------------- | -------------------------- |
| Application type | `nuxt`                     |
| Build script     | `build`                    |
| Output directory | `.output`                  |
| Entry file       | `.output/server/index.mjs` |

Use when pages depend on per-request data, user sessions, or server APIs.

## Hybrid rendering

Nuxt 3 supports per-route rendering rules via `routeRules` in `nuxt.config.ts`:

```ts
export default defineNuxtConfig({
  routeRules: {
    '/': { prerender: true },          // static at build
    '/blog/**': { isr: 3600 },          // ISR, 1 hour
    '/admin/**': { ssr: false },        // client-only SPA
    '/api/**': { cors: true },          // API routes
  },
});
```

Deploy as SSR (`build` + `.output`) — Nuxt handles the per-route mode internally.

## Notes

* Set `NITRO_PORT` or `PORT` env var if you need a specific port; Hostinger assigns one automatically.
* Node 20 or newer required.

***

*Last updated: July 21, 2026*
