Vercel is the official recommended provider for self-hosting Shelve. This platform offers native integration with the ecosystem that Shelve uses and greatly simplifies deployment.
For an optimal experience, we recommend using Vercel's native integrations:
These integrations are optimized for Vercel and offer simplified configuration.
Before the first deployment, you need to configure environment variables. Go to your Vercel project settings > Environment Variables.
These variables are mandatory for Shelve to work:
# PostgreSQL database
DATABASE_URL=postgresql://username:password@host:port/database
# Security (generate random keys of 32+ characters)
NUXT_SESSION_PASSWORD=your-32-character-minimum-session-password
NUXT_PRIVATE_ENCRYPTION_KEY=your-32-character-minimum-encryption-key
You can generate secure keys with this command:
# Generates a 64-character key
openssl rand -base64 48
Shelve requires a PostgreSQL database. We recommend Neon for its excellent Vercel integration, but you can use any PostgreSQL provider.
DATABASE_URL environment variableDATABASE_URL variable in Vercel project settingsShelve supports multiple authentication methods. You need at least one authentication method configured for users to create accounts and log in.
Configure email service variables below to enable OTP-based authentication via email.
Configure OAuth providers below for social authentication.
To enable GitHub authentication:
# GitHub OAuth (both variables are required together)
NUXT_OAUTH_GITHUB_CLIENT_ID=your_github_client_id
NUXT_OAUTH_GITHUB_CLIENT_SECRET=your_github_client_secret
To enable Google authentication:
# Google OAuth (both variables are required together)
NUXT_OAUTH_GOOGLE_CLIENT_ID=your_google_client_id
NUXT_OAUTH_GOOGLE_CLIENT_SECRET=your_google_client_secret
For email-based authentication using OTP codes:
# Resend API key (required for email authentication)
NUXT_PRIVATE_RESEND_API_KEY=re_your_resend_api_key
NUXT_PRIVATE_SENDER_EMAIL=noreply@yourapp.com
# Admin emails (comma-separated)
NUXT_PRIVATE_ADMIN_EMAILS=admin@yourapp.com,admin2@yourapp.com
# Allowed origins for CORS (comma-separated)
NUXT_PRIVATE_ALLOWED_ORIGINS=https://yourapp.com,https://www.yourapp.com
To use GitHub integration (secrets synchronization), you need to configure a GitHub App:
Repository permissions:
Organization permissions:
# GitHub private key (PKCS#8 base64 format)
NUXT_PRIVATE_GITHUB_PRIVATE_KEY=your_base64_encoded_private_key
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem | base64 -w 0
Shelve automatically validates environment variables configuration at startup. If a required variable is missing or invalid, the application will display a detailed error.
Vercel deployment logs will show you:
Once all variables are configured:
NUXT_PRIVATE_ALLOWED_ORIGINS with your new domainUse Vercel tools to monitor your deployment: