Up and Running with TwentyCRM on Railway
bash
npm install -g @railway/cli
railway login
railway --help
railway init
# Name your project, railway usually uses snake-case two word combos.
# I chose twenty-water
railway list Created project twenty-water on Michael Staton's Projects
https://railway.com/project/6369f61e-4a28-4a20-a36e-b1cbfccf70a5
bash
railway add --database postgres
railway add --database redis
railway open Fork the TwentyCRM repository
This is obviously our example:
bash
origin https://github.com/lossless-group/twenty-crm.git (fetch)
origin https://github.com/lossless-group/twenty-crm.git (push)
upstream https://github.com/twentyhq/twenty.git (fetch)
upstream https://github.com/twentyhq/twenty.git (push) Setup Remote Databases as Environment Variables
Copy the
REDIS_PUBLIC_URL and the REDIS_URL AS REDIS_RAILWAY_URL value from the railway variables output. bash
railway service Redis
railway variables Copy the
POSTGRES_PUBLIC_URL and the POSTGRES_URL AS POSTGRES_URL value from the railway variables output. bash
railway service Postgres
railway variables bash
railway variables --set "FILE_TOKEN_SECRET=$(openssl rand -base64 32)"
railway variables --set "ACCESS_TOKEN_SECRET=$(openssl rand -base64 32)"
railway variables --set "REFRESH_TOKEN_SECRET=$(openssl rand -base64 32)"
railway variables --set "LOGIN_TOKEN_SECRET=$(openssl rand -base64 32)"
railway variables --set "EMAIL_FROM_ADDRESS=noreply@twenty-production-3674.up.railway.app"
railway variables --set "EMAIL_FROM_NAME=Twenty CRM"
railway variables --set "SIGN_IN_PREFILLED=true" Enabling SSO swith Google Workspace
- Go to your Workspace account settings and enable SSO for your domain.
- Go to the Google Cloud dashboard for your Workspace (you have this even if you've never used it.)
- Turn on the People API, the Calendar API, and the Gmail API
- Generate an App ID and App Secret for a project or app.
- Add the App ID and App Secret to the Configuration Variables in the Twenty instance Settings > Admin > Configuration options.