---
title: "Deploy Twenty"
description: "Twenty CRM [Sep'26]: open-source Salesforce alternative. No per-seat fees."
category: "CMS"
url: https://railway.com/deploy/twenty-salesforce-alternative
---

# Deploy Twenty

Twenty CRM [Sep'26]: open-source Salesforce alternative. No per-seat fees.

**[Deploy Twenty on Railway](https://railway.com/template/twenty-salesforce-alternative)**

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

- **Creator:** SilverBanana
- **Category:** CMS
- **Total deploys:** 6

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### Twenty Worker https://raw.githubusercontent.com/twentyhq/twenty/6fd8dab55243cda291fa45f896caaa9d5e5160b8/packages/twenty-chrome-extension/public/logo/32-32.svg

- **Image:** twentycrm/twenty:latest

### Twenty https://raw.githubusercontent.com/twentyhq/twenty/6fd8dab55243cda291fa45f896caaa9d5e5160b8/packages/twenty-chrome-extension/public/logo/32-32.svg

- **Image:** twentycrm/twenty:latest

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1
- **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"`

## Buckets

- **Bucket**

## Documentation

# Deploy and Host Twenty CRM on Railway

Twenty is the open-source CRM built to replace Salesforce — **45k+ GitHub stars**, Y Combinator
S23, AGPL-3.0, and free forever when self-hosted. A modern React interface that feels like
Notion, custom objects and fields with no SQL migrations, Airtable-style tables and Kanban
pipelines, workflow automation, full RBAC, and a complete GraphQL + REST API where every object
you create is instantly available. Built by a Paris team for technical teams that want to own
their customer data instead of renting it.

**A 10-person team pays ~$19,800/year for Salesforce Enterprise.** HubSpot Sales Professional
runs ~$100/user/month. Twenty self-hosted on Railway costs ~$10–20/month flat for the whole
team — no per-seat fees, no feature gates, no data lock-in.

---

## What This Template Deploys

| Service | Purpose |
|---|---|
| **Twenty Server** | NestJS backend + React frontend — CRM UI, GraphQL/REST API, workflow engine, and auth on the public web service |
| **Twenty Worker** | Background worker — email sync, scheduled workflows, and async jobs |
| **PostgreSQL 16** | Primary database — companies, people, opportunities, custom objects, and all CRM data |
| **Redis** | Cache and job queue backing the worker and real-time features |

All services connect over Railway's private network. Server and worker share the same image and
`APP_SECRET` — this template wires them together automatically via reference variables.

---

## About Hosting Twenty

Twenty is a production-grade CRM — React frontend, NestJS backend, PostgreSQL, and Redis — and
running it means coordinating four moving parts with a shared secret, database migrations on
deploy, and a public HTTPS endpoint. The official path is Docker Compose on a VPS you manage;
this template does the same wiring on Railway with zero server administration.

Railway provisions the server, worker, PostgreSQL, and Redis over private networking, runs
migrations automatically, and serves the app over HTTPS. Your CRM data lives in your own
PostgreSQL instance — export it, migrate it, or fork the whole platform at any time.

Typical cost: **~$10–20/month** on Railway's Hobby plan for the full four-service stack.
Salesforce Sales Cloud Enterprise is $165/user/month; HubSpot Sales Professional is
~$100/user/month plus onboarding fees. Twenty self-hosted has no per-seat license — the cost is
flat compute no matter how many people you add.

---

## Deploy in Under 5 Minutes

1. Click **Deploy on Railway** — all four services build automatically (~4–5 minutes)
2. `APP_SECRET` and database credentials are auto-generated and shared across server and worker
3. Set `SERVER_URL` to your Railway public domain (required for correct links and auth)
4. Open your Railway URL and create your first workspace and admin account
5. Import contacts via CSV or the API, or start building custom objects immediately

No Docker Compose. No migration scripts. No shared-secret wiring by hand.

---

## Common Use Cases

- **Self-hosted alternative to Salesforce** — replace $165/user/month Enterprise licensing with
  flat Railway compute; custom objects and RBAC that Salesforce reserves for premium tiers are
  included free
- **Self-hosted alternative to HubSpot** — modern pipeline CRM without the ~$100/user/month
  Professional pricing or the onboarding fees, with your data on your own infrastructure
- **Developer-first CRM you extend as code** — define objects, fields, and views with the Twenty
  SDK and version your CRM like the rest of your stack via the GraphQL/REST API
- **Custom CRM for non-standard data** — model "Properties," "Legal Cases," "Patients," or any
  domain object in the Data Model UI with no SQL and no code
- **Agency multi-client CRM** — stand up isolated Twenty workspaces per client with
  TypeScript-level customization; self-hosting makes multi-tenant setups tractable
- **Startup CRM that scales without per-seat cost** — add your whole growing team at flat
  infrastructure cost instead of watching a per-user bill climb with headcount

---

## Configuration

| Variable | Required | Description |
|---|---|---|
| `APP_SECRET` | ✅ Auto-generated | Shared secret for tokens — must be identical across server and worker |
| `SERVER_URL` | ✅ Required | Your Railway public domain — required for correct links and authentication |
| `PG_DATABASE_URL` | ✅ Auto-injected | PostgreSQL connection string via Railway reference variable |
| `REDIS_URL` | ✅ Auto-injected | Redis connection URI via Railway reference variable |
| `STORAGE_TYPE` | Pre-set | `local` by default; set to `s3` for external object storage of attachments |
| `EMAIL_DRIVER` | Optional | `smtp` to enable email sync and invitations — pair with an SMTP provider |
| `IS_SIGN_UP_DISABLED` | Recommended | Set `true` after creating your account to block public sign-ups |
| `PORT` | Auto-set | Railway injects the port automatically |

> `APP_SECRET` must match on both the server and worker services — this template shares it via a
> reference variable automatically. On Railway Hobby, raw SMTP is blocked, so use an HTTPS-based
> relay (Resend, Brevo) for email sync and workspace invitations.

---

## Twenty vs. CRM Alternatives

| | Twenty (Railway) | Salesforce | HubSpot | EspoCRM |
|---|---|---|---|---|
| **Monthly cost** | ~$10–20 flat | $165/user | ~$100/user | Self-hosted |
| **10-person team/year** | ~$120–240 | ~$19,800 | ~$14,500+ | Self-hosted |
| **Per-seat license** | ✅ None | ❌ Yes | ❌ Yes | ✅ None |
| **Custom objects (no code)** | ✅ Free | ❌ Premium tier | ❌ Enterprise | ✅ Yes |
| **GraphQL + REST API** | ✅ Auto for every object | ⚠️ Limited | ⚠️ Tiered | ✅ REST |
| **Modern UI** | ✅ Notion-like | ⚠️ Dated | ✅ Good | ⚠️ Functional |
| **Data ownership** | ✅ Your PostgreSQL | ❌ Salesforce | ❌ HubSpot | ✅ Yes |
| **Open source** | ✅ AGPL-3.0 | ❌ No | ❌ No | ✅ Yes |

---

## Dependencies for Twenty Hosting

- Railway account — Hobby plan (~$10–20/month) covers the four-service stack
- SMTP provider (Resend or Brevo) for email sync and invitations — raw SMTP is blocked on Hobby
- Optional: S3-compatible storage for attachments in large deployments

### Deployment Dependencies

- [Twenty GitHub Repository](https://github.com/twentyhq/twenty) — source and releases
- [Twenty Documentation](https://docs.twenty.com) — self-hosting and configuration reference
- [Twenty Developer SDK](https://docs.twenty.com) — define objects and logic as code
- [Railway Volumes Documentation](https://docs.railway.com/volumes) — persistent storage

### Implementation Details

This template deploys Twenty's server and worker (same image, shared `APP_SECRET`) alongside
PostgreSQL 16 and Redis over Railway's private network. Database migrations run automatically on
deploy. The server exposes the CRM UI and the GraphQL/REST API; the worker handles email sync,
scheduled workflows, and async jobs through the Redis queue.

Set `SERVER_URL` to your Railway public domain immediately after deploy — without it, auth
callbacks and record links point to the wrong host. All CRM data persists in PostgreSQL
independently of the containers, so redeploys and version updates never touch your workspace.

---

## Frequently Asked Questions

**How much does Twenty save versus Salesforce or HubSpot?**
A 10-person team pays roughly $19,800/year for Salesforce Sales Cloud Enterprise or ~$14,500 for
HubSpot Sales Professional in year one. Twenty self-hosted on Railway costs ~$120–240/year in
compute with no per-seat fees. The savings grow with every seat you add.

**Is the self-hosted version feature-limited compared to Twenty Cloud?**
No per-seat gating — self-hosted Twenty includes the full CRM: custom objects, pipelines,
workflows, RBAC, and the API, free for unlimited users. A paid Organization plan adds
enterprise extras like SSO/SAML and row-level permissions; the core CRM is complete without it.

**Can I migrate from Salesforce or HubSpot?**
Yes. Twenty imports contacts, companies, and deals via CSV or its API, with documented patterns
for migrations of 50,000+ records. Platform-specific automations (Salesforce Flows, HubSpot
sequences) don't transfer — you rebuild those in Twenty's workflow engine.

**What are Twenty's current limitations?**
Reporting and forecasting are basic compared to Salesforce, the workflow engine handles standard
automation but not Salesforce Flow-level complexity, and the app ecosystem is younger. For
advanced automation, teams often pair Twenty with n8n or Zapier. Core CRM (contacts, companies,
deals, custom objects, API) is production-stable.

**Do I lose my CRM data if Railway redeploys?**
No. All companies, people, opportunities, custom objects, and settings live in the Railway-
managed PostgreSQL database. Redeploys, updates, and restarts don't affect your workspace data.

**Can AI agents work with Twenty?**
Yes. Twenty exposes a full GraphQL and REST API where every object and field you create is
automatically available — so Claude, Cursor, or any agent can read and write CRM data
programmatically. Twenty Cloud also ships a native MCP server for direct agent integration.

---

## Why Deploy and Host Twenty 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 Twenty on Railway, you get a modern open-source CRM — custom objects, pipelines,
workflows, RBAC, and a full API — that replaces Salesforce at flat ~$10–20/month with no per-seat
fees and complete ownership of your customer data.

## Similar templates

- [Libredesk - Complete Setup](https://railway.com/deploy/libredesk-complete-setup) — Complete self-hosted omnichannel customer support desk.
- [Paperless-ngx](https://railway.com/deploy/paperless-ngx-3) — Paperless-ngx — document management with OCR and full-text search
- [Instatic CMS - Postgres](https://railway.com/deploy/instatic-cms-postgres) — Design, build and manage powerful static sites from state-of-the-art CMS

Open this page in a browser: https://railway.com/deploy/twenty-salesforce-alternative
