- Go to https://railway.app
- Click "Login" and sign in with GitHub
- Free tier includes:
- 500 hours of usage per month
- $5 credit (enough for development)
- No credit card required to start
- Click "New Project" in Railway dashboard
- Select "Deploy from GitHub repo"
- Authorize Railway to access your GitHub account
- Select your HyperDAG repository
- Railway will auto-detect it's a Node.js app
- In your Railway project, click "New"
- Select "Database" → "PostgreSQL"
- Railway automatically provisions a database
- Important: Railway auto-generates
DATABASE_URLenvironment variable
Click on your service → "Variables" tab → Add these:
Required Variables:
NODE_ENV=production
PORT=5000
# Database (auto-generated by Railway, verify it exists)
DATABASE_URL=<auto-generated>
# Supabase (copy from Replit secrets)
SUPABASE_URL=https://qnnpjhlxljtqyigedwkb.supabase.co
SUPABASE_SERVICE_KEY=<your-key-from-replit>
# OpenAI (copy from Replit secrets)
OPENAI_API_KEY=<your-key-from-replit>
# Anthropic (copy from Replit secrets)
ANTHROPIC_API_KEY=<your-key-from-replit>
# Alchemy (copy from Replit secrets)
ALCHEMY_API_KEY=<your-key-from-replit>
# Mailgun (copy from Replit secrets)
MAILGUN_API_KEY=<your-key-from-replit>
MAILGUN_DOMAIN=<your-domain-from-replit>
# App URL (will be provided by Railway after first deploy)
APP_URL=<railway-generated-url>Optional Variables (can add later):
# Only if you want to re-enable DragonflyDB
DRAGONFLY_HOST=ar1o3ash4.dragonflydb.cloud
DRAGONFLY_PORT=6385
DRAGONFLY_PASSWORD=<if-you-have-it>
# Other API keys as needed
GROQ_API_KEY=<optional>
DEEPSEEK_API_KEY=<optional>- Railway automatically starts building when you connect repo
- Watch the build logs in the "Deployments" tab
- Build process:
- Installs dependencies:
npm install - Builds frontend:
vite build - Builds backend:
esbuild server/index.ts - Starts server:
node dist/index.js
- Installs dependencies:
- Once deployed, Railway provides a public URL like:
hyperdag-production.up.railway.app
- Click "View Logs" to see server startup
- Click the generated URL to open your app
- Test health endpoint:
https://your-url.railway.app/api/health - Verify no flashing (Railway doesn't use Vite HMR in production)
Before deploying, gather these from your Replit "Secrets" tab:
-
Supabase Credentials:
SUPABASE_URLSUPABASE_SERVICE_KEY
-
AI Provider Keys:
OPENAI_API_KEYANTHROPIC_API_KEY
-
Blockchain/Web3:
ALCHEMY_API_KEY
-
Email Service:
MAILGUN_API_KEYMAILGUN_DOMAIN
-
Optional (if using):
GROQ_API_KEYDEEPSEEK_API_KEY- Any other API keys you've configured
Error: npm install fails
Solution: Check package.json is committed to GitHub
Error: vite build fails
Solution: Verify all imports are correct, no missing files
Error: "Port already in use"
Solution: Railway auto-assigns PORT env var, your app should use process.env.PORT || 5000
Error: Database connection fails
Solution: Verify DATABASE_URL exists in Railway variables
Error: Missing API keys Solution: Double-check all environment variables are set
Railway Free Tier:
- 500 hours/month = ~20 days of continuous running
- $5 in free credits per month
- Perfect for development and low-traffic production
Expected Usage for HyperDAG:
- ~$10-20/month for moderate traffic
- Scales automatically with demand
- Can set spending limits to avoid surprises
-
Update Trinity Coordination:
- Update Supabase
trinity_managerstable with new Railway URL - HDM now at:
https://your-railway-url.railway.app
- Update Supabase
-
Deploy APM (AI-Prompt-Manager):
- Create separate Railway project for APM
- Or use another Replit (lighter, no deployment issues)
-
Deploy MEL (ImageBearer):
- Use Lovable.dev as planned
- Configure Supabase coordination
-
Test Trinity Symphony:
- Send prompt to any manager
- Verify it distributes to all 3 managers
- Check autonomous task execution
Railway Documentation: https://docs.railway.app Railway Discord: https://discord.gg/railway Railway Status: https://status.railway.app
If deployment fails, share the build logs for debugging.