🖊️chore: fix deployment guides (#2021)

This commit is contained in:
Fuegovic 2024-03-08 08:52:26 -05:00 committed by GitHub
parent 40e884b3ec
commit 5d0d02f5f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 126 additions and 119 deletions

View file

@ -1,7 +1,7 @@
---
title: ☁️ Cloudflare
description: How to setup a domain with Cloudflare and use Cloudflare Tunnels to securely expose your local web servers or services to the internet.
weight: -7
weight: 10
---
<img src="https://github.com/danny-avila/LibreChat/assets/32828263/cfbc7ca5-b51e-4f1d-aa89-b9b4cb13eead" width="350">

View file

@ -1,7 +1,7 @@
---
title: 🌊 DigitalOcean ✨(Recommended)
description: These instructions are designed for someone starting from scratch for a Docker Installation on a remote Ubuntu server using one of the cheapest tiers (6 USD/mo)
weight: -10
weight: -9
---
# Digital Ocean Setup
@ -124,11 +124,6 @@ Create a firewall, add your droplet to it, and add these inbound rules (will wor
---
### Part II: Installing Docker and Other Dependencies:
**Note**
This part and the rest of the document moved to the docker compose guide [docker compose guide](docker_compose.md) since they are not specific to digital ocean.
Go to - **[Part II: Installing Docker & Other Dependencies in Docker Compose Guide](docker_compose.md#part-ii-installing-docker-and-other-dependencies)**
This concludes the initial setup. For the subsequent steps, please proceed to the next guide:**[Ubuntu Docker Deployment Guide](./docker_ubuntu_deploy.md)**, which will walk you through the remaining installation process.
### Note: If you're still having trouble, before creating a new issue, please search for similar ones on our [#issues thread on our discord](https://discord.librechat.ai) or our [troubleshooting discussion](https://github.com/danny-avila/LibreChat/discussions/categories/troubleshooting) on our Discussions page. If you don't find a relevant issue, feel free to create a new one and provide as much detail as possible.

View file

@ -1,37 +1,16 @@
---
title: 🌊 Docker Compose guide
title: 🐳 Ubuntu Docker Deployment Guide
description: These instructions are designed for someone starting from scratch for a Docker Installation on a remote Ubuntu server
weight: -10
weight: -9
---
# Docker Compose guide
# Ubuntu Docker Deployment Guide
This document originally part of teh Digital Ocean guide moved here since there are not specific to Digital Ocean, In order to use this guide you need a remote computer or VM deployed.
You can use it for local installation , but take in mind that it was written originally for deployment at he cloud.
The document starts from Part II - since it assumes that you already did part one in the Digital Ocean guide.
In order to use this guide you need a remote computer or VM deployed. While you can use this guide with a local installation, keep in mind that it was originally written for cloud deployment.
## Table of Contents
> ⚠️ This guide was originally designed for [Digital Ocean](./digitalocean.md), so you may have to modify the instruction for other platforms, but the main idea remains unchanged.
- **[Part II: Installing Docker & Other Dependencies](#part-ii-installing-docker-and-other-dependencies)**
- [1. Update and Install Docker dependencies](#1-update-and-install-docker-dependencies)
- [2. Add Docker Repository to APT Sources](#2-add-docker-repository-to-apt-sources)
- [3. Install Docker](#3-install-docker)
- [4. Verify Docker](#4-verify-that-docker-is-running-on-ubuntu)
- [5. Install the Latest Version of Docker Compose](#5-install-the-latest-version-of-docker-compose)
- [6. Install git & npm](#6-as-part-of-this-guide-i-will-recommend-you-have-git-and-npm-installed)
- **[Part III: Setup LibreChat](#part-iii-setup-librechat)**
- [1. Clone down the repo](#1-clone-down-the-repo)
- [2. Create a global environment file](#2-create-a-global-environment-file)
- [3. Start docker and run LibreChat](#3-start-docker-and-then-run-the-installationupdate-script)
- [4. Access LibreChat](#4-once-the-app-is-running-you-can-access-it-at-httpyourserverip)
- **[Part IV: Updating LibreChat](#part-iv-updating-librechat)**
> The last sections are all optional configurations
- **[Part V: Editing the NGINX file](#part-v-editing-the-nginx-file-for-custom-domains-and-advanced-configs)**
- **[Part VI: Use the Latest Stable Release instead of Latest Main Branch](#part-vi-use-the-latest-stable-release-instead-of-latest-main-branch)**
### Part II: Installing Docker and Other Dependencies:
### Part I: Installing Docker and Other Dependencies:
There are many ways to setup Docker on Debian systems. I'll walk you through the best and the recommended way [based on this guide](https://www.smarthomebeginner.com/install-docker-on-ubuntu-22-04/).
@ -190,7 +169,7 @@ npm -v
---
## Part III: Setup LibreChat
## Part II: Setup LibreChat
### **1. Clone down the repo**
@ -268,7 +247,7 @@ It's safe to close the terminal if you wish -- the docker app will continue to r
### **4. Once the app is running, you can access it at `http://yourserverip`**
### Go back to the DigitalOcean droplet page to get your server ip, copy it, and paste it into your browser!
### Go back to the droplet page to get your server ip, copy it, and paste it into your browser!
![image](https://github.com/danny-avila/LibreChat/assets/110412045/d8bbad29-6015-46ec-88ce-a72a43d8a313)
@ -278,7 +257,7 @@ It's safe to close the terminal if you wish -- the docker app will continue to r
![image](https://github.com/danny-avila/LibreChat/assets/110412045/b3fc2152-4b6f-46f9-81e7-4200b76bc468)
## Part IV: Updating LibreChat
## Part III: Updating LibreChat
I've made this step pretty painless, provided everything above was installed successfully and you haven't edited the git history.
@ -312,7 +291,7 @@ npm run start:deployed
docker ps
```
## Part V: Editing the NGINX file (for custom domains and advanced configs)
## Part IV: Editing the NGINX file (for custom domains and advanced configs)
In case you would like to edit the NGINX file for whatever reason, such as pointing your server to a custom domain, use the following:
@ -324,7 +303,7 @@ npm run stop:deployed
nano client/nginx.conf
```
I won't be walking you through custom domain setup or any other changes to NGINX, you can look into the [Cloudflare setup guide](./cloudflare.md) to get you started with custom domains.
I won't be walking you through custom domain setup or any other changes to NGINX, you can look into the [Cloudflare guide](./cloudflare.md) or the [NGINX guide](./nginx.md) to get you started with custom domains.
However, I will show you what to edit on the LibreChat side for a custom domain with this setup.
@ -376,9 +355,9 @@ You should be all set!
> Note that any changes to the code in this environment won't be reflected because the compose file is pulling the docker images built automatically by GitHub
## Part VI: Use the Latest Stable Release instead of Latest Main Branch
## Part V: Use the Latest Stable Release instead of Latest Main Branch
By default, this setup will pull the latest updates to the main branch of Librechat. If you would rather have the latest "stable" release, which is defined by the [latest tags](https://github.com/danny-avila/LibreChat/releases), you will need to edit deploy-compose.yml and commit your changes exactly as above in Part V.
By default, this setup will pull the latest updates to the main branch of Librechat. If you would rather have the latest "stable" release, which is defined by the [latest tags](https://github.com/danny-avila/LibreChat/releases), you will need to edit deploy-compose.yml and commit your changes exactly as above in Part V. Be aware that you won't benefit from the latest feature as soon as they come if you do so.
Let's edit `deploy-compose.yml`:

View file

@ -4,24 +4,25 @@ description: 🌐 Step-by-step guides on how to deploy LibreChat on various clou
weight: 3
---
[Introduction)](introduction.md)
# Deployment
- 🌊 [DigitalOcean (✨Recommended)](digitalocean.md)
- 🤗 [HuggingFace](huggingface.md)
- 🐧 [Linode](linode.md)
- ☁️ [Cloudflare](cloudflare.md)
- ⚡ [Azure](azure-terraform.md)
- 🪨 [Ngrok](ngrok.md)
- ⏹️ [Render](render.md)
- 🔎 [Meilisearch in Render](meilisearch_in_render.md)
- 🏗️ [Hetzner](hetzner_ubuntu.md)
- 🌈 [Heroku](heroku.md)
- 🦓 [Zeabur](zeabur.md)
- 🌐 [Introduction](./introduction.md)
# Security
---
## Deploying with HTTPS and NGINX
- 🌊 [DigitalOcean (✨Recommended)](./digitalocean.md)
- 🐳 [Ubuntu Docker Deployment Guide](./docker_ubuntu_deploy.md)
- 🤗 [HuggingFace](./huggingface.md)
- 🐧 [Linode](./linode.md)
- ⚡ [Azure](./azure-terraform.md)
- ⏹️ [Render](./render.md)
- 🔎 [Meilisearch in Render](./meilisearch_in_render.md)
- 🏗️ [Hetzner](./hetzner_ubuntu.md)
- 🌈 [Heroku](./heroku.md)
- 🦓 [Zeabur](./zeabur.md)
- [Reverse Proxy Guide)](nginx.md)
---
- ☁️ [Cloudflare](./cloudflare.md)
- 🪨 [Ngrok](./ngrok.md)
- ↪️ [NGINX Guide](./nginx.md)

View file

@ -1,14 +1,45 @@
---
title: Deployment
description: 🌐 starting point for deploying the LibreChat application across various environments and platforms.
weight: -20
title: 🌐 Deployment Introduction
description: Introduction to deploying LibreChat, offering a comparison of various hosting and network services
weight: -10
---
# Comprehensive Deployment Guide for LibreChat
# Deployment Introduction
Ahoy, brave digital explorers and savvy code wranglers! Welcome to the fantastical journey of deploying LibreChat, where magic meets machinery, and dreams become digital reality. Strap on your virtual boots and hoist the sails; an adventure awaits in the boundless realms of the cloud!
Welcome to the introductory guide for deploying LibreChat. This document provides an initial overview, featuring a comparison table and references to detailed guides, ensuring a thorough understanding of deployment strategies.
That is to say... Here, you'll learn how to seamlessly launch LibreChat across diverse environments tailored to your requirements.
In this guide, you will explore various options to efficiently deploy LibreChat in a variety of environments, customized to meet your specific requirements.
## Comparative Table
> Note that the "Recommended" label indicates that these services are well-documented, widely used within the community, or have been successfully deployed by a significant number of users. As a result, we're able to offer better support for deploying LibreChat on these services
### Hosting Services
| **Service** | **Domain** | **Pros** | **Cons** | **Comments** | **Recommended** |
|------------------------------------|---------------------------|------------------------------------------------------------|----------------------------------------|---------------------------------------------------------|-------------------------|
| [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 |
| [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 | |
| [Zeabur](./zeabur.md) | Tech Startups | Streamlines developer deployment, scalable | Limited information due to newness | Worth exploring for new projects | |
### Network Services
| **Service** | **Domain** | **Pros** | **Cons** | **Comments** |
|---------------|---------------------------|------------------------------------------------------------|--------------------------------------------------|------------------------------------------------|
| [Cloudflare](./cloudflare.md) | Web Performance & Security| Global CDN, DDoS protection, ease of use | Limited free tier, customer support | Top choice for security enhancements |
| [Ngrok](./ngrok.md) | Secure Tunneling | Easy to use, free tier available, secure tunneling | Requires client download, complex domain routing | Handy for local development tests |
| [Nginx](./nginx.md) | Web Server | High performance, stability, resource efficiency | Manual setup, limited extensions | Widely used for hosting due to its performance |
**Cloudflare** is known for its extensive network that speeds up and secures internet services, with an intuitive user interface and robust security options on premium plans.
**Ngrok** is praised for its simplicity and the ability to quickly expose local servers to the internet, making it ideal for demos and testing.
**Nginx** is a high-performance web server that is efficient in handling resources and offers stability. It does, however, require manual setup and has fewer modules and extensions compared to other servers.
## Cloud Vendor Integration and Configuration
@ -16,11 +47,19 @@ The integration level with cloud vendors varies: from platforms enabling single-
## Essential Security Considerations
Venturing into the global digital wilderness unveils untold dangers: marauding cyber-dragons and shadowy data thieves. Arm yourself with the enchanted shield of HTTPS, and conjure the SSL wards to protect your digital dominion from the dark sorcery of data breaches.
Venturing into the digital landscape reveals numerous threats to the security and integrity of your online assets. To safeguard your digital domain, it is crucial to implement robust security measures.
When deploying applications globally, its paramount to safeguard your setup. Key considerations include enabling HTTPS to encrypt data in transit, understanding the global accessibility implications, and ensuring secure configuration. So if you select Iaas or Tunnel service for your deployment, you will probably need reverse proxy such as Nginx. don't know what is nginx and what it is used for? See [Nginx Guide)](nginx.md)
When deploying applications on a global scale, it is essential to consider the following key factors to ensure the protection of your digital assets:
# Choosing the Cloud vendor (e.g. platform)
1. Encrypting data in transit: Implementing HTTPS with SSL certificates is vital to protect your data from interception and eavesdropping attacks.
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.
Investing in the appropriate security measures is crucial to safeguarding your digital assets and ensuring the success of your global deployment.
## Choosing the Cloud vendor (e.g. platform)
Choosing a cloud vendor, for the "real deployment" is crucial as it impacts cost, performance, security, and scalability. You should consider factors such as data center locations, compliance with industry standards, compatibility with existing tools, and customer support.
@ -29,14 +68,15 @@ Once you gain more knowledge on your application usage and audience you will pro
As said the cloud providers / platforms differ in many aspects. For our purpose we can assume that in our context your main concerns is will ease of use, security and (initial) cost. In case that you have more concerns like scaling, previous experience with any of the platforms or any other specific feature then you probably know better what platform fit's you and you can jump directly to the information that you are seeking without following any specific guide.
## Deployment "options" & Specific guides overview
## Choosing the Right Deployment Option for Your Needs
The list goes from the more effort more controlled, to the lease effort less controlled.
Generally speaking Iaas will consume more time and expertise then Iac, Iac more the PaaS etc.
The deployment options are listed in order from most effort and control to least effort and control
### 1. Iaas - VM + Docker compose installation Guide
> Each deployment option has its advantages and disadvantages, and the choice ultimately depends on the specific needs of your project.
IaaS (Infrastructure as a Service): Provides fundamental computing resources like virtual servers, network, and storage on a pay-per-use basis.
### 1. IaaS (Infrastructure as a Service)
Infrastructure as a Service (IaaS) refers to a model of cloud computing that provides fundamental computing resources, such as virtual servers, network, and storage, on a pay-per-use basis. IaaS allows organizations to rent and access these resources over the internet, without the need for investing in and maintaining physical hardware. This model provides scalability, flexibility, and cost savings, as well as the ability to quickly and easily deploy and manage infrastructure resources in response to changing business needs.
- [DigitalOcean](digitalocean.md): User-friendly interface with predictable pricing.
- [Linode](linode.md): Renowned for excellent customer support and straightforward pricing.
@ -44,49 +84,41 @@ IaaS (Infrastructure as a Service): Provides fundamental computing resources lik
#### For Iaas we recommend Docker Compose
**Why Docker Compose?** We advocate the use of Docker Compose to ensure a seamless and uniform deployment experience across all platforms. This guide elucidates each step, ensuring clarity and ease of understanding throughout the deployment lifecycle.
**Why Docker Compose?** We recommend Docker Compose for consistent deployments. This guide clearly outlines each step for easy deployment: [Ubuntu Docker Deployment Guide](./docker_ubuntu_deploy.md)
##### Beware there are 2 versions of Docker Compose in the repo
Beware that LibraChat has to docker compose versions
**Note:** There are two docker compose files in the repo
1. **Development Oriented docker compose `docker-compose.yml`**
2. **Deployment Oriented docker compose `deploy-compose.yml`**
The main difference is that `deploy-compose.yml` includes nginx in the docker (and therefore it's nginx configuration is docker internal).
The main difference is that `deploy-compose.yml` includes Nginx, making its configuration internal to Docker.
don't know what is nginx and what it is used for? See [Reverse Proxy Guide)](nginx.md)
> Look at the [Nginx Guide](nginx.md) for more information
### 2. IaC - Terraform
### 2. IaC (Infrastructure as Code)
IaC ("Infrastructure as Code"): managing and provisioning computing infrastructures through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools. This practice supports reproducibility, disposability, and scalability in modern cloud environments.
Infrastructure as Code (IaC) refers to the practice of managing and provisioning computing infrastructures through machine-readable definition files, as opposed to physical hardware configuration or interactive configuration tools. This approach promotes reproducibility, disposability, and scalability, particularly in modern cloud environments. IaC allows for the automation of infrastructure deployment, configuration, and management, resulting in faster, more consistent, and more reliable provisioning of resources.
- [Azure](azure-terraform.md): Comprehensive services suitable for enterprise-level deployments
**Important Note**
- Digital Ocean, Linode, Hetzner also support IaC. But currently we don't have a dedicated guide for this.
So you are welcome to try it with the Azure Guide and help us update it to make it Terraform IaC guide for all platforms.
**Note:** Digital Ocean, Linode, Hetzner also support IaC. While we lack a specific guide, you can try to adapt the adapt the Azure Guide for Terraform and help us contribute to its enhancement.
### 3. PaaS (Platform as a Service)
PaaS (Platform as a Service): Offers a development and deployment environment in the cloud, with resources enabling users to deliver simple cloud-based apps to sophisticated enterprise applications.
Platform as a Service (PaaS) is a model of cloud computing that offers a development and deployment environment in the cloud. It provides a platform for developers to build, test, and deploy applications, without the need for managing the underlying infrastructure. PaaS typically includes a range of resources such as databases, middleware, and development tools, enabling users to deliver simple cloud-based apps to sophisticated enterprise applications. This model allows for faster time-to-market, lower costs, and easier maintenance and scaling, as the service provider is responsible for maintaining the infrastructure, and the customer can focus on building, deploying and managing their applications.
- [Hugging Face](huggingface.md): Tailored for machine learning and NLP projects.
- [Render](render.md): Simplifies deployments with integrated CI/CD pipelines.
- [Heroku](heroku.md): Optimal for startups and quick deployment scenarios.
### 4. Feature PaaS
- [Meilisearch in Render](meilisearch_in_render.md): Quick setup guide for integrating the fast search engine with LibreChat on Render.
### 5. One Click Deployment of PaaS
### 4. One Click Deployment (PaaS)
- [Railway](https://railway.app/template/b5k2mn?referralCode=HI9hWz): Popular one-click deployment solution
- [Zeabur](zeabur.md): Pioneering effortless one-click deployment solutions.
## Other Categories
## Other / Network Services
### 1. Tunneling Services
### 1. Tunneling
Tunneling services allow you to expose a local development server to the internet, making it accessible via a public URL. This is particularly useful for sharing work, testing, and integrating with third-party services. It allows you to deploy your development computer for testing or for on-prem installation.
@ -95,16 +127,13 @@ Tunneling services allow you to expose a local development server to the interne
### 2. DNS Service
- Cloudflare Domain Setup part of the Cloudflare guide (we should make it DNS service and put Cloudflare as the provider ...)
- Cloudflare DNS service is used to manage and route internet traffic to the correct destinations, by translating human-readable domain names into machine-readable IP addresses. Cloudflare is a provider of this service, offering a wide range of features such as security, performance, and reliability. The Cloudflare DNS service provides a user-friendly interface for managing DNS records, and offers advanced features such as traffic management, DNSSEC, and DDoS protection.
# The Voyage Commences
see also: [Cloudflare Guide](./cloudflare.md)
Before you chart your course through the cloud archipelago, ponder your heart's desires: the serenity of ease, the bastion of security, or the treasure trove of affordability. Your chosen path will illuminate the way to your destined cloud realm.
## Conclusion
# Embarkation on the Legendary Deployment
With a quill dipped in starlight, mark your chosen path and embark upon the legendary deployment of LibreChat. May the digital winds be ever in your favor, as you navigate the binary seas and uncover the treasures of the cloud.
In conclusion, the introduction of our deployment guide provides an overview of the various options and considerations for deploying LibreChat. It is important to carefully evaluate your needs and choose the path that best aligns with your organization's goals and objectives. Whether you prioritize ease of use, security, or affordability, our guide provides the necessary information to help you successfully deploy LibreChat and achieve your desired outcome. We hope that this guide will serve as a valuable resource for you throughout your deployment journey.
Remember, our community is here to assist. Should you encounter challenges or have queries, our [Discord channel](https://discord.librechat.ai) and [troubleshooting discussion](https://github.com/danny-avila/LibreChat/discussions/categories/troubleshooting) are excellent resources for support and advice.
Happy deploying!

View file

@ -1,18 +1,19 @@
---
title: Deployment
description: 🌐 Step-by-step guides on how to deploy LibreChat on various cloud platforms.
title: ↪️ Nginx
description: Step-by-step guide for securing your LibreChat deployment with Nginx
weight: 10
---
# Deploying Application in the Cloud with HTTPS and NGINX
This guide covers the essential steps for deploying your LibreChat application in the cloud, securing it with an SSL/TLS certificate for HTTPS, setting up NGINX as a reverse proxy, and configuring your domain.
This guide covers the essential steps for securing your LibreChat deployment with an SSL/TLS certificate for HTTPS, setting up Nginx as a reverse proxy, and configuring your domain.
## Why do I need reverse proxy?
## FAQ
### Why do I need reverse proxy?
A reverse proxy is a server that sits between clients and the web servers that host actual applications. It forwards client requests to the back-end servers and returns the server's response to the client. Using a reverse proxy in deployment can enhance security, load balancing, and caching. It hides the characteristics and origins of the back-end servers, providing an additional layer of defense against attacks. Additionally, it can distribute traffic among several servers, improving performance and scalability.
## Why Do I need HTTPS?
### Why do I need HTTPS?
Implementing HTTPS in your Nginx configuration is vital when deploying an application for several reasons:
@ -26,42 +27,44 @@ Regulatory Compliance: For many types of applications, particularly those dealin
By configuring HTTPS in Nginx, you ensure that your application benefits from enhanced security, improved trust and compliance, and better user experience.
## Prerequisites:
## Prerequisites
1. A cloud server (e.g., AWS, Google Cloud, Azure, Digital Ocean).
2. A registered domain name.
3. Terminal access to your cloud server.
4. Node.js and NPM installed on your server.
## Initial Setup: Pointing Your Domain to Your Website
## Initial Setup
### Pointing Your Domain to Your Website
Before proceeding with certificate acquisition, it's crucial to direct your domain to your cloud server. This step is foundational and must precede SSL certificate setup due to the time DNS records may require to propagate globally. Ensure that this DNS configuration is fully operational before moving forward.
1. **Configure DNS**:
### Configure DNS:
- Log in to your domain registrar's control panel.
- Navigate to DNS settings.
- Create an `A record` pointing your domain to the IP address of your cloud server.
2. **Verify Domain Propagation**:
### Verify Domain Propagation
- It may take some time for DNS changes to propagate.
- You can check the status by pinging your domain: `ping your_domain.com`
Comment: remember to replace `your_domain.com` with your actual domain name.
## Step 1: Obtain a SSL/TLS Certificate
## Obtain a SSL/TLS Certificate
To secure your LibreChat application with HTTPS, you'll need an SSL/TLS certificate. Let's Encrypt offers free certificates:
1. **Install Certbot**:
### Install Certbot
- For Ubuntu: `sudo apt-get install certbot python3-certbot-nginx`
- For CentOS: `sudo yum install certbot python2-certbot-nginx`
2. **Obtain the Certificate**:
### Obtain the Certificate
- Run `sudo certbot --nginx` to obtain and install the certificate automatically for NGINX.
- Follow the on-screen instructions. Certbot will ask for information and complete the validation process.
- Once successful, Certbot will store your certificate files.
## Step 2: Set Up NGINX as a Reverse Proxy
## Set Up NGINX as a Reverse Proxy
NGINX acts as a reverse proxy, forwarding client requests to your LibreChat application.
There are 2 different options for the nginx server, which depends on the method you want to deploy the LibreChat.
@ -141,7 +144,7 @@ For example configuration with Basic Authentication see [🌀 Miscellaneous](../
- **Administration**: Less overhead vs. `.htpasswd` management.
- **Security**: Application security vs. added Nginx layer.
4. **Option A: Configure NGINX without Basic Authentication using Docker Compose with SSL**:
#### Option A: Configure NGINX without Basic Authentication using Docker Compose with SSL
For the time being - this requires a bit of an effort...
The exact details might change in the future so I will try to give here the basics, and I invite you to improve this section.
@ -152,7 +155,7 @@ You need to change 2 files
Here is an example (it is not one to one with the current code base - TODO: Fix the code and this in the future)
```
```sh
# Secure default configuration with SSL enabled
# Based on Mozilla SSL Configuration Generator and provided configuration
@ -268,12 +271,12 @@ after you changed them you should follow the instruction from [Part V: Editing t
in order to update the git and deploy from a rebased branch.
[TBA: TO ADD HERE a simple explanation based on that explanation]
3. **Option B: Configure NGINX without Basic Authentication on the host**:
#### Option B: Configure NGINX without Basic Authentication on the host
- Open the LibreChat NGINX configuration file: `sudo nano /etc/nginx/sites-available/default`
- Replace the file content with the following, ensuring to replace `your_domain.com` with your domain and `app_port` with your application's port:
```
```sh
server {
listen 80;
server_name your_domain.com;
@ -289,12 +292,12 @@ server {
}
```
6. **Check NGINX Configuration & Restart**:
**Check NGINX Configuration & Restart**:
- Validate the configuration: `sudo nginx -t`
- Reload NGINX: `sudo systemctl reload nginx`
## Step 3: Run the application
## Run the application
1. Navigate to your application's directory:

View file

@ -1,7 +1,7 @@
---
title: 🪨 Ngrok
description: Use Ngrok to tunnel your local server to the internet.
weight: -5
weight: 10
---
# Ngrok Installation