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