Railway deployment
Railway deployment
Connexity is structured so Railway can host the full stack as separate services:
frontendbackendPostgres- optional
mcp-server
CLI-first workflow
Use the Railway CLI to create and populate the project:
The script:
- Creates or links the Railway project.
- Adds PostgreSQL.
- Adds the frontend, backend, and optional MCP services.
- Uses Railway reference variables so service URLs stay in sync.
- Deploys each service from its own subdirectory.
Variables
These values should be treated as secrets:
JWT_SECRET_KEYENCRYPTION_KEYOPENAI_API_KEYANTHROPIC_API_KEYCONNEXITY_API_TOKENCONNEXITY_EMAILCONNEXITY_PASSWORD
ENCRYPTION_KEY must be a valid Fernet key. Generate one with:
These values should be reference variables, not hard-coded strings:
frontend.SITE_URLbackend.SITE_URLfrontend.API_URLmcp-server.CONNEXITY_API_URL
The recommended pattern is:
SITE_URL=https://${{ frontend.RAILWAY_PUBLIC_DOMAIN }}API_URL=http://${{ backend.RAILWAY_PRIVATE_DOMAIN }}:8000/api/v1CONNEXITY_API_URL=http://${{ backend.RAILWAY_PRIVATE_DOMAIN }}:8000/api/v1
That keeps the browser-facing URL public while keeping backend-to-backend traffic on Railway's private network.
Security
For extra protection, seal secret variables in Railway after they are created. Sealed values are available to builds and deployments but are not visible in the UI or retrievable through the API.
Template note
The repository is ready for a Railway template, but publishing the reusable template still happens in Railway's dashboard. CLI can bootstrap and deploy the project; the template publish step is a Railway UI action.