.env file in the project root. The values are loaded into Nuxt’s runtimeConfig at build time.
Required variables
PostgreSQL connection string for your Neon (or any PostgreSQL-compatible) database.
Secret key used to sign and verify JSON Web Tokens. Use a random string of at least 32 characters.
Your Cloudinary cloud name. Required for user profile photo uploads.
Your Cloudinary API key. Required for server-side image upload signing.
Your Cloudinary API secret. Keep this value private — it is only used server-side.
Cloudflare Turnstile public site key. This value is exposed to the browser and rendered inside the CAPTCHA widget on the login page.
Cloudflare Turnstile secret key. Used server-side to verify CAPTCHA tokens. Keep this value private.
Complete .env example
.env
Obtaining credentials
Neon database
- Go to neon.tech and create a free account.
- Create a new project and select a PostgreSQL region.
- From the Connection Details panel, copy the connection string.
- Paste it as your
DATABASE_URLvalue.
Cloudinary
- Go to cloudinary.com and create a free account.
- From your Dashboard, copy the Cloud name, API key, and API secret.
- Set each value in your
.envfile:CLOUDINARY_CLOUD_NAMECLOUDINARY_API_KEYCLOUDINARY_API_SECRET
Cloudinary’s free tier provides 25 GB of storage and 25 GB of monthly bandwidth — sufficient for development and small deployments.
Cloudflare Turnstile
- Go to the Cloudflare dashboard and log in or create an account.
- Navigate to Turnstile in the sidebar.
- Click Add site and register your domain (use
localhostfor local development). - Copy the Site key and Secret key.
- Set each value in your
.envfile:NUXT_PUBLIC_TURNSTILE_SITE_KEY— the public site keyTURNSTILE_SECRET_KEY— the private secret key