---
title: "Deploy Twenty Workflows"
description: "Automate CRM records with Twenty workflow triggers"
category: "Other"
url: https://railway.com/deploy/deploy-twenty-crm-workflows
---

# Deploy Twenty Workflows

Automate CRM records with Twenty workflow triggers

**[Deploy Twenty Workflows on Railway](https://railway.com/template/deploy-twenty-crm-workflows)**

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

- **Creator:** onepush
- **Category:** Other

## Template content

### twenty

- **Image:** twentycrm/twenty:v2.48.0@sha256:43fab4bffacdcd63ff3c9257b7f8985a4424d81e9eb43982b9c16a841d555e52
- **Health check:** /healthz
- **Public domain:** Yes

### twenty-worker

- **Image:** twentycrm/twenty:v2.48.0@sha256:43fab4bffacdcd63ff3c9257b7f8985a4424d81e9eb43982b9c16a841d555e52
- **Start command:** `/app/entrypoint.sh yarn worker:prod`

### Postgres

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:16.15@sha256:34c3e49e7ed2aaef6c575fb23bb37b878007e97752d3bf27ccb550046f893ca7

### Redis

- **Image:** redis:8.2.10@sha256:47670742d7924adbcdb404d1288b6327815b23141969c0939b8e5d61f78c2634
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH --maxmemory-policy noeviction --bind '* -::*'"`

## Documentation

# Deploy and Host self hosted Twenty Workflows (Open-Source CRM with Workflow Automation) on Railway

This template deploys Twenty with its workflow engine, so CRM automations run on your own infrastructure.

## About Hosting Twenty Workflows open-source software on Railway (self hosted Twenty CRM workflows template)

Twenty Workflows keeps your records, workflow definitions and run history in your own Postgres database, not a vendor's cloud.

Railway manages the containers, volumes, generated APP_SECRET and ENCRYPTION_KEY values, and the REDIS_URL and PG_DATABASE_URL wiring.

## Why Deploy Twenty Workflows, the HubSpot workflows alternative on Railway (Railway Free Trial)

HubSpot workflows sit behind its paid hubs, and the price climbs with every seat and contact tier.

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 Twenty Workflows on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

### Railway vs Other Hosting Providers and VPS for Twenty Workflows self hosting

Twenty Workflows needs a server, a worker, Postgres and Redis, so here is how Railway compares.

| Provider | What You Get with Railway | What You Get with the Other Provider |
| --- | --- | --- |
| DigitalOcean | Four linked services from one template and a public domain for webhooks. | Full root access and cheap droplets, but you install Docker and run Postgres and Redis yourself. |
| AWS | A single deploy path with managed volumes and a public URL. | Huge service catalog and fine-grained networking, with more setup to maintain. |
| Hetzner | A managed deploy flow with less patching and hardening work. | Low raw server cost, but you handle OS updates, TLS and process supervision. |

If you want workflows firing fast without becoming a sysadmin, Railway is the shorter path.

## Common Use Cases for hosted Twenty Workflows

Most teams end up here because a rep forgets a follow-up, and a workflow can handle the boring part. These are the scenarios we see most often on a self hosted Twenty CRM.

- **Create a task when a deal moves to won:** Use a Record is Updated trigger on Opportunities, add an If/else branch on the stage field, then a Create Record action that drops an onboarding task on the owner's list.
- **Webhook trigger from a form tool:** Paste the trigger's unique URL into your form tool and upsert a Person by email so new leads land in the CRM.
- **Scheduled stale-deal checks:** An On a Schedule trigger (runs in UTC) can search for opportunities untouched for 30 days and flag them for the owner.
- **Sending emails from a workflow:** Send Email goes to one recipient per action from a mailbox synced to your account, so connect Gmail or Microsoft first.
- **Code actions for data cleanup:** A Code action can normalize phone numbers or trim company names, and you should check the Runs panel when something misfires.

## Dependencies for Twenty Workflows Docker hosted on Railway

Twenty Workflows runs as two containers from the same official image, and both need the same Postgres and Redis behind them.

### Deployment Dependencies for Managed Twenty Workflows Service (CRM)

On Railway you get four services: twenty (public port 3000, health check at /healthz, volume at /app/packages/twenty-server/.local-storage for uploads), twenty-worker (start command /app/entrypoint.sh yarn worker:prod), Postgres 16 with a volume, and Redis 8.2 with a volume for the queue and cache.

### Implementation Details for Twenty Workflows (Using Twenty official docker image)

The server runs migrations on start, so it keeps DISABLE_DB_MIGRATIONS=false and DISABLE_CRON_JOBS_REGISTRATION=false.

## How does Twenty Workflows compare against other CRM automation tools

Twenty Workflows runs inside the CRM, so you build triggers and actions against your own objects. Each comparison below notes where the other tool wins.

### Twenty Workflows vs HubSpot workflows (HubSpot Alternative)

- **Hosting and cost:** Twenty is self hosted, so you pay for servers rather than a hub-based license.
- **Triggers:** Record created, updated, deleted, manual, scheduled, and webhook triggers let CRM events drive work.
- **Where HubSpot wins:** Its marketing automation and templates are more mature, and nothing needs running yourself.

### Twenty Workflows vs Salesforce Flow (Salesforce Alternative)

- **Openness:** Twenty is AGPL-3.0 open source, so you can read, change, and host it without per-user licensing.
- **Scope:** Flow is a deep builder tied to the Salesforce platform, while Twenty stays focused on CRM records, branches, and iterators.
- **Where Salesforce wins:** Flow handles very complex enterprise processes and has a large admin ecosystem.

### Twenty Workflows vs Pipedrive automations (Pipedrive Alternative)

- **Customization:** Custom objects and fields let workflows act on pipelines that don't fit a fixed shape.
- **Run visibility:** Each run is recorded under the workflow's Runs panel, so you can see what fired and why.
- **Where Pipedrive wins:** Its pipeline automations are simpler to set up, and it is fully managed.

### Twenty Workflows vs Zapier (Zapier Alternative)

- **Scope:** Twenty keeps automation inside the CRM so record changes stay in one place.
- **Data location:** Twenty runs on your own Postgres and Redis, so CRM data stays on infrastructure you control.
- **Where Zapier wins:** Its app connector catalog is far larger, making it better when automations span many unrelated tools.

## How to use Twenty Workflows (the OSS CRM)?

Once the deploy finishes, open the domain, sign in, and follow these steps.

1. Open **Workflows** and click **New workflow**.
2. Name it something you'll recognize, like "Deal won, create onboarding task."
3. Pick a trigger: Record is Created, Record is Updated, Manual, On a Schedule, or Webhook. Manual is easiest for a first test.
4. Add actions such as Update Record, Send Email, or HTTP Request.
5. For different paths, add a branch by dragging two connections off one node.
6. Test with a sample record and check the output in the step panel.
7. Activate it. Later edits go to a draft until you activate again.
8. Watch each execution, including failures, in the **Runs** panel.

Webhook triggers give you a unique URL. Test it like this:

```bash
curl -X POST https://your-twenty-domain/webhooks/your-workflow-id \
  -H "Content-Type: application/json" \
  -d '{"email": "lead@example.com"}'
```

## How to self host Twenty Workflows on other VPS Services (Twenty self hosting guide)

If you'd rather run Twenty Workflows on a plain VPS, the official Docker setup from the repo gets you there.

### Clone the Repository

Clone the Twenty repo and move into the Docker folder.

```bash
git clone https://github.com/twentyhq/twenty.git
cd twenty/packages/twenty-docker
```

### Install Dependencies

Make sure Docker and Docker Compose are installed on your server. Then pull the images so the first start doesn't stall.

```bash
docker compose pull
```

### Configure Environment Variables

Copy the sample env file and set your public URL and secrets.

```bash
SERVER_URL=https://your-domain
APP_SECRET=your-generated-32-char-secret
ENCRYPTION_KEY=your-generated-32-char-key
STORAGE_TYPE=local
```

Run migrations on the server and turn them off on the worker, so workflows and cron jobs run in the worker process.

### Start the Twenty Workflows Application

Bring the stack up in detached mode, then open your domain and sign up. The first user creates the workspace.

```bash
docker compose up -d
```

Railway handles the Postgres, Redis, TLS and worker wiring for you, so you skip most of this.

## Official Pricing of Twenty Workflows (Twenty pricing)

Self hosting Twenty Workflows is free. Twenty is open source under AGPL-3.0, so there is no license fee for the server, worker, or workflow engine.

Twenty Cloud sells paid per-user plans (Pro and Organization) listed on twenty.com/pricing.

## Twenty Workflows cloud vs self hosted comparison (Pricing, features, costs, and more)

Self hosting Twenty Workflows is free to start, so the real decision is who runs the worker, migrations, Postgres, and Redis.

### Monthly cost of self hosting Twenty Workflows on Railway

On Railway you pay for four services: the twenty server, the twenty-worker, Postgres 16, and Redis 8.2. For a small team that usually lands around $10 to $25 per month.

### System Requirements for Hosting Twenty Workflows on a VPS

Upstream suggests at least 2 GB of RAM, and that covers the whole stack, not just the web app.

## Frequently Asked Questions (FAQs)

### Which triggers can start a Twenty workflow?

You can start a workflow on record created, record updated, record updated or created, or record deleted.

### Can I edit a workflow that is already active?

Yes, but edits go to a draft while the active version keeps running. Activate the draft when it's ready, or use "Use as draft" to restore an older version.

### Where do I see runs and errors?

Each run is stored as a record you can inspect in the Runs panel or the Workflow Runs view. Open a run to see which step failed and what data it used.

### Does Send Email need a connected account?

Yes, it sends from a mailbox synced to your account, so connect one first. It accepts one recipient per action. Use Draft Email if a person should review the message first.

### How long can a Code action run?

Each Code action is backed by its own logic function, and API keys must be typed into the function body. Keep the logic short and focused on data cleanup.

### How do I keep webhook triggers secure?

Treat each webhook URL as a secret and avoid sharing it in documents. If a URL leaks, recreate the trigger to get a new one.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/deploy-twenty-crm-workflows
