Quick Deploy
LiteLLM can be deployed to Render with a single click:1
Click Deploy Button
Click the “Deploy to Render” button above to start the deployment process.
2
Connect GitHub
Authorize Render to access the LiteLLM repository (or fork it to your account).
3
Configure Environment
Set required environment variables:
LITELLM_MASTER_KEY- Master key for authenticationOPENAI_API_KEY- Your OpenAI API key (if using OpenAI)ANTHROPIC_API_KEY- Your Anthropic API key (if using Anthropic)- Additional provider keys as needed
4
Deploy
Render will automatically:
- Build the Docker image
- Provision a PostgreSQL database
- Deploy the service with SSL
- Provide a public URL
Manual Render Deployment
Create New Web Service
1
Create Service
- Go to Render Dashboard
- Click New + → Web Service
- Connect your Git repository or use
https://github.com/BerriAI/litellm
2
Configure Service
Basic Settings:
- Name:
litellm-proxy - Region: Choose closest to your users
- Branch:
main - Runtime:
Docker - Dockerfile Path:
./Dockerfile
3
Set Instance Type
Recommended tiers:
- Development: Starter ($7/month)
- Production: Standard (85/month)
- Enterprise: Pro Plus ($250/month)
4
Configure Environment
Add environment variables (see configuration section below)
Database Setup
Create PostgreSQL Database
1
Create Database
- From Render Dashboard, click New + → PostgreSQL
- Choose same region as web service
- Select database plan:
- Free: 90-day trial (1GB storage)
- Starter: $7/month (10GB storage)
- Standard: $20/month (50GB storage)
2
Get Connection String
After creation, copy the Internal Database URL:
3
Add to Web Service
In your web service environment variables:
Environment Configuration
Required Variables
Provider API Keys
- OpenAI
- Anthropic
- Azure OpenAI
- AWS Bedrock
Optional Configuration
Configuration File
Using config.yaml
Create aconfig.yaml file in your repository:
config.yaml
render.yaml:
Custom Domain
1
Add Custom Domain
- In service settings, go to Custom Domains
- Click Add Custom Domain
- Enter your domain:
api.yourdomain.com
2
Configure DNS
Add a CNAME record in your DNS provider:
3
Wait for Verification
Render will automatically provision SSL certificate via Let’s Encrypt.
This takes 5-10 minutes.
Redis for Caching
Create Redis Instance
1
Create Redis
- Click New + → Redis
- Name:
litellm-cache - Plan: Free (25MB) or Starter ($10/month, 256MB)
- Region: Same as web service
2
Get Connection Details
Copy from Redis dashboard:
- Internal Redis URL:
redis://red-xxx:6379 - Or individual fields: Host, Port, Password
3
Configure LiteLLM
Add to web service environment:Or use the full URL:
Deployment Strategies
Auto-Deploy from Git
Render automatically deploys when you push to your branch:- Detect the push
- Build new Docker image
- Run database migrations
- Deploy with zero-downtime
Manual Deploy
Trigger manual deployment from dashboard:- Go to your service
- Click Manual Deploy → Deploy latest commit
- Or Clear build cache & deploy for clean build
Blueprint (render.yaml)
Define infrastructure as code:render.yaml
Monitoring and Logs
View Logs
- Go to service dashboard
- Click Logs tab
- View real-time logs or search history
Health Checks
Render automatically monitors your service using the health check endpoint:Metrics
Render provides built-in metrics:- CPU usage
- Memory usage
- Request count
- Response time
- Error rate
Scaling
Horizontal Scaling
1
Enable Autoscaling
- Go to service Settings
- Scroll to Scaling
- Enable Autoscaling
2
Configure Limits
3
Set Triggers
- CPU threshold: 70%
- Memory threshold: 80%
- Scale up delay: 2 minutes
- Scale down delay: 10 minutes
Vertical Scaling
Upgrade instance type in Settings → Plan:- Starter: 512MB RAM, 0.5 CPU
- Standard: 2GB RAM, 1 CPU
- Pro: 4GB RAM, 2 CPU
- Pro Plus: 8GB RAM, 4 CPU
Troubleshooting
Build Failures
Service Won’t Start
Database Connection Issues
Slow Performance
Cost Optimization
Free Tier Setup
Production Setup
High-Traffic Setup
Comparison with Other Platforms
Next Steps
Railway
Alternative PaaS deployment
Monitoring
Add observability and alerts
Security
Secure your deployment
Performance
Optimize for production