AP_. All variables are defined in the source code at packages/server/common/src/lib/system-props.ts.
Environment variables are read from the
.env file or passed directly to the container. The .env.example file in the repository shows the minimum required configuration.Quick Reference
Download the example configuration:Required Variables
These must be set for Activepieces to function:Path to the workflow execution engineDefault:
dist/packages/engine/main.jsExample:256-bit encryption key (32 hex characters) for encrypting sensitive dataGenerate:
Secret key for signing JWT authentication tokensGenerate:
Public URL where users access ActivepiecesExamples:
Database Configuration
PostgreSQL
PostgreSQL database name
PostgreSQL server hostnameExamples:
PostgreSQL server port
PostgreSQL username
PostgreSQL password
PostgreSQL connection URL (alternative to individual settings)Format:
postgresql://username:password@host:port/databaseExample:If set, this overrides individual
AP_POSTGRES_* variables.Enable SSL/TLS for PostgreSQL connection
Path to SSL CA certificate file
PostgreSQL connection pool sizeRecommended: 10-20 for production
Connection idle timeout in milliseconds
Database type (for advanced use cases)Options:
postgres, sqliteRedis Configuration
Redis server hostname
Redis server port
Redis username (Redis 6+ ACL)
Redis password
Redis database number (0-15)
Redis connection URL (alternative to individual settings)Format:
redis://[username:password@]host:port/dbExample:Enable SSL/TLS for Redis connection
Path to SSL CA certificate file
Redis deployment typeOptions:
standalone, sentinelRedis Sentinel
Sentinel master name
Comma-separated list of sentinel hostsExample:
Sentinel roleOptions:
master, slaveRedis Job Retention
How many days to keep failed job data
Maximum number of failed jobs to retain
Application Configuration
Environment
Application environmentOptions:
prod, devActivepieces editionOptions:
ce (Community Edition), ee (Enterprise Edition)Execution
Code execution mode for workflowsOptions:
SANDBOX_CODE_ONLY: Sandboxed execution using isolated-vm (128MB limit)UNSANDBOXED: Direct Node.js execution (development only)
Memory limit in MB for sandboxed code executionRange: 64-512 MB
Comma-separated environment variables to pass to sandboxExample:
Timeouts
Maximum workflow execution time in secondsDefault: 10 minutes
Webhook request timeout in seconds
Trigger execution timeout in seconds
Trigger hook timeout in seconds
Default polling interval in minutes for scheduled triggers
Limits
Maximum file upload size in megabytes
Maximum size of flow run logs in megabytes
Limit concurrent job execution per project
Data Retention
Days to retain execution data before cleanupExample:
Days before archiving flow issues
Days before disabling paused flows
File Storage
File storage backendOptions:
local, s3Default: local (uses /usr/src/app/cache)S3 Configuration
S3 bucket name for file storage
AWS access key ID
AWS secret access key
AWS regionExample:
us-east-1, eu-west-1Custom S3 endpoint for S3-compatible servicesExamples:
Use pre-signed URLs for S3 file access
Use IAM Roles for Service Accounts (EKS/Kubernetes)
When enabled, authentication uses pod IAM role instead of access keys.
Email (SMTP)
SMTP server hostname
SMTP server port
SMTP username
SMTP password
Email address for outgoing emailsExample:
[email protected]Display name for outgoing emailsExample:
ActivepiecesWorker Configuration
Container roleOptions:
WORKER_AND_APP: Run both API and workers (default)APP: Run API server onlyWORKER: Run workers only
Use separate containers for scaling. See Workers guide.
Number of concurrent jobs per workerRecommended: 1-4 based on CPU cores
Authentication token for dedicated workers
Platform ID for dedicated worker deployment
Pre-load pieces into memory on startup
Enable PM2 process manager for clustering
Security
Optional API key for platform-level authentication
HTTP header to extract real client IPExamples:
Comma-separated webhook secrets
Rate Limiting
Enable authentication rate limiting
Maximum authentication requests per window
Rate limit window in seconds
Enable per-project rate limiting
Logging
Logging verbosityOptions:
error, warn, info, debug, traceEnable pretty-printed logs (development)
Telemetry & Monitoring
Send anonymous usage telemetry to Activepieces
Helps improve the platform. No sensitive data is collected.
Enable OpenTelemetry instrumentation
OpenTelemetry collector endpoint
Headers for OTLP exporter
Advanced Configuration
URL for flow template repository
Custom pieces registry URL
Enable development pieces
Pieces synchronization mode
Automatically enable flows when published
Internal service communication URL
Path to custom configuration file
Enable BullMQ Board for queue monitoring
Username for queue UI
Password for queue UI
Example Configurations
Development
.env
Production
.env
Next Steps
Database Setup
Configure PostgreSQL
Storage
Setup S3 file storage
Workers
Configure worker processes
Scaling
Scale your deployment