JARVIS

railway-setup-twenty-crm

Workspace

OTF

Created

2026-03-26

Updated

2026-03-26

Content

# Railway Setup: Twenty CRM ## Overview - **Project:** otf-twenty (`dcc366fc-75c0-4c05-8e26-385d80a4d57f`) - **Template:** https://railway.com/deploy/twenty - **Domain:** crm.optimified.com - **Port:** 3000 - **Services:** Twenty (`b4d5f9ca`), Twenty Worker (`de3e318e`), Postgres (`62d95e91`), Redis (`b797cd82`) ## Key Env Vars | Var | Value | |---|---| | `SERVER_URL` | `https://crm.optimified.com` | | `IS_SIGN_UP_DISABLED` | `true` | | `DISABLE_DB_MIGRATIONS` | `false` | | `EMAIL_DRIVER` | `smtp` | | `EMAIL_SMTP_HOST` | `smtp.resend.com` | | `EMAIL_SMTP_PORT` | `587` | | `EMAIL_FROM_ADDRESS` | `noreply@alert.optimified.com` | | `STORAGE_TYPE` | `s3` | | `STORAGE_S3_ENDPOINT` | `https://t3.storageapi.dev` | | `STORAGE_S3_REGION` | `sin` | ## Custom Domain CNAME: `crm` → `twenty-production-94ed.up.railway.app` (Cloudflare proxied) ## Critical: Migration Bug Fix The Railway template deploys with `DISABLE_DB_MIGRATIONS=true`. This causes the **`/welcome` redirect bug**: ### Symptoms - App loads but redirects to `/welcome` - Sign-in button is greyed out / non-functional - No error in the UI — looks like it's stuck ### Root Cause With migrations disabled, the database schema never gets created. Twenty sees no workspace data and shows the onboarding screen, but the onboarding can't complete because the schema doesn't exist. ### Fix ```bash railway variable set DISABLE_DB_MIGRATIONS=false --service Twenty ``` The service redeploys, runs migrations on startup (`Successfully migrated DB!`), and `/welcome` becomes a functional onboarding page where you can create your first account. ## Post-Deploy Steps 1. **Fix migrations** — set `DISABLE_DB_MIGRATIONS=false` (critical) 2. Wait for redeploy and migration to complete 3. Go to `/welcome` → create admin account 4. Set `IS_SIGN_UP_DISABLED=true` to lock registration 5. Set `SERVER_URL` to custom domain 6. Add custom domain in Railway + Cloudflare CNAME ## Notes - **Verbose logging:** Twenty generates massive TypeORM initialization logs on startup, hitting Railway's 500 logs/sec rate limit. Not a functional issue, just noisy. - **Storage:** Uses external S3 at `t3.storageapi.dev` (Railway's storage API), not self-hosted MinIO. - **Worker service:** Handles background jobs (messaging sync, calendar sync, workflow runs, cleanup tasks). 22 cron jobs registered on startup. ## Issues Encountered - **`/welcome` redirect (issue #9):** Primary blocker. Template ships with migrations disabled. Fix documented above. - **Sign-in greyed out:** Symptom of the migration bug — resolved by enabling migrations. - **Rate limit warning:** `Railway rate limit of 500 logs/sec reached for replica, update your application to reduce the logging rate. Messages dropped: 100` — cosmetic, no action needed.