docs/install/options/docker-compose.mdx
One line writes the config, generates your secrets, and starts everything.
Run it in the folder where you want Activepieces to live:
curl -fsSL https://get.activepieces.com | sh
Or hand it to your AI assistant:
<Prompt description="Install Activepieces with an AI assistant" icon="sparkles" actions={["copy", "cursor"]}>
Install Activepieces on this machine by running curl -fsSL https://get.activepieces.com | sh from a folder I choose. It needs Docker Compose v2, so check docker compose version first and tell me if it is missing. If port 8080 is already in use, re-run with --port and a free port. When it finishes, confirm the stack is healthy with docker compose -p activepieces ps and curl http://localhost:8080/api/v1/health, then tell me the URL to open and remind me to back up the generated .env file.
</Prompt>
Use this if you would rather not pipe a remote script into a shell, or your change process needs the compose file in front of it before anything starts.
You get the same four containers, set up by hand.
<Accordion title="Show the manual steps" icon="wrench"> **1. Get the compose file**git clone --depth 1 https://github.com/activepieces/activepieces.git
cd activepieces
2. Generate your secrets
sh tools/deploy.sh
This copies .env.example to .env and fills in the passwords and keys. It needs openssl. If openssl is missing it will still report success while leaving the values blank, so check before you continue:
grep -E '^(AP_ENCRYPTION_KEY|AP_JWT_SECRET|AP_POSTGRES_PASSWORD)=' .env
Every one of those must have a value. If any is empty, install openssl and run sh tools/deploy.sh again.
3. Set the edition
Add this to .env. Without it you get the Community edition, and you will not be able to activate a license key later.
AP_EDITION=ee
AP_EXECUTION_MODE=SANDBOX_CODE_ONLY
.env.example ships AP_EXECUTION_MODE=UNSANDBOXED, which the server rejects at startup on ee.
4. Point the worker at the app
In docker-compose.yml, give the worker service its own AP_FRONTEND_URL:
worker:
environment:
- AP_CONTAINER_TYPE=WORKER
- AP_FRONTEND_URL=http://app
Both services share .env, where AP_FRONTEND_URL is your public URL. That address means "the app" to a browser but "myself" to the worker container, so without this override the worker cannot open its socket and the Workers page stays empty.
5. Start it
docker compose -p activepieces up -d
Go to http://localhost:8080, or http://<your-server-ip>:<your-port> if you installed on a remote server or changed the port.
The first account you create becomes the platform administrator. There is no default username or password.
<Warning> Your secrets are written to `activepieces/.env`. Back that file up.Without AP_ENCRYPTION_KEY, stored connections cannot be decrypted, even from a full database backup.
</Warning>
docker compose -p activepieces ps
curl http://localhost:8080/api/v1/health
All four containers should be Up, and the health endpoint should respond.
Then sign in and open Platform Admin → Infrastructure → Workers. You should see at least one worker. If the list is empty, see Troubleshooting.
Four containers, defined in activepieces/docker-compose.yml:
| Container | Role |
|---|---|
app | API and UI, served on port 8080 |
worker | Runs your flows |
postgres | Flows, runs, and connections |
redis | Job queue |
Your data is not in the activepieces folder. It lives in the postgres_data Docker volume, so backing up the folder does not back up your flows.
Your install runs on the free plan by default.
If you have a trial or paid license key, activate it to unlock the paid features. See License key.
Skip this if your server already has a public URL.
Webhooks and app triggers need an address that third parties can reach. On a personal machine, expose it with a tunnel such as ngrok:
ngrok http 8080
Then set AP_FRONTEND_URL in .env to the ngrok URL and restart.
Back up first:
docker compose -p activepieces exec postgres pg_dump -U postgres activepieces > backup.sql
Then upgrade:
curl -fsSL https://get.activepieces.com | sh -s -- --upgrade
Your .env, your data, and any edits to docker-compose.yml are left alone.
Stop Activepieces and keep your data:
curl -fsSL https://get.activepieces.com | sh -s -- --uninstall
Stop it and delete everything, including the database:
curl -fsSL https://get.activepieces.com | sh -s -- --uninstall --purge
docker compose version
If that errors, you are on Compose v1. The old docker-compose will not work with this setup. Install Docker Compose v2.
</Accordion>
docker compose -p activepieces logs worker | grep -i socket
Repeated Socket.IO connection error means AP_FRONTEND_URL on the worker points at an address that does not resolve from inside the container. localhost refers to the worker itself, not the app. It must be the app's service name on the Docker network:
worker:
environment:
- AP_FRONTEND_URL=http://app
The app's own AP_FRONTEND_URL should stay as your public URL. See Websocket Issues.
</Accordion>
curl -fsSL https://get.activepieces.com | sh -s -- --port 8090
On an existing install, change AP_HOST_PORT in .env and run docker compose -p activepieces up -d.
Do not set AP_PORT. That is the app's own listen port inside the container, and changing it breaks the port mapping.
</Accordion>
docker compose -p activepieces logs app | grep -i "failed to start"
A common cause is AP_EXECUTION_MODE=UNSANDBOXED with AP_EDITION=ee, which is rejected at startup. Use SANDBOX_CODE_ONLY instead. See Sandboxing Mode.
</Accordion>
For the full list of settings, see Environment Variables. </Note>