The web version is available for demo purposes only. The desktop app is the primary distribution. Use web deployment for testing or team-shared instances.
Overview
Routa can be deployed as a Next.js web application with:- Database: PostgreSQL (Neon, Supabase) or SQLite (not recommended for production)
- Platforms: Vercel, Railway, Render, Fly.io
- Features: Full MCP server, ACP agent spawning, A2A federation
Vercel Deployment
Vercel is the recommended platform for web deployment.Create Neon Postgres Database
- Sign up at neon.tech
- Create a new project
- Copy the connection string (starts with
postgresql://...)
Fork the Repository
Fork routa-js to your GitHub account.
Deploy to Vercel
- Go to vercel.com and sign in
- Click “New Project”
- Import your forked repository
- Configure environment variables (see below)
- Click “Deploy”
Configure Environment Variables
Add these in the Vercel dashboard (Settings → Environment Variables):
Environment Variables for Vercel
.env.production
Vercel Configuration
The project includesvercel.json for optimal configuration:
vercel.json
Railway Deployment
Railway provides built-in PostgreSQL and simpler configuration.Create Railway Account
Sign up at railway.app
New Project from GitHub
- Click “New Project”
- Select “Deploy from GitHub repo”
- Choose your forked routa-js repository
Add PostgreSQL Database
- Click “New” → “Database” → “Add PostgreSQL”
- Railway automatically sets
DATABASE_URL
Build Configuration for Railway
Createrailway.json:
railway.json
Render Deployment
Create Render Account
Sign up at render.com
Configuration
- Name: routa-app
- Environment: Node
- Build Command:
npm install --legacy-peer-deps && npm run build - Start Command:
npm start
Add PostgreSQL
- Click “New” → “PostgreSQL”
- Note the Internal Database URL
- Add to web service environment variables
Self-Hosted (VPS)
Deploy on your own server with PM2.Database Setup
PostgreSQL (Recommended)
SQLite (Development Only)
.env
Running Migrations
Health Checks
Routa exposes a health endpoint at/api/health:
Monitoring
Vercel Analytics
Enable in Vercel dashboard → Analytics → Enable.Custom Logging
Routa logs to stdout. Configure log drains: Vercel: Settings → Integrations → Log Drains Railway: Built-in logs in dashboard Self-hosted: Use PM2 logs:Troubleshooting
Database connection timeout
Database connection timeout
- Verify
DATABASE_URLis correct - Check database is accessible from deployment region
- For Neon: ensure connection pooling is enabled
- Add
?connection_limit=1to SQLite URLs on serverless
Build failures
Build failures
- Ensure
--legacy-peer-depsflag is used - Check Node.js version is 22+
- Clear build cache and retry
MCP connection errors
MCP connection errors
- Verify WebSocket support is enabled
- Check CORS settings allow MCP endpoints
- Ensure
/api/mcproute is not cached
Agent spawn failures
Agent spawn failures
- ACP agents (OpenCode, Codex) may not work on serverless (no persistent processes)
- Use Claude Code SDK for serverless environments
- Consider Docker or VPS deployment for full agent support
Next Steps
Docker Deployment
Deploy with Docker for full feature support
Custom MCP Servers
Integrate external tools via MCP
Workflows
Automate tasks with YAML workflows
GitHub Integration
Connect GitHub repositories