This page documents all environment variables available in Shelve, their usage and configuration.
These environment variables are mandatory for Shelve to function:
DATABASE_URLpostgresql://username:password@host:port/databasepostgresql://user:pass@db.example.com:5432/shelveNUXT_SESSION_PASSWORDopenssl rand -base64 48NUXT_PRIVATE_ENCRYPTION_KEYopenssl rand -base64 48Shelve now supports multiple authentication methods. You need to configure at least one method for users to be able to create accounts and log in:
NUXT_PRIVATE_RESEND_API_KEY and NUXT_PRIVATE_SENDER_EMAILShelve supports multiple authentication methods. You need at least one authentication method configured:
For email-based authentication using one-time passwords (OTP), you need to configure email service variables below.
OAuth providers offer an alternative authentication method alongside email authentication.
To enable GitHub authentication, configure these two variables together:
NUXT_OAUTH_GITHUB_CLIENT_IDNUXT_OAUTH_GITHUB_CLIENT_SECRETTo enable Google authentication, configure these two variables together:
NUXT_OAUTH_GOOGLE_CLIENT_IDNUXT_OAUTH_GOOGLE_CLIENT_SECRETNUXT_PRIVATE_GITHUB_PRIVATE_KEYopenssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem | base64 -w 0
NUXT_PRIVATE_RESEND_API_KEYre_NUXT_PRIVATE_SENDER_EMAILnoreply@yourdomain.comNUXT_PRIVATE_ADMIN_EMAILSadmin@app.com,admin2@app.comNUXT_PRIVATE_ALLOWED_ORIGINShttps://app.com,https://www.app.comShelve uses an automatic environment variables validation system:
Create a .env file at the root of your project:
# Copy from .env.example
DATABASE_URL=postgresql://localhost:5432/shelve_dev
NUXT_SESSION_PASSWORD=your-dev-session-password-32-chars-min
NUXT_PRIVATE_ENCRYPTION_KEY=your-dev-encryption-key-32-chars-min
Configure all variables in your Vercel project settings:
"Session password must be at least 32 characters long"
openssl rand -base64 48"Must be a valid PostgreSQL URL"
postgresql://user:pass@host:port/db"GitHub OAuth validation failed"
"Resend API key must start with 're_'"
Vercel deployment logs will show:
🔐 Auth configuration validated:
GitHub OAuth: ✅/❌
Google OAuth: ✅/❌
Email Service: ✅/❌
This allows you to quickly check which integrations are active.