Deployment Platforms
AgentDoor provides official templates for three major platforms:Railway
Full Node.js runtime with Docker support and built-in PostgreSQL
Cloudflare Workers
Edge computing with global distribution and near-zero cold starts
Vercel
Serverless Next.js deployment with automatic scaling
Platform Comparison
| Feature | Railway | Cloudflare Workers | Vercel |
|---|---|---|---|
| Runtime | Node.js (Docker) | V8 Isolates | Node.js (Serverless) |
| Cold Starts | ~1-2s | <10ms | ~200-500ms |
| Execution Time | Unlimited | 30s (free), 15m (paid) | 10s (hobby), 60s (pro) |
| Storage | PostgreSQL, SQLite | KV, D1, Durable Objects | External (PostgreSQL, etc.) |
| Best For | Traditional apps, databases | High-traffic APIs, global apps | Next.js apps, Jamstack |
| Pricing | $5/month + usage | Free tier generous | Free tier available |
Storage Options
AgentDoor requires persistent storage to manage agent registrations, API keys, and authentication state. Choose a storage backend based on your platform:Memory Store (Development Only)
SQLite (Railway, Local)
PostgreSQL (Railway, External)
Cloudflare D1 (Cloudflare Workers)
Environment Variables
All deployment platforms require these core environment variables:| Variable | Description | Required |
|---|---|---|
X402_WALLET | Your wallet address for receiving x402 micropayments (USDC on Base) | Yes |
DATABASE_URL | PostgreSQL connection string (if using PostgreSQL) | Conditional |
PORT | Server port (auto-set by most platforms) | No |
Security Considerations
API Keys and Secrets
Agent API keys are hashed using SHA-256 before storage. Never store plaintext API keys.Environment Variable Management
- Railway
- Cloudflare
- Vercel
Set variables in Railway dashboard under Variables tab or via
railway.json:Edge vs Serverless vs Traditional
Edge Computing (Cloudflare Workers)
Pros:- Globally distributed (300+ locations)
- Near-zero cold starts (<10ms)
- Pay-per-request pricing
- Built-in DDoS protection
- Limited execution time (30s-15m)
- No native file system access
- Requires edge-compatible storage (D1, KV)
- You need global low-latency access
- High traffic with unpredictable spikes
- Cost optimization for sporadic usage
Serverless (Vercel)
Pros:- Automatic scaling
- Zero infrastructure management
- Excellent Next.js integration
- Free tier available
- Cold starts (~200-500ms)
- Limited execution time (10-60s)
- Requires external database
- Building a Next.js application
- Need automatic scaling
- Want minimal DevOps overhead
Traditional (Railway)
Pros:- Full Node.js runtime
- Unlimited execution time
- Built-in PostgreSQL
- WebSocket support
- Manual scaling required
- Higher baseline cost
- Slower cold starts
- Need long-running processes
- Require WebSocket connections
- Want traditional database access
Monitoring and Observability
Request Logging
AgentDoor automatically tracks agent requests and authentication attempts. Access logs via your platform’s logging system:Health Checks
Implement health check endpoints for monitoring:Next Steps
Choose your deployment platform:Deploy to Railway
Traditional Node.js deployment with PostgreSQL
Deploy to Cloudflare
Edge computing with global distribution
Deploy to Vercel
Serverless Next.js deployment