Skip to main content
Activepieces is configured entirely through environment variables prefixed with 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:
Changing this key will make existing encrypted data unreadable. Store it securely and never commit to version control.
string
required
Secret key for signing JWT authentication tokensGenerate:
Changing this will invalidate all existing user sessions.
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
Use a strong password for production deployments.
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, sqlite
SQLite is for development only. Use PostgreSQL for production.

Redis 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, sentinel

Redis Sentinel

string
Sentinel master name
string
Comma-separated list of sentinel hostsExample:
enum
Sentinel roleOptions: master, slave

Redis 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, dev
enum
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)
Use SANDBOX_CODE_ONLY in production to prevent malicious code execution.
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-1
string
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.com
string
Display name for outgoing emailsExample: Activepieces

Worker Configuration

enum
default:"WORKER_AND_APP"
Container roleOptions:
  • WORKER_AND_APP: Run both API and workers (default)
  • APP: Run API server only
  • WORKER: 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, trace
boolean
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