Zeabur Deployment
Deploy LibreChat on Zeabur with automatic builds, managed databases, and global edge deployment.Quick Deploy
Deploy to Zeabur
Click to deploy LibreChat with pre-configured template
What Gets Deployed
The Zeabur template includes:- LibreChat Service - Main application
- MongoDB - Database service
- Automatic HTTPS - SSL certificates
- Global CDN - Edge deployment
- Environment Management - Secure variables
Features
- One-Click Deploy - No configuration needed
- Auto-Scaling - Scales with traffic
- Global Edge Network - Low latency worldwide
- Automatic SSL - HTTPS out of the box
- Git Integration - Deploy from GitHub
- Zero Downtime - Rolling deployments
Manual Deployment
Create Zeabur Account
- Go to zeabur.com
- Sign up with GitHub account
- Complete verification
Create New Project
- Click “Create Project”
- Select region (choose closest to your users)
- Name your project (e.g., “librechat-prod”)
Add MongoDB Service
- Click “Add Service”
- Select “Prebuilt” > “MongoDB”
- Choose MongoDB version (8.0 recommended)
- Click “Deploy”
- Wait for MongoDB to be ready
Add LibreChat Service
- Click “Add Service” again
- Select “Git” > “GitHub”
- Connect GitHub account if needed
- Select repository:
danny-avila/LibreChat(original)- Or your fork for custom changes
- Select branch (usually
main) - Click “Deploy”
Get Your Domain
- Go to LibreChat service page
- Click “Networking” tab
- Copy the generated domain (e.g.,
app-abc123.zeabur.app) - Update
DOMAIN_CLIENTandDOMAIN_SERVERwith this URL - Redeploy the service
Configuration
Custom Domain
Add Domain in Zeabur
- Go to your LibreChat service
- Click “Networking”
- Click “Add Domain”
- Enter your domain:
chat.yourdomain.com
Enable SSL
Zeabur automatically provisions SSL certificates:
- Certificates are auto-renewed
- HTTPS is enforced by default
- No additional configuration needed
Adding Meilisearch
Add Meilisearch Service
- Click “Add Service”
- Select “Docker Image”
- Enter image:
getmeili/meilisearch:v1.35.1 - Set service name:
meilisearch
Persistent Storage
Zeabur provides persistent volumes:Environment Variables Reference
Required Variables
| Variable | Description | Source |
|---|---|---|
MONGO_URI | MongoDB connection | ${MONGODB_URI} (auto-provided) |
CREDS_KEY | Encryption key | Generate with openssl |
CREDS_IV | Encryption IV | Generate with openssl |
JWT_SECRET | JWT signing key | Generate with openssl |
JWT_REFRESH_SECRET | Refresh token key | Generate with openssl |
DOMAIN_CLIENT | Client URL | Your Zeabur domain |
DOMAIN_SERVER | Server URL | Your Zeabur domain |
AI Provider Variables
Optional Features
Monitoring
View Logs
- Go to your service
- Click “Logs” tab
- Filter by:
- Build logs
- Runtime logs
- Error logs
Metrics Dashboard
Zeabur provides:- CPU Usage - Real-time CPU metrics
- Memory Usage - RAM consumption
- Network Traffic - Inbound/outbound
- Request Count - HTTP requests
- Response Time - Latency metrics
Health Checks
LibreChat health endpoint:Scaling
Auto-Scaling
Zeabur automatically scales based on:- CPU usage
- Memory usage
- Request volume
Manual Scaling
- Go to service settings
- Click “Resources”
- Adjust:
- Instances: 1-10
- CPU: 0.25-4 cores
- Memory: 512MB-8GB
Regional Deployment
Deploy to multiple regions:- Create new project in different region
- Deploy same configuration
- Use DNS load balancing
- Share MongoDB across regions (with replication)
Cost Estimation
Free Tier
Zeabur offers:- $5 free credit for new users
- Pay-as-you-go pricing
- No hidden fees
Pricing Examples
| Configuration | Monthly Cost (Est.) |
|---|---|
| Hobby (1 instance, 512MB) | ~$5-10 |
| Production (2 instances, 2GB each) | ~$20-40 |
| Enterprise (Auto-scale, 4GB+) | ~$50-100+ |
Cost Optimization
- Right-size resources - Start small, scale up
- Use sleep mode - For development environments
- Optimize images - Smaller Docker images
- Cache effectively - Reduce database queries
- CDN for assets - Offload static files
Troubleshooting
Build Failures
Issue: Build timeout or memory errors Solution:zeabur.json:
Database Connection Failed
Issue: Cannot connect to MongoDB Solutions:- Verify
MONGO_URIuses${MONGODB_URI} - Check MongoDB service is running
- Restart both services
- Check service networking settings
Domain SSL Issues
Issue: SSL certificate not provisioning Solutions:- Verify DNS propagation (use dnschecker.org)
- Wait 24-48 hours for DNS
- Check domain ownership
- Contact Zeabur support
High Memory Usage
Issue: Service keeps restarting due to OOM Solutions:Slow Performance
Issue: Application is slow Solutions:- Enable Redis caching
- Add database indexes
- Increase service resources
- Use CDN for static assets
- Enable Meilisearch for search
Advanced Configuration
Using Dockerfile
Createzeabur.json:
Redis Integration
- Add Redis service in Zeabur
- Configure LibreChat:
Multiple Environments
Create separate projects:- Development - Testing features
- Staging - Pre-production
- Production - Live users
Migration
From Docker
- Export MongoDB:
- Import to Zeabur:
From Railway/Other Platforms
- Copy environment variables to Zeabur
- Migrate database using mongodump/mongorestore
- Update domain DNS
- Test before switching traffic
Best Practices
- Use unique secrets for all keys
- Enable auto-deploy from GitHub
- Set up custom domain with SSL
- Configure persistent volumes
- Monitor logs and metrics
- Set up staging environment
- Regular database backups
- Use environment variables for secrets
- Test before promoting to production
- Document your configuration
Support Resources
- Zeabur Docs: zeabur.com/docs
- Zeabur Discord: discord.gg/zeabur
- LibreChat Discord: discord.librechat.ai
- LibreChat Docs: docs.librechat.ai