- Go to https://railway.app
- Login with GitHub
- No credit card needed for free tier
- Click "New Project"
- Select "Deploy from GitHub repo"
- Choose your HyperDAG repository
- Click "New" → "Database" → "PostgreSQL"
- Railway auto-generates
DATABASE_URL
Run in Replit Shell to see your variables:
./export-env-for-railway.shCopy the output to Railway's "Variables" tab.
Critical Variables:
NODE_ENV=productionPORT=5000SUPABASE_URL(from script output)SUPABASE_SERVICE_KEY(from Replit Secrets)OPENAI_API_KEY(from Replit Secrets)ANTHROPIC_API_KEY(from Replit Secrets)ALCHEMY_API_KEY(from Replit Secrets)MAILGUN_API_KEY(from Replit Secrets)MAILGUN_DOMAIN(from script output)
- Railway auto-deploys when you connect GitHub
- Watch logs in "Deployments" tab
- Get your URL:
https://your-app.up.railway.app
Test your deployment:
curl https://your-app.up.railway.app/api/healthShould return: {"success":true,"data":{"status":"ok",...}}
See RAILWAY_DEPLOYMENT_GUIDE.md for detailed instructions and troubleshooting.
After HyperDAG is on Railway:
- Deploy APM (AI-Prompt-Manager) on separate Railway/Replit
- Deploy MEL (ImageBearer) on Lovable.dev
- Update Supabase coordination URLs
- Test distributed Trinity system
Free Tier:
- 500 hours/month
- $5 free credits
- Perfect for development
Production:
- ~$10-20/month for moderate traffic
- Scales automatically
- Set spending limits in Railway dashboard