Deploy Activepieces
Chat, agents, flows, tables, and 760+ apps in one workspace
Redis
Just deployed
/data
Postgres
Just deployed
/var/lib/postgresql/data
Activepieces
Just deployed
/usr/src/app/cache
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.
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 · Environment Variables · Community
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_URLstarts 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
- Click the Deploy on Railway button above.
- Sign in (or create a free Railway account) and deploy.
- Wait 2–4 minutes for the three services and volumes to come up.
- Open the Activepieces service → Settings → Networking and note (or generate) the public domain.
- 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. - 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_KEYorAP_JWT_SECRETafter credentials/users exist will break existing connections and force re-login. Treat them as permanent once set.
Custom Domain
- Activepieces service → Settings → Networking → Custom Domain.
- Add your domain and follow Railway’s DNS instructions.
- Update
AP_FRONTEND_URLtohttps://your.custom.domain. - Redeploy Activepieces.
Railway provisions TLS automatically.
Updating Activepieces
- Activepieces service → Settings → Source.
- Change the image tag (e.g.
0.91.1→ newer version). - Redeploy.
Check the Activepieces changelog before upgrading. Migrations usually run automatically on startup.
Traps
Ways this still fails:
- Wrong
AP_FRONTEND_URL— The template ships a placeholder withhttp://and a port. Webhooks and OAuth will break until you set the exact publichttps://domain (no port, no trailing slash). - Rotated secrets after first use — Changing
AP_ENCRYPTION_KEYorAP_JWT_SECRETmakes 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=0and uses a cleanPGDATAsubdirectory 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.
Template Content
