
Deploy Twenty
Open-source CRM and Salesforce alternative with worker, Postgres
twenty
Just deployed
/app/packages/twenty-server/.local-storage
twenty-worker
Just deployed
Redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
Deploy and Host self hosted Twenty (Open-Source CRM) on Railway
This template deploys Twenty v2.48.0, the open-source CRM from Twenty.com, as a self-hosted Salesforce alternative. It runs the official image with a server, worker, Postgres 16, and Redis 8.2, all on volumes; no deploy-time input, secrets generated automatically.
About Hosting Twenty open-source software on Railway (self hosted Twenty template)
This template runs Twenty v2.48.0 using the official twentycrm/twenty image pinned by digest, with a server, a background worker, Postgres 16, and Redis 8.2, all on persistent volumes. You still control updates and configuration.
Why Deploy Twenty, the Salesforce alternative on Railway (Railway Free Trial)
Self-hosting Twenty costs nothing for the software itself. You keep CRM data on your own infrastructure, avoid Salesforce per-seat licenses, and stay clear of vendor lock-in. Railway's $5 free trial covers a first deploy, so you can test the full stack before paying roughly $10 to $25 a month for teams.
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.
Railway vs Other Hosting Providers and VPS for Twenty self hosting
Railway gives you the whole Twenty stack, not just a VM, so you spend time on CRM setup instead of infrastructure.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | Managed app hosting with server, worker, Postgres, and Redis wired together | A Droplet VPS where you install and maintain every service yourself |
| AWS | One template deploy with generated secrets and persistent volumes | EC2, RDS, and ElastiCache you must configure, secure, and patch |
| Hetzner | Flat usage-based billing and no per-service setup decisions | Cheap raw compute with a manual Docker Compose workflow |
For a small team CRM, Railway removes the parts of VPS hosting that eat the most time.
Common Use Cases for hosted Twenty
- Agency CRM: Run deal pipelines, contacts, and client notes for a small consultancy without per-seat SaaS fees, with teammates invited to the Railway-hosted instance.
- Internal operations: Track vendors, partners, or investor relations using custom objects and fields in Twenty's Notion-style interface, all on your own Postgres volume.
- Sales pipeline automation: Schedule follow-ups and sync Gmail or Google Calendar once OAuth credentials are configured, with email and calendar jobs handled by the twenty-worker service.
- Data ownership and compliance: Keep customer records in a Postgres volume you control on Railway, useful when contracts or privacy rules require self-hosted storage.
- Product-led onboarding: Use Twenty's REST API and webhooks to push signups from your application into Twenty as new companies or people, then trigger workflows from there.
Dependencies for Twenty Docker hosted on Railway
The Railway template wires Twenty v2.48.0 into four services: the server and web app on port 3000, a separate worker, Postgres 16, and Redis 8.2. Volumes persist uploads, the database, and the queue, while APP_SECRET and ENCRYPTION_KEY are generated per deploy.
Deployment Dependencies for Managed Twenty Service (Open-Source CRM)
Twenty needs Postgres 16 for its main store and Redis 8.2 for queues and cache. The server exposes port 3000 with /healthz and uses /app/packages/twenty-server/.local-storage for files. The worker uses the same image, starts with /app/entrypoint.sh yarn worker:prod, and handles email and calendar sync, workflows, and webhooks.
Implementation Details for Twenty (Using the official Twenty v2.48.0 image)
Railway pins the official twentycrm/twenty image by digest. The server runs migrations on start; the worker disables migrations and cron registration. Open the domain after deploy and sign up to create the workspace.
How does Twenty compare against other CRMs
Twenty vs Salesforce (Salesforce Alternative)
- Licensing: Twenty is free to self-host under AGPL-3.0, so Railway deployments avoid Salesforce per-user license fees.
- Customization: Twenty has custom objects and a Notion-like UI, but Salesforce wins on AppExchange add-ons and enterprise workflow scale.
- Hosting control: Twenty keeps data in your own Postgres and Redis volumes, while Salesforce is proprietary SaaS.
Twenty vs HubSpot (HubSpot Alternative)
- Scope: Twenty covers contacts, companies, opportunities, workflows and APIs, but HubSpot wins on bundled marketing and service hubs.
- Pricing: Self-hosted Twenty costs roughly $10-25/mo on Railway, while HubSpot paid hubs get expensive as contacts scale.
- Data ownership: Twenty stores everything in your Railway volumes, so there is no contact-based pricing or data sharing pressure.
Twenty vs Pipedrive (Pipedrive Alternative)
- Sales focus: Pipedrive wins on simpler pipeline management, polished mobile apps and sales onboarding.
- Extensibility: Twenty adds custom objects, GraphQL/REST APIs and webhooks, which fit teams that need more than a deal board.
Twenty vs Odoo (Odoo Alternative)
- Scope: Odoo wins on breadth, with CRM, accounting and inventory; Twenty is focused on CRM and has a cleaner Notion-like interface.
- Open source: Twenty is AGPL-3.0, while Odoo Community is LGPL but many features sit in paid enterprise modules.
How to use Twenty (the OSS Open-Source CRM)?
- Open your Railway public domain in a browser, sign up with your email, and the first user automatically creates the workspace.
- Invite teammates from Settings, assign them roles, and define permission levels for each object.
- Import companies, people, and opportunities from CSV files, mapping columns to your custom fields.
- Customize objects and fields in Settings, then build table or kanban views for each pipeline stage.
- Set up workflows that trigger on record changes to automate follow-ups, status updates, and notifications.
- Connect Gmail or Google Calendar by adding OAuth credentials as environment variables, then restart the server service.
- Generate API keys from Settings for GraphQL or REST access, and configure webhooks for integration.
How to self host Twenty on other VPS Services (Twenty self hosting guide)
Clone the Repository
Clone the repo and check out v2.48.0: git clone https://github.com/twentyhq/twenty.git; cd twenty; git checkout v2.48.0.
Install Dependencies
Use Docker Compose from packages/twenty-docker, or install Node.js 20, Yarn, Postgres 16, and Redis 8.2 manually. On a typical VPS, Docker is simpler: docker compose -f packages/twenty-docker/docker-compose.yml up -d.
Configure Environment Variables
Copy .env.example to .env and set SERVER_URL=https://your-domain, APP_SECRET, ENCRYPTION_KEY, PG_DATABASE_URL, REDIS_URL, and STORAGE_TYPE=local. Add Google or Microsoft OAuth variables later for inbox and calendar sync.
Start the Twenty Application
Run docker compose up -d, open your-domain, and sign up. The first user creates the workspace, and migrations run on boot. Railway handles all of that for you: it pins the v2.48.0 image, generates secrets, attaches Postgres and Redis, and starts server plus worker without any deploy-time input.
Official Pricing of Twenty (Twenty pricing)
Twenty is open source under the AGPL-3.0 license, so self-hosting the software itself is free. You only pay for the infrastructure you run it on, like the Railway services for the app, worker, Postgres, and Redis.
Twenty cloud vs self hosted comparison (Pricing, features, costs, and more)
Twenty Cloud removes ops work and adds managed updates plus per-user billing, but self hosting keeps the same AGPL-3.0 CRM with no license fee. On Railway, you only pay infrastructure, so the choice is mostly who runs Postgres, Redis, and the two app services.
Monthly cost of self hosting Twenty on Railway
Plan for about $10-25/mo at small-team scale, covering the Twenty server, worker, Postgres 16, and Redis 8.2 volumes. The $5 Railway trial offsets early testing. Twenty itself is free, but you handle backups, upgrades, and monitoring.
System Requirements for Hosting Twenty on a VPS
Give the VPS at least 2 GB RAM, plus room for Postgres and Redis. Two CPU cores and 20 GB disk are comfortable for a small workspace; file uploads and the database grow with use. The official compose setup expects the same Postgres and Redis dependencies as the Railway template.
Frequently Asked Questions (FAQs)
Do I need to configure a database separately?
No. The Railway template includes Postgres 16 and Redis 8.2 with persistent volumes. The Twenty server runs migrations on start, and the worker uses the same connection strings. Both are provisioned automatically.
Can I use my own domain?
Yes. Set SERVER_URL to your custom domain, or keep Railway's public domain. Make sure HTTPS is on for Gmail and Google Calendar OAuth.
Who is the first admin?
The first person to open the deployed URL and sign up creates the workspace and becomes admin. You can then invite teammates and assign roles in Settings.
How do I turn on email and calendar sync?
Add OAuth app credentials from Google or Microsoft as environment variables on the server and worker services. Restart them, then connect accounts under Settings.
Can I change APP_SECRET after deployment?
No. APP_SECRET encrypts sensitive data and signs tokens, so rotating it after data exists will break existing sessions and encrypted fields. Keep the generated value.
Template Content
