Skip to main content
To configure activepieces, you will need to set some environment variables, There is file called .env at the root directory for our main repo.
When you execute the deploy.sh script in the Docker installation tutorial, it will produce these values.

Environment Variables

The frontend URL is essential for webhooks and app triggers to work. It must be accessible to third parties to send data.

Separate Workers from api

To separate workers from API servers, you can achieve this by setting AP_FLOW_WORKER_CONCURRENCY to zero on API servers, while keeping it on worker servers.

Enabling Sign-Up:

To enable the sign-up feature, you need to ensure the code runs safely on the machine, especially if you don’t trust the users. Follow these two steps:
  1. Make the Docker container privileged: Edit the docker-compose.yml file and add privileged: true. This allows the container to have additional permissions to sandbox.
  2. Change the execution mode to sandboxing: Modify the AP_EXECUTION_MODE setting to SANDBOXED. This ensures the code runs within a secure environment, isolated from the rest of the system.
  3. Modify the AP_SIGN_UP_ENABLED to true , the environment variable.

Enable Code Generator

To enable the code generator button, please provide a value for the AP_OPENAI_API_KEY environment variable.

Setting Webhook (Frontend URL):

The default URL is set to the machine’s IP address. To ensure proper operation, ensure that this address is accessible or specify an AP_FRONTEND_URL environment variable. One possible solution for this is using a service like ngrok (https://ngrok.com/), which can be used to expose the frontend port (4200) to the internet.

Setting Piece Source

These are the different options for the AP_PIECES_SOURCE environment variable:
  1. FILE: Only for Local Development, this option loads pieces directly from local files. For Production, please consider using other options, as this one only supports a single version per piece.
  2. DB: This option will only load pieces that are manually installed in the database from “My Pieces” or the Admin Console in the EE Edition. Pieces are loaded from npm, which provides multiple versions per piece, making it suitable for production.
You can also set AP_PIECES_SYNC_MODE to OFFICIAL_AUTO, where it will update the metadata of pieces periodically.