Railway Deployment
Overview
Synqed can be deployed to Railway. The configuration lives in railway.toml.
Configuration
toml
[build]
builder = "DOCKERFILE"
dockerfilePath = "Dockerfile"
[deploy]
healthcheckPath = "/api/health"
restartPolicyType = "ON_FAILURE"
restartPolicyMaxRetries = 5Setup
1. Create the project
- Open the Railway dashboard
- "New Project" -> "Deploy from GitHub repo"
- Connect the repository
2. Add PostgreSQL
- In your project: "New" -> "Database" -> "Add PostgreSQL"
- Railway sets
DATABASE_URLautomatically
3. Set environment variables
In the Railway dashboard under "Variables":
ini
DISCORD_TOKEN=...
DISCORD_GUILD_ID=...
ADMIN_USERNAME=admin
ADMIN_PASSWORD_HASH=...
JWT_SECRET=...
DASHBOARD_URL=https://your-dashboard.railway.app4. Dashboard service
Create a separate service for the dashboard:
- "New" -> "Service"
- Root directory:
dashboard - Set the variables:ini
BOT_API_URL=http://synqed-backend.railway.internal:3001 NEXT_PUBLIC_BOT_API_URL=https://your-backend.railway.app
Health Check
The bot exposes /api/health. Railway uses this endpoint to monitor service status.
Automatic Deployment
Railway redeploys automatically on every push to the main branch.
