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:string
required
Path to the workflow execution engineDefault:
dist/packages/engine/main.jsExample:string
required
256-bit encryption key (32 hex characters) for encrypting sensitive dataGenerate:
string
required
Secret key for signing JWT authentication tokensGenerate:
string
required
Public URL where users access ActivepiecesExamples:
Database Configuration
PostgreSQL
string
default:"activepieces"
PostgreSQL database name
string
default:"postgres"
PostgreSQL server hostnameExamples:
number
default:"5432"
PostgreSQL server port
string
default:"postgres"
PostgreSQL username
string
required
PostgreSQL password
string
PostgreSQL connection URL (alternative to individual settings)Format:
postgresql://username:password@host:port/databaseExample:If set, this overrides individual
AP_POSTGRES_* variables.boolean
default:"false"
Enable SSL/TLS for PostgreSQL connection
string
Path to SSL CA certificate file
number
default:"10"
PostgreSQL connection pool sizeRecommended: 10-20 for production
number
default:"30000"
Connection idle timeout in milliseconds
enum
Database type (for advanced use cases)Options:
postgres, sqliteRedis Configuration
string
default:"redis"
Redis server hostname
number
default:"6379"
Redis server port
string
Redis username (Redis 6+ ACL)
string
Redis password
number
default:"0"
Redis database number (0-15)
string
Redis connection URL (alternative to individual settings)Format:
redis://[username:password@]host:port/dbExample:boolean
default:"false"
Enable SSL/TLS for Redis connection
string
Path to SSL CA certificate file
enum
default:"standalone"
Redis deployment typeOptions:
standalone, sentinelRedis Sentinel
string
Sentinel master name
string
Comma-separated list of sentinel hostsExample:
enum
Sentinel roleOptions:
master, slaveRedis Job Retention
number
default:"7"
How many days to keep failed job data
number
default:"100"
Maximum number of failed jobs to retain
Application Configuration
Environment
enum
default:"prod"
Application environmentOptions:
prod, devenum
default:"ce"
Activepieces editionOptions:
ce (Community Edition), ee (Enterprise Edition)Execution
enum
default:"UNSANDBOXED"
Code execution mode for workflowsOptions:
SANDBOX_CODE_ONLY: Sandboxed execution using isolated-vm (128MB limit)UNSANDBOXED: Direct Node.js execution (development only)
number
default:"128"
Memory limit in MB for sandboxed code executionRange: 64-512 MB
string
Comma-separated environment variables to pass to sandboxExample:
Timeouts
number
default:"600"
Maximum workflow execution time in secondsDefault: 10 minutes
number
default:"30"
Webhook request timeout in seconds
number
Trigger execution timeout in seconds
number
Trigger hook timeout in seconds
number
default:"5"
Default polling interval in minutes for scheduled triggers
Limits
number
default:"10"
Maximum file upload size in megabytes
number
default:"2"
Maximum size of flow run logs in megabytes
number
Limit concurrent job execution per project
Data Retention
number
Days to retain execution data before cleanupExample:
number
Days before archiving flow issues
number
Days before disabling paused flows
File Storage
enum
File storage backendOptions:
local, s3Default: local (uses /usr/src/app/cache)S3 Configuration
string
S3 bucket name for file storage
string
AWS access key ID
string
AWS secret access key
string
AWS regionExample:
us-east-1, eu-west-1string
Custom S3 endpoint for S3-compatible servicesExamples:
boolean
default:"false"
Use pre-signed URLs for S3 file access
boolean
default:"false"
Use IAM Roles for Service Accounts (EKS/Kubernetes)
When enabled, authentication uses pod IAM role instead of access keys.
Email (SMTP)
string
SMTP server hostname
number
default:"587"
SMTP server port
string
SMTP username
string
SMTP password
string
Email address for outgoing emailsExample:
noreply@yourdomain.comstring
Display name for outgoing emailsExample:
ActivepiecesWorker Configuration
enum
default:"WORKER_AND_APP"
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
Number of concurrent jobs per workerRecommended: 1-4 based on CPU cores
string
Authentication token for dedicated workers
string
Platform ID for dedicated worker deployment
boolean
default:"false"
Pre-load pieces into memory on startup
boolean
default:"false"
Enable PM2 process manager for clustering
Security
string
Optional API key for platform-level authentication
string
HTTP header to extract real client IPExamples:
string
Comma-separated webhook secrets
Rate Limiting
boolean
default:"false"
Enable authentication rate limiting
number
default:"100"
Maximum authentication requests per window
number
default:"60"
Rate limit window in seconds
boolean
default:"false"
Enable per-project rate limiting
Logging
enum
default:"info"
Logging verbosityOptions:
error, warn, info, debug, traceboolean
default:"false"
Enable pretty-printed logs (development)
Telemetry & Monitoring
boolean
default:"true"
Send anonymous usage telemetry to Activepieces
Helps improve the platform. No sensitive data is collected.
boolean
default:"false"
Enable OpenTelemetry instrumentation
string
OpenTelemetry collector endpoint
string
Headers for OTLP exporter
Advanced Configuration
string
URL for flow template repository
string
Custom pieces registry URL
boolean
default:"false"
Enable development pieces
enum
Pieces synchronization mode
boolean
default:"true"
Automatically enable flows when published
string
Internal service communication URL
string
Path to custom configuration file
boolean
default:"false"
Enable BullMQ Board for queue monitoring
string
Username for queue UI
string
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