Self-host Twenty CRM on Railway as a HubSpot alternative
Short answer: Twenty is an open-source CRM for companies, people and opportunities. You can run it for your startup by deploying Tracklayer’s Twenty v2 template on Railway. It starts a web server, a separate background worker, Postgres, Redis and a file bucket in your own project, so customer data stays with you and there are no per-seat licence fees. Plan for the Hobby plan or above.
Deploy Twenty CRM on RailwayWhen a self-hosted CRM makes sense
A hosted CRM charges per user and keeps your contacts on someone else’s servers. Self-hosting Twenty is a fit when:
- you run a sales pipeline of companies, contacts and opportunities for a small team,
- you want Gmail or Microsoft 365 mail and calendars on a shared customer timeline,
- you want follow-ups and data updates automated with workflows and webhooks,
- you plan to build internal tools on its GraphQL and REST APIs.
The trade-off is that you operate it: upgrades, backups and mail setup are your job.
CRM templates people deploy on Railway
| Template | Creator | Deployments | Services |
|---|---|---|---|
| Twenty CRM | TMSD | 1,873 | 4 |
| Twenty v2 CRM Sales Workspace | Tracklayer | 13 | 4 |
| ERPNext v16 Business Suite | Tracklayer | 4 | 4 |
| Odoo 20 Business Apps Suite | Tracklayer | 3 | 2 |
Railway marketplace data as of 2026-11-19. Full ranking: Best open-source CRM templates on Railway.
Compare the services each template starts. A CRM that syncs mail needs a worker process as well as the web server, and it needs somewhere to keep attachments.
Deploy Twenty, step by step
These steps use Tracklayer’s Twenty v2 template, which runs twentycrm/twenty:v2.45.8.
- Deploy the template. There is nothing to enter. All secrets, including the encryption key, are generated for you.
- Wait for the first deploy. The Twenty service runs database migrations in a pre-deploy step and becomes healthy on
/healthz. - Create your workspace. Open the public URL. The first account you create becomes the workspace admin, so do this straight away.
- Invite your team under Settings, then Members. Without SMTP the invite link is printed in the Twenty service logs.
- Set up outgoing mail. Fill the
EMAIL_SMTP_*variables on the Twenty service, or use Settings, then Admin Panel, and redeploy. - Optional: connect Gmail or Outlook. Create a Google Cloud OAuth client or a Microsoft Entra app, register the two callback URLs shown in the variables, add the client ID and secret, set the matching
*_ENABLEDflags totrue, and redeploy both Twenty services.
Persistence
Postgres and Redis each have a volume. Attachments and uploaded files go to a Railway Bucket, so the Twenty server keeps no local state and can run several replicas. Add replicas to Twenty Worker if mail sync or workflow volume grows.
Cost
The template’s TEMPLATE.md gives estimates, not measurements, at Railway’s usage prices of 10 USD per GB of RAM per month, 20 USD per vCPU per month and 0.15 USD per GB of volume per month:
| Load | RAM across services | Estimated monthly cost |
|---|---|---|
| Idle | about 1.1 GB | about 12 USD |
| Typical, 5 to 25 users | about 1.95 GB | about 27 USD |
The Twenty server and the worker are the main memory users. The template names Hobby as the minimum plan: each service fits Trial’s 1 GB at idle, but server plus worker exceed it during upgrades and sync bursts, and Trial credit does not cover a month.
Limitations and licence
- Mail: until SMTP is configured, e-mail is only written to logs.
- Logic functions:
LOGIC_FUNCTION_TYPEis set toDISABLED. Enabling it runs user code unsandboxed inside the container, so turn it on only if every workspace member is trusted. - Encryption key: do not change
ENCRYPTION_KEYorAPP_SECRETafter the first boot without following Twenty’s rotation steps. - Licence: the core is AGPL-3.0 and some enterprise files carry a separate commercial licence. See the FAQ.
- File storage: the template’s own open questions say the S3 path-style access to the Bucket was not verified on a fresh Bucket. Test an attachment upload after deploying.
Scaling and upgrades
Both Twenty services use the same pinned image tag. To upgrade, change the tag on both, back up Postgres and redeploy. If you add a custom domain, update SERVER_URL and the OAuth callback URLs.
Other options
Odoo and ERPNext also include CRM modules inside a wider business suite. Tracklayer maintains Odoo 20 and ERPNext v16 for teams that want accounting and inventory in the same system. For the full ranking of CRM templates, see CRM templates on Railway.
FAQ
How do I log in to Twenty after deploying?
There is no preset password. Open the public URL and create your workspace. The first account becomes the workspace admin. Until you configure SMTP, invitation e-mails are written to the Twenty logs instead of being sent.
What does Twenty cost to run on Railway?
The template's own figures are estimates, not measurements. It lists about 1.1 GB of RAM across all services at idle, roughly 12 USD per month, and about 1.95 GB for a team of 5 to 25 users, roughly 27 USD per month. Hobby is the minimum plan. Prices change, so check Railway's current rates.
Is my data kept when I redeploy?
Yes. Postgres and Redis each use a volume, and attachments are stored in a Railway Bucket. Back up Postgres before any upgrade.
What licence is Twenty under?
The NOTICE lists the Twenty core as AGPL-3.0, and some enterprise files carry a separate commercial licence. The Redis image is offered under RSALv2, SSPLv1 or AGPLv3. Read these terms if you plan to modify Twenty or offer it to others, and ask a lawyer if you are unsure.
How do I upgrade Twenty?
Change the image tag on both the Twenty and Twenty Worker services to the same version, back up Postgres, then redeploy. Migrations run once in the pre-deploy step.