Install Nuxt Site Config
Setup Module
@nuxtjs/seo includes this module. If your app uses @nuxtjs/seo, skip this step.
Auto-installed with SEO modules. Manual install only for custom modules.
npx nuxt module add nuxt-site-confignpm i nuxt-site-configyarn add nuxt-site-configpnpm i nuxt-site-configbun i nuxt-site-configUse Nuxt 4.6 or Nuxt 5. Use Node 22.22.3+, Node 24.15.0+, or Node 26+.
Verifying Installation
After installing the module, visit /__site-config__/debug.json to see the current site config, or check the Site Config tab in Nuxt DevTools.
nuxtseo-devtools-host package. Install it as a dev dependency with pnpm add -D nuxtseo-devtools-host, then restart the dev server. You do not add it to modules.Module Kit Usage
Add nuxt-site-config to your package dependencies, then declare it in moduleDependencies.
Nuxt loads the module dependency automatically.
Kit functions initialize the config stack when first called.
Resolve the module from your package so nested dependencies work with pnpm's global virtual store.
import { fileURLToPath } from 'node:url'
import { defineNuxtModule } from '@nuxt/kit'
import { updateSiteConfig } from 'nuxt-site-config/kit'
export default defineNuxtModule({
// ...
moduleDependencies: {
[fileURLToPath(import.meta.resolve('nuxt-site-config'))]: { version: '>=5.0.0' },
},
setup(options) {
// Optional: set some site config from your modules options
// This is not recommended, only to keep supporting your modules options.
// The user's `site` key and `NUXT_SITE_*` env vars override it.
updateSiteConfig({
_context: 'my-module',
url: options.siteUrl,
})
}
})That's it. Explore the documentation to learn more.
Next Steps
You've successfully installed Nuxt Site Config. Here's the recommended reading path:
- Recommended Config - Set your site
url,env, andname - How it works - Understand config resolution order
- Runtime Site Config - Set config dynamically per-request