Skip to main content

Quick Deploy

LiteLLM can be deployed to Render with a single click: Deploy to Render
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 authentication
  • OPENAI_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

  1. Go to Render Dashboard
  2. Click New +Web Service
  3. 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 (25/month)orPro(25/month) or Pro (85/month)
  • Enterprise: Pro Plus ($250/month)
Resource recommendations:
4

Configure Environment

Add environment variables (see configuration section below)

Database Setup

Create PostgreSQL Database

1

Create Database

  1. From Render Dashboard, click New +PostgreSQL
  2. Choose same region as web service
  3. 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:
Use the Internal Database URL (not External) for better performance and security within Render.

Environment Configuration

Required Variables

Provider API Keys

Optional Configuration

Configuration File

Using config.yaml

Create a config.yaml file in your repository:
config.yaml
Update Docker command in render.yaml:

Custom Domain

1

Add Custom Domain

  1. In service settings, go to Custom Domains
  2. Click Add Custom Domain
  3. 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.
Render provides free SSL certificates for all custom domains automatically.

Redis for Caching

Create Redis Instance

1

Create Redis

  1. Click New +Redis
  2. Name: litellm-cache
  3. Plan: Free (25MB) or Starter ($10/month, 256MB)
  4. 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:
Render will:
  1. Detect the push
  2. Build new Docker image
  3. Run database migrations
  4. Deploy with zero-downtime

Manual Deploy

Trigger manual deployment from dashboard:
  1. Go to your service
  2. Click Manual DeployDeploy latest commit
  3. Or Clear build cache & deploy for clean build

Blueprint (render.yaml)

Define infrastructure as code:
render.yaml
Deploy blueprint:

Monitoring and Logs

View Logs

  1. Go to service dashboard
  2. Click Logs tab
  3. View real-time logs or search history

Health Checks

Render automatically monitors your service using the health check endpoint:
View health status in service dashboard.

Metrics

Render provides built-in metrics:
  • CPU usage
  • Memory usage
  • Request count
  • Response time
  • Error rate
Access via Metrics tab in service dashboard.

Scaling

Horizontal Scaling

1

Enable Autoscaling

  1. Go to service Settings
  2. Scroll to Scaling
  3. 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 SettingsPlan:
  • 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

Render provides $5/month credit for students and open-source projects.

Comparison with Other Platforms

Next Steps

Railway

Alternative PaaS deployment

Monitoring

Add observability and alerts

Security

Secure your deployment

Performance

Optimize for production