docker.recipes

Activepieces + PostgreSQL + Redis

intermediate

Open source Zapier alternative with visual automation.

Overview

Activepieces is an open-source business automation platform that serves as a self-hosted alternative to Zapier, enabling users to create complex workflows and integrations through a visual drag-and-drop interface. Built with TypeScript and designed for scalability, Activepieces supports over 100 pre-built connectors for popular services like Gmail, Slack, Google Sheets, and Salesforce, while also allowing custom JavaScript code execution for advanced automation scenarios. The platform emerged from the growing need for data sovereignty and cost control in business process automation, offering the same powerful workflow capabilities as commercial alternatives without vendor lock-in or usage-based pricing restrictions. PostgreSQL serves as Activepieces' primary data store, managing workflow definitions, execution logs, user accounts, and connection credentials with ACID compliance ensuring data integrity during complex multi-step automations. Redis complements the architecture by handling session management, caching frequently accessed workflow templates, and managing the job queue for workflow executions, significantly reducing database load and improving response times for the web interface. This combination creates a robust foundation where PostgreSQL's reliability handles persistent data while Redis accelerates real-time operations and user interactions. This stack is ideal for organizations seeking full control over their automation infrastructure, development teams building custom integration solutions, and businesses with sensitive data that cannot rely on cloud-based automation services. The self-hosted nature eliminates per-execution costs while providing unlimited workflow complexity, making it particularly valuable for high-volume automation scenarios where commercial alternatives would be cost-prohibitive.

Key Features

  • Visual workflow builder with 100+ pre-built connectors for popular SaaS applications
  • Custom JavaScript code pieces for advanced logic and API integrations
  • PostgreSQL-backed workflow execution history with detailed logging and debugging capabilities
  • Redis-powered job queue system for reliable workflow scheduling and execution
  • Multi-tenant architecture supporting team collaboration and permission management
  • Webhook triggers with automatic endpoint generation for external system integration
  • Form-based data collection with PostgreSQL storage for lead generation and surveys
  • API-first design allowing programmatic workflow management and external integrations

Common Use Cases

  • 1E-commerce order processing automation connecting Shopify, inventory systems, and shipping providers
  • 2Customer onboarding workflows integrating CRM, email marketing, and document management systems
  • 3Social media management automating content distribution across multiple platforms with approval workflows
  • 4Lead qualification processes connecting forms, CRM systems, and sales team notifications
  • 5Data synchronization between legacy systems and modern SaaS applications
  • 6IT operations automation for user provisioning, system monitoring alerts, and incident response
  • 7Content management workflows for blog publishing, SEO optimization, and social media promotion

Prerequisites

  • Minimum 2GB RAM (1GB+ for PostgreSQL, 512MB+ for Redis, remainder for Activepieces)
  • Docker and Docker Compose installed with network access to download images
  • Environment variables configured: POSTGRES_USER, POSTGRES_PASSWORD, ENCRYPTION_KEY, JWT_SECRET
  • Port 8080 available for web interface access
  • Basic understanding of workflow automation concepts and API integrations
  • Valid SSL certificate if exposing to external networks for webhook functionality

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 activepieces:
3 image: activepieces/activepieces:latest
4 environment:
5 - AP_ENGINE_EXECUTABLE_PATH=dist/packages/engine/main.js
6 - AP_POSTGRES_HOST=postgres
7 - AP_POSTGRES_PORT=5432
8 - AP_POSTGRES_DATABASE=activepieces
9 - AP_POSTGRES_USERNAME=${POSTGRES_USER}
10 - AP_POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
11 - AP_REDIS_HOST=redis
12 - AP_REDIS_PORT=6379
13 - AP_ENCRYPTION_KEY=${ENCRYPTION_KEY}
14 - AP_JWT_SECRET=${JWT_SECRET}
15 - AP_FRONTEND_URL=http://localhost:8080
16 ports:
17 - "8080:80"
18 depends_on:
19 - postgres
20 - redis
21 networks:
22 - activepieces-network
23 restart: unless-stopped
24
25 postgres:
26 image: postgres:15
27 environment:
28 - POSTGRES_USER=${POSTGRES_USER}
29 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
30 - POSTGRES_DB=activepieces
31 volumes:
32 - postgres-data:/var/lib/postgresql/data
33 networks:
34 - activepieces-network
35 restart: unless-stopped
36
37 redis:
38 image: redis:alpine
39 volumes:
40 - redis-data:/data
41 networks:
42 - activepieces-network
43 restart: unless-stopped
44
45volumes:
46 postgres-data:
47 redis-data:
48
49networks:
50 activepieces-network:
51 driver: bridge

.env Template

.env
1# Activepieces
2POSTGRES_USER=activepieces
3POSTGRES_PASSWORD=secure_postgres_password
4ENCRYPTION_KEY=your-32-char-encryption-key-here
5JWT_SECRET=your-jwt-secret-key
6
7# Generate keys: openssl rand -hex 16

Usage Notes

  1. 1Web UI at http://localhost:8080
  2. 2Visual workflow builder
  3. 3100+ integrations
  4. 4Custom code pieces
  5. 5Self-hosted Zapier alternative

Individual Services(3 services)

Copy individual services to mix and match with your existing compose files.

activepieces
activepieces:
  image: activepieces/activepieces:latest
  environment:
    - AP_ENGINE_EXECUTABLE_PATH=dist/packages/engine/main.js
    - AP_POSTGRES_HOST=postgres
    - AP_POSTGRES_PORT=5432
    - AP_POSTGRES_DATABASE=activepieces
    - AP_POSTGRES_USERNAME=${POSTGRES_USER}
    - AP_POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
    - AP_REDIS_HOST=redis
    - AP_REDIS_PORT=6379
    - AP_ENCRYPTION_KEY=${ENCRYPTION_KEY}
    - AP_JWT_SECRET=${JWT_SECRET}
    - AP_FRONTEND_URL=http://localhost:8080
  ports:
    - "8080:80"
  depends_on:
    - postgres
    - redis
  networks:
    - activepieces-network
  restart: unless-stopped
postgres
postgres:
  image: postgres:15
  environment:
    - POSTGRES_USER=${POSTGRES_USER}
    - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
    - POSTGRES_DB=activepieces
  volumes:
    - postgres-data:/var/lib/postgresql/data
  networks:
    - activepieces-network
  restart: unless-stopped
redis
redis:
  image: redis:alpine
  volumes:
    - redis-data:/data
  networks:
    - activepieces-network
  restart: unless-stopped

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 activepieces:
5 image: activepieces/activepieces:latest
6 environment:
7 - AP_ENGINE_EXECUTABLE_PATH=dist/packages/engine/main.js
8 - AP_POSTGRES_HOST=postgres
9 - AP_POSTGRES_PORT=5432
10 - AP_POSTGRES_DATABASE=activepieces
11 - AP_POSTGRES_USERNAME=${POSTGRES_USER}
12 - AP_POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
13 - AP_REDIS_HOST=redis
14 - AP_REDIS_PORT=6379
15 - AP_ENCRYPTION_KEY=${ENCRYPTION_KEY}
16 - AP_JWT_SECRET=${JWT_SECRET}
17 - AP_FRONTEND_URL=http://localhost:8080
18 ports:
19 - "8080:80"
20 depends_on:
21 - postgres
22 - redis
23 networks:
24 - activepieces-network
25 restart: unless-stopped
26
27 postgres:
28 image: postgres:15
29 environment:
30 - POSTGRES_USER=${POSTGRES_USER}
31 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
32 - POSTGRES_DB=activepieces
33 volumes:
34 - postgres-data:/var/lib/postgresql/data
35 networks:
36 - activepieces-network
37 restart: unless-stopped
38
39 redis:
40 image: redis:alpine
41 volumes:
42 - redis-data:/data
43 networks:
44 - activepieces-network
45 restart: unless-stopped
46
47volumes:
48 postgres-data:
49 redis-data:
50
51networks:
52 activepieces-network:
53 driver: bridge
54EOF
55
56# 2. Create the .env file
57cat > .env << 'EOF'
58# Activepieces
59POSTGRES_USER=activepieces
60POSTGRES_PASSWORD=secure_postgres_password
61ENCRYPTION_KEY=your-32-char-encryption-key-here
62JWT_SECRET=your-jwt-secret-key
63
64# Generate keys: openssl rand -hex 16
65EOF
66
67# 3. Start the services
68docker compose up -d
69
70# 4. View logs
71docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/activepieces-automation/run | bash

Troubleshooting

  • Activepieces container fails to start with database connection error: Verify PostgreSQL is running and environment variables match between services
  • Workflows fail to execute with Redis connection timeout: Check Redis container health and ensure AP_REDIS_HOST points to correct service name
  • Web interface loads but workflows don't save: Verify ENCRYPTION_KEY and JWT_SECRET are set and consistent across restarts
  • High memory usage during workflow execution: Increase Redis memory limits and consider Redis persistence configuration for large workflow queues
  • External webhooks not triggering workflows: Ensure AP_FRONTEND_URL matches your actual domain and firewall allows inbound connections on port 8080
  • PostgreSQL data corruption after container restart: Check volume permissions and ensure proper shutdown procedures for database container

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space