Nuxt 4 separates runtimeConfig for secure environment variables from app.config for reactive theme/UI settings. runtimeConfig supports private server-only keys (NUXT_SECRET_ prefix) and public client-safe values (NUXT_PUBLIC_), while app.config handles static theme objects with HMR but no env var access. Private configs never reach client; public configs hydrate safely.​
runtimeConfig supports environment variables (private/public), exposes only public subset to client, keeps private keys server-side, but requires restart for changes. app.config is static-only (no env vars), exposes full object to client, SSR-safe for all data, and supports hot reload.
Complete Implementation:-
Step 1: nuxt.config.ts
Step 2: Environment (.env)
Step 3: Usage Patterns
Step 4: Server Access
.png)

.png)
