How to Deploy Activepieces - Open-Source Business Automation Platform

Updated on 04 August, 2026
Deploy Activepieces on a Linux server using Docker Compose with PostgreSQL, Redis, Traefik, automatic HTTPS, and custom automation workflows.
How to Deploy Activepieces - Open-Source Business Automation Platform header image

Activepieces is an open-source business automation platform that connects different apps and automates repetitive tasks without writing code. It provides a visual web interface for building flows that move data between tools automatically. Activepieces is widely used for lead management, marketing automation, and streamlining internal business operations.

This article explains how to deploy Activepieces on a Linux server using Docker Compose, PostgreSQL, Redis, and Traefik as a reverse proxy with HTTPS. It covers directory setup, environment variable configuration, deployment using Docker Compose, creating an administrator account, and building a sample automation flow through the web interface.

Prerequisites

Before you begin, you need to:

Set Up the Project Directory and Environment

Activepieces requires a configuration file to define environment variables, database connections, and application settings. The setup includes persistent storage for workflow data and execution logs, and uses Traefik to automatically secure the web interface with HTTPS.

  1. Create the project directory with subdirectories for configuration and data persistence.

    console
    $ mkdir -p ~/activepieces/{cache,letsencrypt,postgres,redis}
    
    • activepieces: The directory that holds your .env and docker-compose.yml files.
    • cache: Provides persistent storage for cached pieces and application execution data.
    • letsencrypt: Stores SSL/TLS certificates.
    • postgres: Persists PostgreSQL database files.
    • redis: Persists Redis data.
  2. Navigate to the project directory.

    console
    $ cd ~/activepieces
    
  3. Generate a 32-character encryption key for the Activepieces application.

    console
    $ openssl rand -hex 16
    
  4. Generate a 64-character secret key for JWT authentication.

    console
    $ openssl rand -hex 32
    
  5. Create an environment file to store configuration variables.

    console
    $ nano .env
    

    Add the following content, replacing the placeholder values with your own:

    ini
    # Domain and Security
    DOMAIN=active.example.com
    LETSENCRYPT_EMAIL=admin@example.com
    
    # Core App Settings
    AP_ENVIRONMENT=prod
    AP_FRONTEND_URL=https://active.example.com
    
    # Security Keys (Paste your generated keys here)
    AP_ENCRYPTION_KEY=PASTE_YOUR_32_CHARACTER_STRING_HERE
    AP_JWT_SECRET=PASTE_YOUR_64_CHARACTER_STRING_HERE
    
    # Database Settings
    AP_POSTGRES_DATABASE=activepieces
    AP_POSTGRES_USERNAME=postgres
    AP_POSTGRES_PASSWORD=CREATE_A_STRONG_PASSWORD_HERE
    AP_POSTGRES_HOST=postgres
    AP_POSTGRES_PORT=5432
    
    # Redis Settings
    AP_REDIS_HOST=redis
    AP_REDIS_PORT=6379
    

    Replace the following:

    • active.example.com with your registered domain name.
    • admin@example.com with your email address for Let's Encrypt certificate notifications.
    • PASTE_YOUR_32_CHARACTER_STRING_HERE with the 32-character output from the first openssl command.
    • PASTE_YOUR_64_CHARACTER_STRING_HERE with the 64-character output from the second openssl command.
    • CREATE_A_STRONG_PASSWORD_HERE with a secure database password.

    The AP_ENVIRONMENT and AP_FRONTEND_URL variables set the application's runtime mode and public URL. The AP_POSTGRES_HOST and AP_REDIS_HOST variables match the postgres and redis service names defined in the Docker Compose file, allowing the containers to reach each other over the internal network.

    Save and close the file.

Deploy with Docker Compose

The deployment stack consists of Traefik for reverse proxy and certificate management, plus the Activepieces container with mounted configuration and databases. This configuration uses the official Activepieces Docker image.

  1. Create the Docker Compose manifest.

    console
    $ nano docker-compose.yml
    
  2. Add the following content.

    yaml
    services:
      traefik:
        image: "traefik:v3.7.0"
        container_name: "traefik"
        restart: unless-stopped
        command:
          - "--providers.docker=true"
          - "--providers.docker.exposedbydefault=false"
          - "--entrypoints.web.address=:80"
          - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
          - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
          - "--entrypoints.websecure.address=:443"
          - "--certificatesresolvers.myresolver.acme.tlschallenge=true"
          - "--certificatesresolvers.myresolver.acme.email=${LETSENCRYPT_EMAIL}"
          - "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
        ports:
          - "80:80"
          - "443:443"
        volumes:
          - "./letsencrypt:/letsencrypt"
          - "/var/run/docker.sock:/var/run/docker.sock:ro"
        networks:
          activepieces:
            aliases:
              - "${DOMAIN}"
    
      app:
        image: ghcr.io/activepieces/activepieces:0.83.0
        container_name: activepieces-app
        restart: unless-stopped
        depends_on:
          - postgres
          - redis
        env_file: .env
        environment:
          - AP_CONTAINER_TYPE=WORKER_AND_APP
        volumes:
          - ./cache:/usr/src/app/cache
        labels:
          - "traefik.enable=true"
          - "traefik.http.routers.activepieces.rule=Host(`${DOMAIN}`)"
          - "traefik.http.routers.activepieces.entrypoints=websecure"
          - "traefik.http.routers.activepieces.tls.certresolver=myresolver"
          - "traefik.http.services.activepieces.loadbalancer.server.port=80"
        networks:
          - activepieces
    
      postgres:
        image: 'pgvector/pgvector:0.8.0-pg14'
        container_name: postgres
        restart: unless-stopped
        env_file: .env
        environment:
          - 'POSTGRES_DB=${AP_POSTGRES_DATABASE}'
          - 'POSTGRES_PASSWORD=${AP_POSTGRES_PASSWORD}'
          - 'POSTGRES_USER=${AP_POSTGRES_USERNAME}'
        volumes:
          - ./postgres:/var/lib/postgresql/data
        networks:
          - activepieces
    
      redis:
        image: 'redis:7.2'
        container_name: redis
        restart: unless-stopped
        volumes:
          - './redis:/data'
        networks:
          - activepieces
    
    networks:
      activepieces:
    

    Save and close the file.

    This manifest defines:

    • services: Four containers work together to deliver an automation platform with HTTPS.

      • traefik: Acts as a reverse proxy, routes incoming traffic to the application, and automatically obtains HTTPS certificates using Let's Encrypt. HTTP traffic on port 80 is automatically redirected to HTTPS.

      • postgres: Stores the core database using the pgvector PostgreSQL extension, including workflow configurations, user accounts, and execution history.

      • redis: Manages the background job queues, ensuring tasks pass efficiently between the app and workers.

      • app: Runs the Activepieces web server and API, providing the visual user interface for building flows.

    • image: Uses official container images from GitHub Container Registry (GHCR) and Docker Hub.

    • env_file: Links to your .env file so that sensitive settings like passwords and secret keys are kept separate from the compose configuration.

    • environment: Defines the role of the container and maps database credentials to the application settings.

    • volumes:

      • ./postgres: A mapped local folder that stores database files across container restarts.

      • ./redis: A mapped local folder that preserves the job queue data.

      • ./cache: A mapped local folder that stores cached pieces and temporary application data.

      • ./letsencrypt: A mapped local folder that stores SSL/TLS certificates.

    • ports: Ports 80 and 443 open HTTP and HTTPS traffic through Traefik for public access.

    • labels: Tell Traefik how to route HTTPS traffic to the Activepieces web interface and which internal port to use.

    • depends_on: Ensures that the application waits for postgres and redis to be ready before starting.

    • restart: unless-stopped: Ensures all services automatically restart if they crash or if the server reboots.

    • networks: Creates a private internal network (activepieces) so the containers can communicate securely without exposing every service to the public internet. The aliases entry on the traefik service resolves DOMAIN to Traefik's internal network address, allowing the app container to reach its own public URL directly over the Docker network. Without this alias, requests from app back to DOMAIN fail because most cloud providers do not route a server's own public IP back to itself.

  3. Launch the containers.

    console
    $ docker compose up -d
    
  4. Verify that the services are running.

    console
    $ docker compose ps
    

    The output displays four running containers: activepieces-app, postgres, redis, and traefik, with ports 80 and 443 exposed.

  5. Check the application logs to confirm that Activepieces loaded the configuration successfully.

    console
    $ docker compose logs app
    

    The output includes a line confirming the application started and bound to the configured domain, similar to The application started on https://active.example.com/api/, as specified by the AP_FRONTEND_URL variable.

    For more information on managing a Docker Compose stack, see the How to Use Docker Compose article.

Access Activepieces

Activepieces provides a visual web interface for building, managing, and monitoring automation flows. The first access requires creating an administrator account that has full permissions across all workflows, application connections, and system settings.

  1. Open your web browser and navigate to https://active.example.com, replacing active.example.com with your configured domain. The padlock icon in the address bar confirms that Traefik provisioned a Let's Encrypt certificate.

  2. On the sign-up screen, enter your first name, last name, email, and password, then click Sign Up.

  3. Enter a Platform Name (for example, My Automation Platform) to create your workspace.

    Dashboard

Build an Automation Flow

A webhook-triggered flow verifies that Activepieces is running correctly, that PostgreSQL is persisting data, and that the background workers are functional. The following steps create a flow that accepts an HTTP request via a webhook and returns a JSON response.

  1. Click Start from scratch under the Build a Flow section to create a new automation workflow.

  2. Click the trigger block, search for Webhook, and select Catch Webhook as the trigger.

  3. Click Test Trigger under Generate Sample Data.

  4. When the Action Required prompt appears, click Generate Sample Data.

  5. In the Send Sample Data to Webhook dialog that opens, click Send to dispatch a sample GET request to the webhook.

  6. Verify that the trigger panel shows Tested Successfully and displays the captured request as Result #1. The sample data is now available for testing downstream actions.

  7. Click the + button below the trigger to add an action, then select Return Response from the Sub Flows category.

  8. In the Return Response panel, set Response Type to JSON.

  9. Enter the following in the Body field:

    json
    {
      "message": "Workflow executed successfully"
    }
    
  10. Click Publish to activate the workflow.

  11. Click Test Flow to enter test mode.

  12. Hover over the Catch Webhook trigger block on the canvas, and click trigger to simulate an incoming webhook request using the captured sample data.

  13. Verify that both the Catch Webhook and Return Response steps show a Succeeded badge on the canvas. The execution time displayed under each step confirms that the flow ran end-to-end.

Conclusion

You have deployed Activepieces on your server using Docker Compose with Traefik for automatic HTTPS. This setup provides a self-hosted business automation platform with a visual interface for building custom workflows. The persistent PostgreSQL and Redis databases keep your workflow data and background queues safe across server restarts. For advanced features, including building custom pieces, configuring webhooks, and team collaboration, visit the official Activepieces documentation.

Comments