mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 03:10:15 +01:00
✏️ docs: Railway, Traefik, and Improvements (#2060)
* docs: documentation guidelines * docs: deploy documentation update
This commit is contained in:
parent
6fcaeaafe2
commit
2f88c5cb8a
7 changed files with 212 additions and 32 deletions
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: 🐳 Ubuntu Docker Deployment Guide
|
||||
title: 🐳 Ubuntu Docker Deployment
|
||||
description: These instructions are designed for someone starting from scratch for a Docker Installation on a remote Ubuntu server
|
||||
weight: -9
|
||||
---
|
||||
|
|
|
|||
|
|
@ -11,8 +11,9 @@ weight: 3
|
|||
---
|
||||
|
||||
- 🌊 [DigitalOcean (✨Recommended)](./digitalocean.md)
|
||||
- 🐳 [Ubuntu Docker Deployment Guide](./docker_ubuntu_deploy.md)
|
||||
- 🐳 [Ubuntu Docker Deployment](./docker_ubuntu_deploy.md)
|
||||
- 🤗 [HuggingFace](./huggingface.md)
|
||||
- 🛤️ [Railway](./railway.md)
|
||||
- 🐧 [Linode](./linode.md)
|
||||
- ⚡ [Azure](./azure-terraform.md)
|
||||
- ⏹️ [Render](./render.md)
|
||||
|
|
@ -25,4 +26,5 @@ weight: 3
|
|||
|
||||
- ☁️ [Cloudflare](./cloudflare.md)
|
||||
- 🪨 [Ngrok](./ngrok.md)
|
||||
- ↪️ [NGINX Guide](./nginx.md)
|
||||
- ↪️ [Nginx Guide](./nginx.md)
|
||||
- 🚦 [Traefik](./traefik.md)
|
||||
|
|
@ -21,7 +21,7 @@ In this guide, you will explore various options to efficiently deploy LibreChat
|
|||
| [DigitalOcean](./digitalocean.md) | Cloud Infrastructure | Intuitive interface, stable pricing | Smaller network footprint | Optimal for enthusiasts & small to medium businesses | ✅ Well Known, Reliable |
|
||||
| [HuggingFace](./huggingface.md) | AI/ML Solutions | ML/NLP specialization | Focused on ML applications | Excellent for AI/ML initiatives | ✅ Free |
|
||||
| [Azure](./azure-terraform.md) | Cloud Services | Comprehensive offerings, Microsoft ecosystem integration | Can be complex, may incur higher costs | Ideal for large enterprises | ✅ Pro |
|
||||
| [Railway](https://railway.app/template/b5k2mn?referralCode=HI9hWz) | App Deployment | Simplified app deployment | Emerging service with limited info | Further evaluation recommended | ✅ Easy |
|
||||
| [Railway](./railway.md) | App Deployment | Simplified app deployment | Emerging service with limited info | Further evaluation recommended | ✅ Easy |
|
||||
| [Linode](./linode.md) | Cloud Hosting | Responsive support, clear pricing | Fewer specialized services | Comparable to DigitalOcean | |
|
||||
| [Hetzner](./hetzner_ubuntu.md) | Data Hosting | Emphasizes privacy, economical | Primarily European servers | Suitable for Europe-centric operations | |
|
||||
| [Heroku](./heroku.md) | Platform as a Service | User-friendly, scalable | Higher cost potential, less flexibility| A good starting point for startups | |
|
||||
|
|
@ -43,7 +43,7 @@ In this guide, you will explore various options to efficiently deploy LibreChat
|
|||
|
||||
## Cloud Vendor Integration and Configuration
|
||||
|
||||
The integration level with cloud vendors varies: from platforms enabling single-click LibreChat deployments like [Zeabur](zeabur.md), through platforms leveraging Infrastructure as Code tools such as [Azure with Terraform](azure-terraform.md), to more traditional VM setups requiring manual configuration, exemplified by [DigitalOcean](digitalocean.md), [Linode](linode.md), and [Hetzner](hetzner_ubuntu.md).
|
||||
The integration level with cloud vendors varies: from platforms enabling single-click LibreChat deployments like [Railway](./railway.md), through platforms leveraging Infrastructure as Code tools such as [Azure with Terraform](azure-terraform.md), to more traditional VM setups requiring manual configuration, exemplified by [DigitalOcean](digitalocean.md), [Linode](linode.md), and [Hetzner](hetzner_ubuntu.md).
|
||||
|
||||
## Essential Security Considerations
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ When deploying applications on a global scale, it is essential to consider the f
|
|||
2. Global accessibility implications: Understand the implications of deploying your application globally, including the legal and compliance requirements that vary by region.
|
||||
3. Secure configuration: Ensure that your application is configured securely, including the use of secure protocols, secure authentication, and authorization mechanisms.
|
||||
|
||||
If you choose to use IaaS or Tunnel services for your deployment, you may need to utilize a reverse proxy such as [Nginx](./nginx.md) or [Cloudflare](./cloudflare.md) to name a few.
|
||||
If you choose to use IaaS or Tunnel services for your deployment, you may need to utilize a reverse proxy such as [Nginx](./nginx.md), [Traefik](./traefik.md) or [Cloudflare](./cloudflare.md) to name a few.
|
||||
|
||||
Investing in the appropriate security measures is crucial to safeguarding your digital assets and ensuring the success of your global deployment.
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ Platform as a Service (PaaS) is a model of cloud computing that offers a develop
|
|||
|
||||
### 4. One Click Deployment (PaaS)
|
||||
|
||||
- [Railway](https://railway.app/template/b5k2mn?referralCode=HI9hWz): Popular one-click deployment solution
|
||||
- [Railway](./railway.md): Popular one-click deployment solution
|
||||
- [Zeabur](zeabur.md): Pioneering effortless one-click deployment solutions.
|
||||
|
||||
## Other / Network Services
|
||||
|
|
|
|||
55
docs/deployment/railway.md
Normal file
55
docs/deployment/railway.md
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
title: 🛤️ Railway (one-click)
|
||||
description: Deploying LibreChat on Railway
|
||||
weight: -9
|
||||
---
|
||||
|
||||
# Deploying LibreChat on Railway (One-Click Install)
|
||||
|
||||
Railway provides a one-click install option for deploying LibreChat, making the process even simpler. Here's how you can do it:
|
||||
|
||||
## Steps
|
||||
|
||||
### **Visit the LibreChat repository**
|
||||
|
||||
Go to the [LibreChat repository](https://github.com/danny-avila/LibreChat) on GitHub.
|
||||
|
||||
### **Click the "Deploy on Railway" button**
|
||||
|
||||
<p align="left">
|
||||
<a href="https://railway.app/template/b5k2mn?referralCode=HI9hWz">
|
||||
<img src="https://railway.app/button.svg" alt="Deploy on Railway" height="30">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
(The button is also available in the repository's README file)
|
||||
|
||||
### **Log in or sign up for Railway**
|
||||
|
||||
If you're not already logged in to Railway, you'll be prompted to log in or sign up for a free account.
|
||||
|
||||
### **Configure environment variables**
|
||||
|
||||
Railway will automatically detect the required environment variables for LibreChat. Review the configuration of the three containers and click `Save Config` after reviewing each of them.
|
||||
|
||||

|
||||
|
||||
The default configuration will get you started, but for more advanced features, you can consult our documentation on the subject: [Environment Variables](../install/configuration/dotenv.md)
|
||||
|
||||
### **Deploy**
|
||||
|
||||
Once you've filled in the required environment variables, click the "Deploy" button. Railway will handle the rest, including setting up a PostgreSQL database and building/deploying your LibreChat instance.
|
||||
|
||||

|
||||
|
||||
### **Access your LibreChat instance**
|
||||
|
||||
After the deployment is successful, Railway will provide you with a public URL where you can access your LibreChat instance.
|
||||
|
||||
That's it! You have successfully deployed LibreChat on Railway using the one-click install process. You can now start using and customizing your LibreChat instance as needed.
|
||||
|
||||
## Additional Tips
|
||||
|
||||
- Regularly check the LibreChat repository for updates and redeploy your instance to receive the latest features and bug fixes.
|
||||
|
||||
For more detailed instructions and troubleshooting, refer to the official LibreChat documentation and the Railway guides.
|
||||
89
docs/deployment/traefik.md
Normal file
89
docs/deployment/traefik.md
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
---
|
||||
title: 🚦 Traefik
|
||||
description: Learn how to use Traefik as a reverse proxy and load balancer to expose your LibreChat instance securely over HTTPS with automatic SSL/TLS certificate management.
|
||||
weight: 10
|
||||
---
|
||||
|
||||
# Using Traefik with LibreChat on Docker
|
||||
|
||||
[Traefik](https://traefik.io/) is a modern HTTP reverse proxy and load balancer that makes it easy to deploy and manage your services. If you're running LibreChat on Docker, you can use Traefik to expose your instance securely over HTTPS with automatic SSL certificate management.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Docker and Docker Compose installed on your system
|
||||
- A domain name pointing to your server's IP address
|
||||
|
||||
## Configuration
|
||||
|
||||
### **Create a Docker network for Traefik**
|
||||
|
||||
```bash
|
||||
docker network create web
|
||||
```
|
||||
|
||||
### **Configure Traefik and LibreChat**
|
||||
|
||||
In your docker-compose.override.yml file, add the following configuration:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
api:
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.librechat.rule=Host(`your.domain.name`)"
|
||||
- "traefik.http.routers.librechat.entrypoints=websecure"
|
||||
- "traefik.http.routers.librechat.tls.certresolver=leresolver"
|
||||
- "traefik.http.services.librechat.loadbalancer.server.port=3080"
|
||||
networks:
|
||||
- web
|
||||
- librechat_default
|
||||
volumes:
|
||||
- ./librechat.yaml:/app/librechat.yaml
|
||||
|
||||
traefik:
|
||||
image: traefik:v2.9
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
- "./letsencrypt:/letsencrypt"
|
||||
networks:
|
||||
- web
|
||||
command:
|
||||
- "--log.level=DEBUG"
|
||||
- "--api.insecure=true"
|
||||
- "--providers.docker=true"
|
||||
- "--providers.docker.exposedbydefault=false"
|
||||
- "--entrypoints.web.address=:80"
|
||||
- "--entrypoints.websecure.address=:443"
|
||||
- "--certificatesresolvers.leresolver.acme.tlschallenge=true"
|
||||
- "--certificatesresolvers.leresolver.acme.email=your@email.com"
|
||||
- "--certificatesresolvers.leresolver.acme.storage=/letsencrypt/acme.json"
|
||||
|
||||
networks:
|
||||
web:
|
||||
external: true
|
||||
librechat_default:
|
||||
external: true
|
||||
```
|
||||
|
||||
Replace `your@email.com` with your email address for Let's Encrypt certificate notifications.
|
||||
|
||||
### **Start the containers**
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
This will start Traefik and LibreChat containers. Traefik will automatically obtain an SSL/TLS certificate from Let's Encrypt and expose your LibreChat instance securely over HTTPS.
|
||||
|
||||
You can now access your LibreChat instance at `https://your.domain.name`. Traefik will handle SSL/TLS termination and reverse proxy requests to your LibreChat container.
|
||||
|
||||
## Additional Notes
|
||||
|
||||
- The Traefik configuration listens on ports 80 and 443 for HTTP and HTTPS traffic, respectively. Ensure that these ports are open on your server's firewall.
|
||||
- Traefik stores SSL/TLS certificates in the `./letsencrypt` directory on your host machine. You may want to back up this directory periodically.
|
||||
- For more advanced configuration options, refer to the official Traefik documentation: [https://doc.traefik.io/](https://doc.traefik.io/)
|
||||
Loading…
Add table
Add a link
Reference in a new issue