Deploy Twenty Webhooks

Push CRM record changes from Twenty to your own endpoints

Deploy Twenty Webhooks

Just deployed

Just deployed

/app/packages/twenty-server/.local-storage

/var/lib/postgresql/data

Just deployed

/data

Deploy and Host self hosted Twenty Webhooks (Webhooks for Self-Hosted CRM Automation) on Railway

This template runs Twenty CRM plus its background worker, so outbound webhooks fire on person, company and opportunity record changes.

About Hosting Twenty Webhooks open-source software on Railway (self hosted Twenty CRM outbound webhooks and signature verification template)

This template runs the official Twenty CRM image as a full stack: a twenty server, a twenty-worker for background jobs, Postgres 16 and Redis 8.2.

Railway generates APP_SECRET and ENCRYPTION_KEY, wires the database and Redis connections, and provides a public domain for SERVER_URL.

Why Deploy Twenty Webhooks, the HubSpot alternative on Railway (Railway Free Trial)

HubSpot webhooks tie you to their app settings, plan tiers and change schedule, and you can't inspect how their signing works.

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 Webhooks 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 Webhooks self hosting

Twenty Webhooks needs a public server, Postgres and Redis, so the host decides how much you assemble yourself.

ProviderWhat You Get with RailwayWhat You Get with the Other Provider
DigitalOceanTwenty server, worker, Postgres and Redis deployed from one template with a public domain.A Droplet you manage, so you install Docker, Postgres, Redis and TLS yourself.
AWSServices wired together without an IAM or VPC setup step.Full networking control, but you own security groups, RDS and ElastiCache.
HetznerPublic domains and linked services with no reverse proxy to configure.Cheap raw servers, but you run the compose stack, backups and firewall yourself.

Running Twenty on a VPS you already pay for is cheaper per month, but expect real setup and upkeep time.

Common Use Cases for hosted Twenty Webhooks

  • Syncing new records into a data warehouse: Subscribe a small receiver to person.created and company.created, then forward each payload to your warehouse so analysts see new leads within minutes.
  • Pinging Slack when an opportunity moves: Point the webhook at a service that reads opportunity.updated, checks whether the stage changed, and posts to the sales channel only when it did.
  • Mirroring deletes into an archive: On person.deleted and company.deleted, copy the record to cold storage first, since Twenty sends the event but won't keep your copy.
  • Kicking off enrichment on person.created: Verify the signature first, then queue an enrichment job so unsigned traffic never reaches your paid data provider.
  • Auditing changes against another system: Compare each record.updated payload with your source of truth and log mismatches, filtering in your receiver since Twenty doesn't filter events yet.

Dependencies for Twenty Webhooks Docker hosted on Railway

This section covers what has to be running before a webhook can fire.

Deployment Dependencies for Managed Twenty Webhooks Service (CRM)

  • twenty service: runs the server and web app on public port 3000, with health check at /healthz and a volume mounted at /app/packages/twenty-server/.local-storage for uploaded files.
  • twenty-worker service: uses the same Twenty image with the start command /app/entrypoint.sh yarn worker:prod, and handles background jobs including webhooks.
  • Postgres 16: stores workspace data, with its own volume.
  • Redis 8.2: serves as the queue and cache, with its own volume.

Implementation Details for Twenty Webhooks (Using Twenty official docker image)

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

How does Twenty Webhooks compare against other ways to get CRM record changes into external services

Twenty Webhooks vs HubSpot webhooks (HubSpot Alternative)

  • Setup Model: Twenty webhooks are created in Settings / Developers / Webhooks with a URL and a Save click, so you own the receiver. HubSpot routes webhooks through app settings tied to a HubSpot app.
  • Event Scope: Twenty sends Record Created, Record Updated and Record Deleted events with no per-event filtering yet. HubSpot lets you subscribe to specific object and property changes.
  • Where HubSpot Wins: Its webhook tooling is more mature and its ecosystem has far more prebuilt integrations.

Twenty Webhooks vs Salesforce outbound messages (Salesforce Alternative)

  • Protocol: Twenty posts plain JSON with event, data and timestamp fields, plus an HMAC SHA256 signature you check yourself. Salesforce outbound messages send SOAP notifications.
  • Configuration: Twenty is a few clicks in the UI, while Salesforce outbound messages sit inside workflow rules and need admin access.
  • Where Salesforce Wins: Its criteria-based triggers and enterprise governance are far more flexible.

Twenty Webhooks vs Pipedrive webhooks (Pipedrive Alternative)

  • Payload: Both send JSON to a URL on record changes, so a receiver written for one is close to working with the other.
  • Verification: Twenty gives you an X-Twenty-Webhook-Signature header to check against your secret. You build that check yourself, which takes a few lines of code.
  • Where Pipedrive Wins: Its webhook setup and deal-level event coverage are more established for sales teams.

Twenty Webhooks vs Attio webhooks (Attio Alternative)

  • Scope: Attio covers record and list events in a modern workspace model, while Twenty focuses on person, company and opportunity records plus custom objects.
  • Self Hosting: Twenty runs on your own Railway project or VPS, so event data stays in your infrastructure. Attio is managed SaaS with less ops work.
  • Where Attio Wins: It is less work to operate, and its list-level events are richer.

How to use Twenty Webhooks (the OSS CRM)?

  1. Open Settings, then Developers, then Webhooks. Click + Create webhook, enter a publicly reachable receiver URL, click Save, and confirm it is active.
  2. Deploy a receiver that accepts POST requests and returns a 2xx status.
  3. Store the webhook secret in an environment variable.
const crypto = require("crypto");

function verify(req, secret) {
  const ts = req.headers["x-twenty-webhook-timestamp"];
  const sig = req.headers["x-twenty-webhook-signature"];
  const expected = crypto
    .createHmac("sha256", secret)
    .update(`${ts}:${JSON.stringify(req.body)}`)
    .digest("hex");
  return expected === sig;
}

Parsed bodies can break the match, so check raw bytes where you can.

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

Running Twenty on your own VPS means you own webhook dispatch too, so the worker matters as much as the web server.

Clone the Repository

Pull the official repo and move into the Docker folder.

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

Install Dependencies

Twenty needs Postgres and Redis, which the compose file includes.

Configure Environment Variables

Copy the example env file, set your public URL and generate the two secrets.

cp .env.example .env
# set SERVER_URL=https://your-domain
# set APP_SECRET and ENCRYPTION_KEY to 32-character random values

Start the Twenty Webhooks Application

Bring the stack up and confirm both the server and the worker are healthy, since webhooks stop firing if only the server runs.

docker compose up -d
docker compose ps
curl -s https://your-domain/healthz

Railway handles the reverse proxy, TLS certificates and service wiring for you, which is most of what these steps cover on a bare VPS.

Official Pricing of Twenty Webhooks (Twenty pricing)

Self hosting Twenty and its webhook dispatch is free and open source under AGPL-3.0, so there is no license fee to pay for the webhook feature itself.

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

Your real choice is between running the Twenty stack yourself and paying for Twenty Cloud.

Monthly cost of self hosting Twenty Webhooks on Railway

Expect roughly $10-25 per month for the server, worker, Postgres and Redis at small-team use.

System Requirements for Hosting Twenty Webhooks on a VPS

Upstream suggests at least 2 GB of RAM, plus Postgres and Redis running alongside.

Frequently Asked Questions (FAQs)

How do I create a webhook in Twenty CRM?

Go to Settings, then Developers, then Webhooks, click + Create webhook, enter a publicly reachable receiver URL, and click Save.

Which events does Twenty send for records?

Twenty sends Record Created, Record Updated and Record Deleted events, such as person.created, company.updated and opportunity.deleted.

What does the webhook payload contain?

The JSON body has three top-level fields: event, data (the full record) and timestamp (the UTC time the event occurred).

How do I verify the X-Twenty-Webhook-Signature header?

Read X-Twenty-Webhook-Timestamp, build the string timestamp:payload, compute an HMAC SHA256 with your webhook secret loaded from an environment variable, hex-encode it, and compare it to the signature header.

Why does my signature check fail after parsing the body?

Re-serializing a parsed body can change whitespace or key order, which breaks the HMAC match.

How do webhooks differ from Workflow HTTP Request steps and Workflow Webhook Triggers?

Webhooks are outbound and fire on any record change.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
50
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51