---
title: "Deploy Activepieces"
description: "Chat, agents, flows, tables, and 760+ apps in one workspace"
category: "AI/ML"
url: https://railway.com/deploy/deployactivepieces
---

# Deploy Activepieces

Chat, agents, flows, tables, and 760+ apps in one workspace

**[Deploy Activepieces on Railway](https://railway.com/template/deployactivepieces)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/deployactivepieces/manifest.json

- **Creator:** OpenSource Templates
- **Category:** AI/ML
- **Total deploys:** 2

## Template content

### Redis https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/redis.svg

- **Image:** redis:7.4.3

### Postgres https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgres.svg

- **Image:** postgres:17.4

### Activepieces https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/activepieces.svg

- **Image:** ghcr.io/activepieces/activepieces:0.91.1
- **Public domain:** Yes

## Documentation

# Deploy and Host Activepieces on Railway

Activepieces is an open-source, AI-powered workflow automation platform for connecting applications, APIs, data, and business processes. It is a self-hosted alternative to Zapier, Make, and n8n. This template deploys the full production stack on Railway — Activepieces, PostgreSQL, and Redis — with private networking, auto-generated secrets, and persistent volumes.

[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/new/template/deployactivepieces)

## About Hosting Activepieces

Hosting Activepieces on Railway means running three containers on Railway’s private network: the Activepieces application (workflow builder + engine), PostgreSQL for flows/runs/connections/users, and Redis for the job queue (BullMQ). Railway terminates TLS, so the app listens on port 80 internally while you get a public HTTPS domain. Persistent volumes keep Postgres data, Redis data, and the Activepieces cache across redeploys. Secrets (`AP_API_KEY`, `AP_ENCRYPTION_KEY`, `AP_JWT_SECRET`, `POSTGRES_PASSWORD`) are generated automatically. After the first deploy you only need to set `AP_FRONTEND_URL` to your public domain so webhooks and OAuth redirects work.

## Common Use Cases

- Replace Zapier / Make / n8n with a self-hosted, unlimited-task automation platform
- Build internal workflows that must stay on infrastructure you control (no third-party SaaS)
- Agency or multi-tenant automation — one Railway project, many flows, data that never leaves your account
- AI-agent + classic automation hybrid using Activepieces pieces and the built-in engine
- Privacy-sensitive or regulated environments where workflow data and credentials cannot leave your network

## Dependencies for Activepieces Hosting

- **Activepieces image:** `ghcr.io/activepieces/activepieces:0.91.1`
- **PostgreSQL 17.4** (`postgres:17.4`) — primary database for flows, executions, connections, and users
- **Redis 7.4.3** (`redis:7.4.3`) — queue and background processing
- **Railway private networking** — Activepieces reaches Postgres and Redis via `${{Postgres.RAILWAY_PRIVATE_DOMAIN}}` and `${{Redis.RAILWAY_PRIVATE_DOMAIN}}`
- **Three persistent volumes** — see Topology / Volumes below
- Auto-generated secrets for API key, encryption, JWT, and database password

Keep Postgres and Redis **private**; only the Activepieces service gets a public domain.

Upstream: [Activepieces Docs](https://www.activepieces.com/docs) · [Environment Variables](https://www.activepieces.com/docs/install/configuration/environment-variables) · [Community](https://community.activepieces.com)

### Implementation Details

This template is a direct Railway adaptation of the official Docker Compose / Umbrel-style stack:

| Service          | Image                                      | Role                            |
|------------------|--------------------------------------------|---------------------------------|
| **Activepieces** | `ghcr.io/activepieces/activepieces:0.91.1` | Public web service (port 80)    |
| **Postgres**     | `postgres:17.4`                            | Primary database                |
| **Redis**        | `redis:7.4.3`                              | Job queue                       |

Key environment wiring:

- `AP_POSTGRES_HOST` → `${{Postgres.RAILWAY_PRIVATE_DOMAIN}}`
- `AP_REDIS_HOST` → `${{Redis.RAILWAY_PRIVATE_DOMAIN}}`
- `AP_POSTGRES_PASSWORD` → `${{Postgres.POSTGRES_PASSWORD}}`
- `AP_EXECUTION_MODE=UNSANDBOXED` (required for single-container self-hosting)
- `AP_FRONTEND_URL` starts with a placeholder that you must replace with your real public HTTPS URL

## Topology

**Name the services exactly as written** (or update the private-domain references if you rename them). Private DNS uses Railway’s internal hostnames.

| Service          | Role                          | Volume                     | Public | Notes                       |
|------------------|-------------------------------|----------------------------|--------|-----------------------------|
| **Activepieces** | Workflow builder + engine     | `/usr/src/app/cache`       | Yes    | Port 80, restart on failure |
| **Postgres**     | Primary database              | `/var/lib/postgresql/data` | No     | `PGDATA` subdirectory used  |
| **Redis**        | Job queue                     | `/data`                    | No     | Restart on failure          |

#### Volumes (drives) — what to mount

Volumes are already defined in the template. They survive redeploys.

| Service          | Mount path                   | What is stored                         |
|------------------|------------------------------|----------------------------------------|
| **Postgres**     | `/var/lib/postgresql/data`   | Database files (`PGDATA` subdirectory) |
| **Redis**        | `/data`                      | Redis persistence                      |
| **Activepieces** | `/usr/src/app/cache`         | Application cache                      |

Railway: each service → **Settings** → **Volumes**. The template already attaches the correct paths.

## Quick Start

1. Click the **Deploy on Railway** button above.
2. Sign in (or create a free Railway account) and deploy.
3. Wait 2–4 minutes for the three services and volumes to come up.
4. Open the **Activepieces** service → **Settings** → **Networking** and note (or generate) the public domain.
5. **Required:** go to **Activepieces → Variables** and set  
   `AP_FRONTEND_URL` = `https://your-app.up.railway.app`  
   (exact public HTTPS URL, no trailing slash, no port). Redeploy if needed.
6. Visit the public URL, create the first admin account, and start building flows.

Webhooks, OAuth redirects, and app triggers will only work after `AP_FRONTEND_URL` is correct.

## Configuration

### Required after first deploy

| Variable          | Why it matters                                | Recommended value              |
|-------------------|-----------------------------------------------|--------------------------------|
| `AP_FRONTEND_URL` | Webhooks, OAuth callbacks, links in UI/emails | `https://` |

### Pre-configured (usually leave alone)

| Variable                           | Default                       | Notes                                   |
|------------------------------------|-------------------------------|-----------------------------------------|
| `AP_ENVIRONMENT`                   | `prod`                        | Production mode                         |
| `AP_EXECUTION_MODE`                | `UNSANDBOXED`                 | Required on Railway single-container    |
| `AP_POSTGRES_*`                    | Wired to Postgres service     | Private domain + generated password     |
| `AP_REDIS_*`                       | Wired to Redis service        | Private domain                          |
| `AP_FLOW_TIMEOUT_SECONDS`          | `600`                         | 10-minute max flow runtime              |
| `AP_WEBHOOK_TIMEOUT_SECONDS`       | `30`                          | Webhook request timeout                 |
| `AP_TRIGGER_DEFAULT_POLL_INTERVAL` | `5`                           | Minutes between polling-trigger runs    |
| `AP_TELEMETRY_ENABLED`             | `true`                        | Set `false` if you prefer               |
| `AP_TEMPLATES_SOURCE_URL`          | Official templates            | —                                       |

### Secrets (auto-generated)

- `AP_API_KEY`, `AP_ENCRYPTION_KEY`, `AP_JWT_SECRET`, `POSTGRES_PASSWORD`
- Changing `AP_ENCRYPTION_KEY` or `AP_JWT_SECRET` after credentials/users exist will break existing connections and force re-login. Treat them as permanent once set.

## Custom Domain

1. Activepieces service → **Settings** → **Networking** → **Custom Domain**.
2. Add your domain and follow Railway’s DNS instructions.
3. Update `AP_FRONTEND_URL` to `https://your.custom.domain`.
4. Redeploy Activepieces.

Railway provisions TLS automatically.

## Updating Activepieces

1. Activepieces service → **Settings** → **Source**.
2. Change the image tag (e.g. `0.91.1` → newer version).
3. Redeploy.

Check the [Activepieces changelog](https://www.activepieces.com/docs) before upgrading. Migrations usually run automatically on startup.

## Traps

**Ways this still fails:**

- **Wrong `AP_FRONTEND_URL`** — The template ships a placeholder with `http://` and a port. Webhooks and OAuth will break until you set the exact public `https://` domain (no port, no trailing slash).
- **Rotated secrets after first use** — Changing `AP_ENCRYPTION_KEY` or `AP_JWT_SECRET` makes existing encrypted connections unreadable and invalidates sessions. Restore the original values or re-create connections.
- **Private networking not ready** — Activepieces may start before Postgres/Redis are reachable. Wait a minute and restart the Activepieces service.
- **Postgres volume permissions** — The template sets `RAILWAY_RUN_UID=0` and uses a clean `PGDATA` subdirectory so initdb succeeds on Railway volumes.
- **Heavy concurrent flows on low memory** — Increase RAM on the Activepieces service if you see OOM kills (Hobby plan is fine for light use).
- **Renaming services** — If you rename Postgres or Redis, update `AP_POSTGRES_HOST` / `AP_REDIS_HOST` (or the corresponding private-domain references) accordingly.

View live logs: service → **Deployments** → latest deployment → **View Logs**.

## Why Deploy Activepieces on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Activepieces on Railway, you are one step closer to supporting a complete full-stack automation platform with minimal burden. Host your servers, databases, AI agents, and more on Railway.

---

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/deployactivepieces
