.env file. This guide documents all available configuration options.
Quick Setup
- Copy the example environment file:
- Generate required secrets:
- Configure essential variables in
.env
Essential Configuration
Database
string
required
PostgreSQL connection string with credentials. Used by the application and connection poolers.
string
required
Direct PostgreSQL connection for migrations. Use the same as
DATABASE_URL if not using a connection pooler like PgBouncer.string
Optional separate database for analytics and insights data.
string
default:"prefer"
SSL mode for PostgreSQL connection. Use
no-verify for self-signed certificates (Heroku, etc.).Application URLs
string
required
Base URL where your Cal.com instance is hosted. Must include protocol.
For organizations feature, use app subdomain:
http://app.cal.local:3000string
Marketing website URL. Defaults to
NEXT_PUBLIC_WEBAPP_URL.string
URL for Cal.com embed library.
Authentication (NextAuth)
string
required
Full URL to NextAuth API endpoint. Required for Vercel deployments.
string
required
Secret for encrypting session cookies. Generate with
openssl rand -base64 32.string
Domain for cross-domain cookie authentication.
Encryption
string
required
32-byte key for AES256 encryption. Generate with
openssl rand -base64 24.string
24-byte key for app credential encryption in credential sync.
string
24-byte key for service account encryption.
Security
Content Security Policy
string
Enable Content Security Policy. Set to
non-strict for enhanced security.Strict CSP enables on login pages; report-only mode on SSR pages
Rate Limiting
string
Root key from Unkey for rate limiting. Optional but recommended for production.Requires permissions:
ratelimit.create_namespace and ratelimit.limitAllowed Hostnames
string
JSON array of allowed hostnames for the application.
string
Reserved organization subdomain names.
Email Configuration
SMTP Settings
string
required
Sender email address for all outgoing emails.
string
Display name for sender.
string
required
SMTP server hostname.
number
required
SMTP server port.
string
SMTP authentication username.
string
SMTP authentication password or app-specific password.
SendGrid
string
SendGrid API key for transactional emails and reminders.
string
Verified sender email in SendGrid.
string
Display name for SendGrid emails.
Resend
string
Resend API key for transactional emails (alternative to SendGrid).
License & Enterprise
string
Enterprise license key. Required for enterprise features.
string
Signature token for Cal.com License API authentication.
string
default:"https://goblin.cal.com"
Route to Cal.com License API.
Integrations
Google Calendar
json
Google OAuth credentials JSON for Calendar and Meet integration.See Obtaining Google API Credentials for setup instructions.
boolean
default:"false"
Enable “Sign in with Google”.
string
Google Calendar API key for holidays feature.
string
Token to verify incoming webhooks from Google Calendar.
string
Override URL for Google Calendar webhooks. Defaults to
NEXT_PUBLIC_WEBAPP_URL.Microsoft 365
string
Microsoft Graph Application (client) ID.
string
Microsoft Graph client secret.
string
Token to verify incoming webhooks from Microsoft Calendar.
string
Override URL for Microsoft Calendar webhooks.
Zoom
string
Zoom OAuth client ID.
string
Zoom OAuth client secret.
Daily.co Video
string
Daily.co API key for video conferencing.
boolean
default:"false"
Enable Daily Scale Plan features (recording, etc.).
Stripe
string
Stripe secret key for payment processing.
string
Stripe client ID for Connect.
string
Stripe webhook signing secret.
string
Stripe webhook secret for app store integrations.
SMS & WhatsApp
Twilio
string
Twilio Account SID.
string
Twilio Auth Token.
string
Twilio Messaging Service SID.
string
Twilio phone number for SMS.
string
Twilio WhatsApp-enabled phone number.
string
SMS sender ID (max 11 characters, letters, numbers, and spaces only).
string
Twilio Verify Service SID for phone verification.
Push Notifications
string
required
VAPID public key for browser push notifications.Generate with:
npx web-push generate-vapid-keysstring
required
VAPID private key for push notifications.
Branding & Customization
string
default:"Cal.com"
Application name displayed throughout the UI.
string
default:"help@cal.com"
Support email address.
string
default:"Cal.com, Inc."
Company name for legal pages.
string
URL to your privacy policy.
string
URL to your terms of service.
boolean
default:"false"
Disable new user signups.
Analytics & Monitoring
Telemetry
boolean
default:"false"
Disable anonymous usage analytics.
Sentry
string
Sentry DSN for error tracking.
string
Sentry organization slug.
string
Sentry project name.
string
Sentry authentication token for releases.
PostHog
string
PostHog project API key.
string
PostHog instance URL.
Logging
number
Logging verbosity level:
0: silly & upwards1: trace & upwards2: debug & upwards3: info & upwards (recommended)4: warn & upwards5: error & fatal6: fatal only
Organizations (Enterprise)
boolean
default:"false"
Enable organizations feature (requires full domain setup).
string
Serve only one organization’s booking pages.
boolean
default:"false"
Auto-link external signups to organizations by email domain.
number
default:"30"
Minimum seats for self-serve organizations.
Vercel Domain Management
string
Vercel project ID for subdomain management.
string
Vercel team ID.
string
Vercel API token for domain management.
Cloudflare DNS Management
boolean
default:"false"
Use Cloudflare for DNS management.
string
Cloudflare API token with Zone Edit permissions.
string
Cloudflare Zone ID for your domain.
string
default:"cname.vercel-dns.com"
CNAME target for Vercel domains.
SAML SSO (Enterprise)
string
Separate PostgreSQL database for SAML data.
string
Comma-separated list of admin emails.
string
Random secret for OAuth 2.0 SAML flow.
API V2
string
URL for Cal.com Platform API v2.
number
default:"80"
Port for API v2 service.
string
Full URL to API v2 service.
string
Web application URL for API callbacks.
string
default:"cal_"
Prefix for API keys.
Cron Jobs
string
required
API key for authenticating cron job requests.
boolean
default:"false"
Auto-sync app metadata from config files.
Redis
string
Redis connection string for caching and queues.
number
default:"6379"
Redis port (used in docker-compose).
Performance & Optimization
string
Node.js runtime options.
number
default:"6144"
Memory limit for build process (in MB).
number
Batch size for database operations.
string
default:"UTC"
Process timezone. Always use UTC.
Development & Testing
string
Node environment.
boolean
default:"false"
Enable E2E testing mode.
boolean
default:"false"
Enable Mailhog for email testing.
Example Configurations
Minimal Production Setup
Docker Compose Setup
Enterprise with Organizations
Next Steps
- Review Database Setup for connection pooling and migrations
- See Docker Configuration for container-specific options
- Configure Deployment for your platform