The quickest way to get Activepieces running is using a single Docker container. This is ideal for development, testing, or small-scale production deployments.
For production deployments with multiple workflows, we recommend using Docker Compose or Kubernetes for better scalability and separation of concerns.
Quick Start
Deploy Activepieces with a single command:
docker run -d \
--name activepieces \
-p 8080:80 \
-e AP_POSTGRES_DATABASE=activepieces \
-e AP_POSTGRES_HOST=postgres \
-e AP_POSTGRES_PORT= 5432 \
-e AP_POSTGRES_USERNAME=postgres \
-e AP_POSTGRES_PASSWORD=your_secure_password \
-e AP_REDIS_HOST=redis \
-e AP_REDIS_PORT= 6379 \
-e AP_FRONTEND_URL=http://localhost:8080 \
-e AP_ENCRYPTION_KEY= $( openssl rand -hex 32 ) \
-e AP_JWT_SECRET= $( openssl rand -hex 32 ) \
-v activepieces_cache:/usr/src/app/cache \
ghcr.io/activepieces/activepieces:0.79.0
This command requires separate PostgreSQL and Redis containers. For an all-in-one solution, use Docker Compose .
Understanding the Docker Image
Image Details
Registry : GitHub Container Registry (ghcr.io)
Repository : ghcr.io/activepieces/activepieces
Base Image : node:20.19-bullseye-slim
Architecture : Multi-stage build for optimized size
What’s Included
System Dependencies
The image includes essential system packages:
Python 3 : For native module compilation
Build tools : g++, make, git
PDF support : poppler-utils for PDF processing
Bun : Fast package manager (v1.3.1)
PM2 : Process manager for scaling
Runtime Components
Application components:
API Server : Backend application (Node.js + Fastify)
Frontend : Angular web app served by Nginx
Engine : Workflow execution engine
isolated-vm : Sandboxing library for secure code execution
Configuration
Nginx : Serves frontend on port 80
Entrypoint : Custom script for environment setup
Volume : /usr/src/app/cache for temporary files
Dockerfile Breakdown
Here’s how the Activepieces image is built:
Stage 1: Base Image
FROM node:20.19-bullseye-slim AS base
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
openssh-client \
python3 \
g++ \
build-essential \
git \
poppler-utils \
poppler-data \
procps \
locales \
unzip \
curl \
ca-certificates \
libcap-dev
# Install Bun package manager
RUN export ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then \
curl -fSL https://github.com/oven-sh/bun/releases/download/bun-v1.3.1/bun-linux-x64-baseline.zip -o bun.zip; \
elif [ "$ARCH" = "aarch64" ]; then \
curl -fSL https://github.com/oven-sh/bun/releases/download/bun-v1.3.1/bun-linux-aarch64.zip -o bun.zip; \
fi && \
unzip bun.zip && \
mv bun-*/bun /usr/local/bin/bun && \
chmod +x /usr/local/bin/bun
# Install global Node packages
RUN npm install -g --no-fund --no-audit \
node-gyp \
npm@9.9.3 \
pm2@6.0.10 \
typescript@4.9.4
# Install isolated-vm for sandboxing
RUN cd /usr/src && bun install isolated-vm@5.0.1
Stage 2: Build
FROM base AS build
WORKDIR /usr/src/app
# Install dependencies
COPY .npmrc package.json bun.lock bunfig.toml ./
COPY packages/ ./packages/
RUN bun install --frozen-lockfile
# Build application
COPY . .
RUN npx turbo run build --filter=web --filter=@activepieces/engine --filter=api
Stage 3: Runtime
FROM base AS run
WORKDIR /usr/src/app
# Install Nginx for serving frontend
RUN apt-get update && \
apt-get install -y --no-install-recommends nginx gettext
# Copy nginx configuration
COPY nginx.react.conf /etc/nginx/nginx.conf
# Copy built application
COPY --from=build /usr/src/app/dist/packages/engine/ ./dist/packages/engine/
COPY --from=build /usr/src/app/dist/packages/web /usr/share/nginx/html/
# Copy entrypoint script
COPY docker-entrypoint.sh .
RUN chmod +x docker-entrypoint.sh
ENTRYPOINT [ "./docker-entrypoint.sh" ]
EXPOSE 80
Entrypoint Script
The container uses a custom entrypoint script that:
#!/bin/sh
# Set default values if not provided
export AP_APP_TITLE = "${ AP_APP_TITLE :- Activepieces }"
export AP_FAVICON_URL = "${ AP_FAVICON_URL :- https :// cdn . activepieces . com / brand / favicon . ico }"
# Process environment variables in index.html
envsubst '${AP_APP_TITLE} ${AP_FAVICON_URL}' < /usr/share/nginx/html/index.html > /usr/share/nginx/html/index.html.tmp && \
mv /usr/share/nginx/html/index.html.tmp /usr/share/nginx/html/index.html
# Start Nginx server
nginx -g "daemon off;" &
# Start backend server
if [ " $AP_CONTAINER_TYPE " = "APP" ] && [ " $AP_PM2_ENABLED " = "true" ]; then
echo "Starting backend server with PM2 (APP mode)"
pm2-runtime start packages/server/api/dist/src/bootstrap.js --name "activepieces-app" --node-args= "--enable-source-maps" -i 0
else
echo "Starting backend server with Node.js (WORKER mode or default)"
node --enable-source-maps packages/server/api/dist/src/bootstrap.js
fi
Port Configuration
The container exposes port 80 internally, which you map to your host:
Port 8080 (Default)
Port 80 (HTTP)
Custom Port
Volume Mounts
Mount volumes to persist data:
docker run -d \
-v activepieces_cache:/usr/src/app/cache \
ghcr.io/activepieces/activepieces:0.79.0
The /usr/src/app/cache directory stores temporary files during workflow execution. This should be persisted to avoid data loss.
Environment Variables
See the Environment Variables page for a complete list of configuration options.
Minimum required variables:
# Database
AP_POSTGRES_DATABASE = activepieces
AP_POSTGRES_HOST = postgres
AP_POSTGRES_USERNAME = postgres
AP_POSTGRES_PASSWORD = your_password
# Redis
AP_REDIS_HOST = redis
AP_REDIS_PORT = 6379
# Security
AP_ENCRYPTION_KEY = your_32_char_hex_key
AP_JWT_SECRET = your_jwt_secret
# Application
AP_FRONTEND_URL = http://localhost:8080
Using Environment Files
Create a .env file and use it with Docker:
docker run -d \
--name activepieces \
-p 8080:80 \
--env-file .env \
-v activepieces_cache:/usr/src/app/cache \
ghcr.io/activepieces/activepieces:0.79.0
Health Checks
Add health checks to your container:
docker run -d \
--name activepieces \
--health-cmd= "curl -f http://localhost:80/v1/health || exit 1" \
--health-interval=30s \
--health-timeout=10s \
--health-retries=3 \
-p 8080:80 \
ghcr.io/activepieces/activepieces:0.79.0
Check container health:
docker ps --format "table {{.Names}}\t{{.Status}}"
Container Management
Start/Stop
Logs
Shell Access
# Start container
docker start activepieces
# Stop container
docker stop activepieces
# Restart container
docker restart activepieces
# View logs
docker logs activepieces
# Follow logs
docker logs -f activepieces
# Last 100 lines
docker logs --tail 100 activepieces
# Interactive shell
docker exec -it activepieces /bin/bash
# Run command
docker exec activepieces node --version
Updating Activepieces
Pull latest image
docker pull ghcr.io/activepieces/activepieces:latest
Stop current container
docker stop activepieces
docker rm activepieces
Start new container
docker run -d \
--name activepieces \
-p 8080:80 \
--env-file .env \
-v activepieces_cache:/usr/src/app/cache \
ghcr.io/activepieces/activepieces:latest
Always backup your database before updating to a new version.
Troubleshooting
Check logs for errors: Common issues:
Missing required environment variables
Cannot connect to PostgreSQL or Redis
Port already in use
Cannot access on port 8080
Verify port mapping: Check if Nginx is running: docker exec activepieces ps aux | grep nginx
Check container stats: docker stats activepieces
Consider limiting memory: docker run --memory=4g ghcr.io/activepieces/activepieces:0.79.0
Next Steps
Configure Environment Learn about all configuration options
Setup Database Configure PostgreSQL for production
Docker Compose Upgrade to multi-container setup
Scaling Scale your deployment