---
title: "Deploy Twenty"
description: "Modern self-hosted open-source CRM for sales, workflows & customer data"
category: "Automation"
url: https://railway.com/deploy/twenty
---

# Deploy Twenty

Modern self-hosted open-source CRM for sales, workflows & customer data

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

- **Creator:** codestorm
- **Category:** Automation
- **Total deploys:** 14

## Template content

### Server https://mintcdn.com/twenty/vG9yThgsV6f7S2k3/logo.svg?fit=max&auto=format&n=vG9yThgsV6f7S2k3&q=85&s=8c6cbd9599fa6e3dd24b6b737a4c8d49

- **Image:** twentycrm/twenty:latest
- **Public domain:** Yes

### 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"`

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

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

### Worker https://mintcdn.com/twenty/vG9yThgsV6f7S2k3/logo.svg?fit=max&auto=format&n=vG9yThgsV6f7S2k3&q=85&s=8c6cbd9599fa6e3dd24b6b737a4c8d49

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

## Buckets

- **Bucket**

## Documentation

# Deploy and Host Twenty on Railway

**Twenty** is the #1 open-source CRM and a modern, flexible alternative to Salesforce. Designed for technical teams and growing businesses, Twenty provides customizable data models, powerful visual workflows, AI capabilities, beautiful dashboards, and deep extensibility — all while giving you full control over your data and infrastructure.

## About Hosting Twenty

Hosting Twenty on Railway provides a complete, production-ready self-hosted CRM stack that can be deployed in **one click**. 

This template automatically provisions:

- **Server** (`twentycrm/twenty:latest`) — The main application serving the web UI, API, authentication, and business logic.
- **Worker** (`twentycrm/twenty:latest`) — Dedicated background processor for workflows, emails, cron jobs, and long-running tasks.
- **Postgres** — Primary relational database with persistent storage for companies, contacts, opportunities, custom objects, and all CRM data.
- **Redis** — In-memory cache and queue system powering real-time features and background jobs.
- **Railway Bucket** — Managed S3-compatible object storage provided directly by Railway for handling file uploads, attachments, images, and documents.

The template is intentionally designed to be **extremely simple to deploy**. Because it uses native **Railway Bucket**, the required S3 credentials (`ACCESS_KEY_ID`, `SECRET_ACCESS_KEY`, `ENDPOINT`, `BUCKET`, `REGION`) are automatically provided through Railway Variable References. 

In most cases, **you don't need to manually configure anything** for the bucket — the references are pre-wired in the template. All other services use secure, production-ready defaults with healthchecks, persistent volumes, and correct inter-service networking already configured.

## Common Use Cases

- Self-hosted sovereign CRM for sales, support, marketing, and customer success teams
- Custom internal platform with flexible data models and automated workflows
- Multi-client / agency CRM where each workspace has its own custom schema
- Building AI-powered customer operations tools without vendor lock-in

## Why Twenty CRM Stands Out

While many CRM options exist, **Twenty** is specifically built for modern technical teams who want a beautiful experience, deep flexibility, and full control — without vendor lock-in or outdated interfaces.

### Twenty vs Other Popular CRMs

| Feature                        | **Twenty CRM**                                      | Salesforce / HubSpot                          | Other Open Source (Odoo, EspoCRM, SuiteCRM) |
|--------------------------------|-----------------------------------------------------|-----------------------------------------------|---------------------------------------------|
| **Open Source & Self-Hosting** | ✅ Full open source + full parity with cloud       | ❌ Closed source + strong vendor lock-in     | ✅ Open source, but often legacy architecture |
| **Modern UI/UX**               | ✅ Premium 2025 SaaS feel — clean, fast, delightful | ⚠️ Powerful but can feel bloated & complex   | ❌ Frequently dated interfaces               |
| **Custom Data Models**         | ✅ Extremely flexible (custom objects per workspace) | ✅ Possible but complex & expensive          | ⚠️ Limited or rigid data models              |
| **AI-Native Design**           | ✅ Built for AI from the ground up                 | ⚠️ AI features added later                   | ❌ Rarely AI-first                           |
| **Developer Extensibility**    | ✅ Excellent SDK & DX (v2.0+)                      | ⚠️ Requires proprietary tools (e.g. Apex)    | ⚠️ Varies, often limited                     |
| **Data Sovereignty & Cost**    | ✅ Full control, free to self-host & scale         | ❌ Expensive + no ownership of your data     | ✅ Free, but hidden maintenance & ops cost   |

**Twenty is the clear winner** when you want a modern, flexible, developer-friendly CRM that you can self-host with confidence.

## Dependencies for Twenty Hosting

- **PostgreSQL** — Core database (included & pre-configured)
- **Redis** — Caching, sessions, and job queues (included & pre-configured)
- **Railway Bucket** — Managed S3-compatible object storage by Railway (automatically provides credentials via Variable References)

### Deployment Dependencies

This template uses the following official components:

- **Server & Worker**: `twentycrm/twenty:latest`
- **Redis**: `redis:8.2.1` (with volume `/data`)
- **Postgres**: Railway Postgres template (with volume `/var/lib/postgresql/data`)
- **Railway Bucket**: Managed S3-compatible object storage provided by Railway (with automatic variable references)

**Official Resources:**
- Twenty Documentation: https://docs.twenty.com
- GitHub Repository: https://github.com/twentyhq/twenty
- Docker Image: https://hub.docker.com/r/twentycrm/twenty

### Implementation Details

The Server and Worker use the exact same Docker image but run different processes (web server vs. `yarn worker:prod`). Both connect to the shared Postgres, Redis, and Bucket services.

Storage configuration (`STORAGE_TYPE=s3`, `S3_ENDPOINT`, `S3_BUCKET`, credentials, etc.) is injected from the **Bucket** service variables you configure before deployment.

Persistent volumes are automatically attached for data durability.

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

## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — [Jul'26] WhatsApp automation platform using Evolution API, n8n & PostgreSQL
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

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