Rendering & Deployment
Choose between SSG, SSR, and hybrid rendering and deploy Nuxtify to static hosts, Cloudflare Workers, or Node.js servers.
Choosing a Rendering Mode
Because Nuxtify is a standard set of Nuxt modules, you can deploy with whichever Nuxt rendering mode fits your project:
- Static Site Generation (
nuxt generate): Pre-renders all routes to static HTML at build time. Best for marketing sites, blogs, and documentation sites hosted on CDNs with zero server runtime. - Server-Side Rendering (
nuxt build): Renders pages dynamically on request. Ideal when you have dynamic server APIs, live scheduled-post rollouts without rebuilds, or personalized routes. - Hybrid Rendering (
routeRules): Mix static prerendering for content pages with SSR or SWR caching for dynamic routes in the same app:
// nuxt.config.ts
export default defineNuxtConfig({
routeRules: {
'/': { prerender: true },
'/docs/**': { prerender: true },
'/articles/**': { swr: 3600 },
},
})
Deploying @nuxtify/cms (SQLite Requirements)
@nuxtify/cms relies on Nuxt Content, which indexes your Markdown files into a SQLite database. Your deployment setup depends on whether queries happen at build time or at request time.
Option 1: Static / Prerendered Hosts (Cloudflare Pages, Netlify, Vercel)
For purely static deployments (npm run generate), Nuxt Content reads SQLite at build time and outputs static HTML plus JSON payloads to .output/public. No runtime database is needed in production.
npm run generate
Deploy the generated .output/public directory to Cloudflare Pages, Netlify, Vercel, GitHub Pages, or any static file host.
Option 2: Cloudflare Workers + NuxtHub D1 (Reference Setup)
If you want edge SSR alongside prerendered pages on Cloudflare Workers—the exact architecture running nuxtify.dev—pair @nuxtify/cms with @nuxthub/core and a Cloudflare D1 database:
// nuxt.config.ts
export default defineNuxtConfig({
modules: [
'@nuxt/content',
'@nuxthub/core',
'@nuxtify/cms',
],
nitro: {
preset: 'cloudflare_module',
cloudflare: {
deployConfig: true,
nodeCompat: true,
wrangler: {
name: process.env.NAME,
observability: { enabled: true },
},
},
prerender: {
crawlLinks: true,
routes: [
'/',
'/robots.txt',
],
},
},
hub: {
db: {
dialect: 'sqlite',
driver: 'd1',
connection: { databaseId: process.env.DATABASE_ID },
},
},
sitemap: {
zeroRuntime: true,
},
})
With this setup:
- Static routes discovered from
nitro.prerender.routesandcrawlLinks: trueare served straight from Cloudflare's edge assets. - Any non-prerendered route or dynamic query falls back to the Worker backed by Cloudflare D1.
- Set
DATABASE_ID(andNAME) in your CI/CD environment variables before runningnpm run buildand deploying with Wrangler.
Option 3: Node.js Servers (better-sqlite3)
Deploying to a Node.js host (Docker, Fly.io, Railway, Render, or a VPS) works out of the box with better-sqlite3:
- Keep
better-sqlite3installed independencies(already included in standard Nuxt Content setups). - Build with
npm run buildand start the server withnode .output/server/index.mjs. - Ensure native addon builds are permitted in your CI/container image if your package manager blocks install scripts by default (for example,
better-sqlite3needs native compilation or prebuilt binaries).
Prerender Crawling Tips
When using nitro.prerender (crawlLinks: true or nuxt generate), keep three gotchas in mind:
- Seed redirects like
/docs: If you omitcontent/docs/index.md,/docsissues a302redirect to your first doc page. Nitro's link crawler does not always follow redirects to discover downstream pages, so list your first doc route explicitly innitro.prerender.routes. - Include
/robots.txt: Add'/robots.txt'tonitro.prerender.routesso static deployments serve a generatedrobots.txt. - Bake
sitemap.xmlwithzeroRuntime: true: Settingsitemap: { zeroRuntime: true }generatessitemap.xmlduring the build and keeps runtime server overhead minimal—just remember to trigger a scheduled rebuild if you rely on futurepublishedAtdates.
Next Steps
- Review scheduled-post rebuild behavior in Drafts & Scheduled Publishing.
- Hit a build or runtime issue? Check Upgrading & Troubleshooting.