Activepieces + PostgreSQL + Redis
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:latest4 environment: 5 - AP_ENGINE_EXECUTABLE_PATH=dist/packages/engine/main.js6 - AP_POSTGRES_HOST=postgres7 - AP_POSTGRES_PORT=54328 - AP_POSTGRES_DATABASE=activepieces9 - AP_POSTGRES_USERNAME=${POSTGRES_USER}10 - AP_POSTGRES_PASSWORD=${POSTGRES_PASSWORD}11 - AP_REDIS_HOST=redis12 - AP_REDIS_PORT=637913 - AP_ENCRYPTION_KEY=${ENCRYPTION_KEY}14 - AP_JWT_SECRET=${JWT_SECRET}15 - AP_FRONTEND_URL=http://localhost:808016 ports: 17 - "8080:80"18 depends_on: 19 - postgres20 - redis21 networks: 22 - activepieces-network23 restart: unless-stopped2425 postgres: 26 image: postgres:1527 environment: 28 - POSTGRES_USER=${POSTGRES_USER}29 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}30 - POSTGRES_DB=activepieces31 volumes: 32 - postgres-data:/var/lib/postgresql/data33 networks: 34 - activepieces-network35 restart: unless-stopped3637 redis: 38 image: redis:alpine39 volumes: 40 - redis-data:/data41 networks: 42 - activepieces-network43 restart: unless-stopped4445volumes: 46 postgres-data: 47 redis-data: 4849networks: 50 activepieces-network: 51 driver: bridge.env Template
.env
1# Activepieces2POSTGRES_USER=activepieces3POSTGRES_PASSWORD=secure_postgres_password4ENCRYPTION_KEY=your-32-char-encryption-key-here5JWT_SECRET=your-jwt-secret-key67# Generate keys: openssl rand -hex 16Usage Notes
- 1Web UI at http://localhost:8080
- 2Visual workflow builder
- 3100+ integrations
- 4Custom code pieces
- 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 file2cat > docker-compose.yml << 'EOF'3services:4 activepieces:5 image: activepieces/activepieces:latest6 environment:7 - AP_ENGINE_EXECUTABLE_PATH=dist/packages/engine/main.js8 - AP_POSTGRES_HOST=postgres9 - AP_POSTGRES_PORT=543210 - AP_POSTGRES_DATABASE=activepieces11 - AP_POSTGRES_USERNAME=${POSTGRES_USER}12 - AP_POSTGRES_PASSWORD=${POSTGRES_PASSWORD}13 - AP_REDIS_HOST=redis14 - AP_REDIS_PORT=637915 - AP_ENCRYPTION_KEY=${ENCRYPTION_KEY}16 - AP_JWT_SECRET=${JWT_SECRET}17 - AP_FRONTEND_URL=http://localhost:808018 ports:19 - "8080:80"20 depends_on:21 - postgres22 - redis23 networks:24 - activepieces-network25 restart: unless-stopped2627 postgres:28 image: postgres:1529 environment:30 - POSTGRES_USER=${POSTGRES_USER}31 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}32 - POSTGRES_DB=activepieces33 volumes:34 - postgres-data:/var/lib/postgresql/data35 networks:36 - activepieces-network37 restart: unless-stopped3839 redis:40 image: redis:alpine41 volumes:42 - redis-data:/data43 networks:44 - activepieces-network45 restart: unless-stopped4647volumes:48 postgres-data:49 redis-data:5051networks:52 activepieces-network:53 driver: bridge54EOF5556# 2. Create the .env file57cat > .env << 'EOF'58# Activepieces59POSTGRES_USER=activepieces60POSTGRES_PASSWORD=secure_postgres_password61ENCRYPTION_KEY=your-32-char-encryption-key-here62JWT_SECRET=your-jwt-secret-key6364# Generate keys: openssl rand -hex 1665EOF6667# 3. Start the services68docker compose up -d6970# 4. View logs71docker compose logs -fOne-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 | bashTroubleshooting
- 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
Components
activepiecespostgresqlredis
Tags
#activepieces#automation#workflow#no-code#integrations
Category
Productivity & CollaborationAd Space
Shortcuts: C CopyF FavoriteD Download