Configuration Overview
Twenty is configured primarily through environment variables. Configuration can be set in:.envfile (local development)- Docker Compose
.envfile - Kubernetes ConfigMaps and Secrets
- System environment variables
Core Configuration
Server Settings
Environment mode:
development or productionPublic URL where Twenty is accessible (e.g.,
https://crm.yourcompany.com)Frontend application URL (for development)
Port for the server to listen on
Secret key for encryption and JWT signing. Must be at least 32 characters.
Database Configuration
PostgreSQL
PostgreSQL connection string:
Allow self-signed SSL certificates for PostgreSQL connections
Redis
Redis connection string:Or with authentication:
ClickHouse (Optional)
Enable analytics with ClickHouse
ClickHouse connection string for analytics:
Storage Configuration
Local Storage
Storage backend:
local or s3Path for local file storage
S3 Storage
For production deployments, S3-compatible storage is recommended:Set to
s3 to enable S3 storageAWS region (e.g.,
us-east-1, eu-west-3)S3 bucket name
Custom S3 endpoint for S3-compatible services (MinIO, DigitalOcean Spaces, etc.)
Authentication Configuration
Password Authentication
Enable email/password authentication
Prefill login credentials (development only)
Google OAuth
Enable Google OAuth sign-in
Google OAuth client ID from Google Cloud Console
Google OAuth client secret
OAuth callback URL:
{SERVER_URL}/auth/google/redirectAPIs callback URL:
{SERVER_URL}/auth/google-apis/get-access-tokenMicrosoft OAuth
Enable Microsoft OAuth sign-in
Microsoft OAuth client ID from Azure Portal
Microsoft OAuth client secret
OAuth callback URL:
{SERVER_URL}/auth/microsoft/redirectAPIs callback URL:
{SERVER_URL}/auth/microsoft-apis/get-access-tokenEmail Configuration
Email Settings
Email driver:
smtp for production, logger for development/testingSender email address (e.g.,
[email protected])Sender display name (e.g.,
John from YourCompany)System email address for automated messages
SMTP Configuration
SMTP server hostname (e.g.,
smtp.gmail.com)SMTP server port (typically
587 for TLS or 465 for SSL)SMTP username
SMTP password or app-specific password
Email Verification
Require email verification for new accounts
Verification token expiration time
Integration Providers
Gmail Integration
Enable Gmail message sync
Enable Google Calendar sync
Microsoft Integration
Enable Outlook message sync
Enable Outlook Calendar sync
IMAP/SMTP/CalDAV
Enable generic IMAP/SMTP/CalDAV integrations
Security Configuration
Token Expiration
Access token lifetime
Refresh token lifetime
Login token lifetime
File access token lifetime
Password reset token lifetime
Rate Limiting
Rate limit window in milliseconds
Maximum requests per window
Maximum records that can be affected by a single mutation
CAPTCHA
CAPTCHA provider (e.g.,
recaptcha, hcaptcha)CAPTCHA site key
CAPTCHA secret key
SSL/TLS
Path to SSL private key file
Path to SSL certificate file
Feature Flags
Workspace Settings
Enable multiple workspace support
Restrict workspace creation to server administrators
Days of inactivity before sending warning notification
Days before soft-deleting inactive workspaces
Days before permanently deleting inactive workspaces
Configuration Storage
Store configuration variables in database instead of environment
Billing
Enable billing and subscription features
URL to redirect users when subscription is required
Serverless Configuration
Code execution environment:
local or serverlessServerless provider:
local, aws, or azureEnable logging for serverless functions
Observability
Logging
Logger output:
console or other driversBuffer log messages for batch processing
Comma-separated log levels to output
Error Tracking
Exception handler:
sentry or other providersSentry DSN for backend error tracking
Sentry DSN for frontend error tracking
Environment name in Sentry (e.g.,
production, staging)Metrics
Metrics driver:
opentelemetry, console, or comma-separated for multipleSupport Configuration
Support widget driver:
front for Front chatFront chat widget ID
Front chat HMAC key for user verification
Security Features
HTTP Tool Safe Mode
Restrict HTTP requests from workflows to prevent SSRF attacks
Allow workflows to fetch icons from Twenty’s icon service
Chrome Extension
Chrome extension ID for browser integration
Cloudflare Configuration
Cloudflare API key for CDN integration
Cloudflare zone ID
Secret for validating Cloudflare webhooks
Migration Settings
Disable automatic database migrations on startup
Disable automatic cron job registration (useful for worker-only containers)
Example Configurations
Development Environment
.env
Production Environment
.env
Validation
Verify your configuration:Next Steps
Docker Compose
Deploy with Docker Compose
Kubernetes
Deploy on Kubernetes
Troubleshooting
Debug configuration issues
Authentication
Configure API authentication
