Before deploying the application, you must provision the production database instance.
Storage & Databases > D1 SQL Database > Create Database.wrangler.toml for NuxtEnsure your configuration maps the Cloudflare bindings to your Nuxt environment.
# wrangler.toml
name = "your-project-name" # Must match Cloudflare project name
compatibility_date = "2026-01-21"
main = ".output/server/index.mjs"
compatibility_flags = ["nodejs_compat"]
[[d1_databases]]
binding = "DB" # The binding name used in your Drizzle config
database_name = "your-db-name"
database_id = "your-db-id"
migrations_dir = "server/db/migrations/sqlite"
[assets]
directory = ".output/public"
binding = "ASSETS"
[observability]
enabled = true
head_sampling_rate = 1
Push your local schema changes to the live Cloudflare D1 production instance.
# Using Wrangler directly
npx wrangler d1 migrations apply <DATABASE_NAME> --remote
# Alternative via NAC template shortcut
bun migrate:remote
Compute & AI > Workers & Pages > Create Application.wrangler.toml.Configure these secrets in the Cloudflare Dashboard to enable Nuxt Auto-CRUD security and admin hydration.
| Variable | Importance | Purpose |
|---|---|---|
NUXT_SESSION_PASSWORD | Critical | 32+ character string for session encryption. |
NUXT_ADMIN_EMAIL | Required | The email used to trigger the initial db:seed. |
NUXT_ADMIN_PASSWORD | Required | Default credential for first-time access. |
Once deployed, access your URL and sign in.
NUXT_ADMIN_EMAIL automatically hydrates roles and permissions via the internal seed task.Settings (User Avatar > Settings) and verify that Session Security and Admin Access are toggled to 'secure'.