mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
* mkdocs plugins: add plugin for social cards and plugin that allow to exclude a folder * docs: fix hyperlinks * mkdocs: social cards (descriptions) for 'contributions' and 'deployment' guides * mkdocs: social cards (descriptions) for all 'index.md' * mkdocs: social cards (descriptions) for 'features' and 'plugins' * mkdocs: social cards (descriptions) for 'general_info' * mkdocs: social cards (descriptions) for 'configuration' * mkdocs: social cards (descriptions) for 'installation' * mkdocs: minor fixes * update librechat.svg * update how_to_contribute.md add reference to the official GitHub documentation
91 lines
3.4 KiB
Markdown
91 lines
3.4 KiB
Markdown
---
|
||
title: 🤗 HuggingFace
|
||
description: Easily deploy LibreChat on Hugging Face Spaces
|
||
weight: -9
|
||
---
|
||
# Hugging Face Deployment 🤗
|
||
|
||
## Create and Configure your Database (Required)
|
||
|
||
The first thing you need is to create a MongoDB Atlas Database and get your connection string.
|
||
|
||
Follow the instructions in this document: **[Online MongoDB Database](../install/configuration/mongodb.md)**
|
||
|
||
## Getting Started
|
||
|
||
**1.** Login or Create an account on **[Hugging Face](https://huggingface.co/)**
|
||
|
||
**2.** Visit **[https://huggingface.co/spaces/LibreChat/template](https://huggingface.co/spaces/LibreChat/template)** and click on `Duplicate this Space` to copy the LibreChat template into your profile.
|
||
|
||
> Note: It is normal for this template to have a runtime error, you will have to configure it using the following guide to make it functional.
|
||
|
||

|
||
|
||
**3.** Name your Space and Fill the `Secrets` and `Variables`
|
||
|
||
>You can also decide here to make it public or private
|
||
|
||

|
||
|
||
You will need to fill these values:
|
||
|
||
| Secrets | Values |
|
||
| --- | --- |
|
||
| MONGO_URI | * use the string aquired in the previous step |
|
||
| OPENAI_API_KEY | `user_provided` |
|
||
| BINGAI_TOKEN | `user_provided` |
|
||
| CHATGPT_TOKEN | `user_provided` |
|
||
| ANTHROPIC_API_KEY | `user_provided` |
|
||
| GOOGLE_KEY | `user_provided` |
|
||
| CREDS_KEY | * see bellow |
|
||
| CREDS_IV | * see bellow |
|
||
| JWT_SECRET | * see bellow |
|
||
| JWT_REFRESH_SECRET | * see bellow |
|
||
|
||
> ⬆️ **Leave the value field blank for any endpoints that you wish to disable.**
|
||
|
||
> ⚠️ setting the API keys and token to `user_provided` allows you to provide them safely from the webUI
|
||
|
||
> * For `CREDS_KEY`, `CREDS_IV` and `JWT_SECRET` use this tool: **[https://replit.com/@daavila/crypto#index.js](https://replit.com/@daavila/crypto#index.js)**
|
||
> * Run the tool a second time and use the new `JWT_SECRET` value for the `JWT_REFRESH_SECRET`
|
||
|
||
| Variables | Values |
|
||
| --- | --- |
|
||
| APP_TITLE | LibreChat |
|
||
| ALLOW_REGISTRATION | true |
|
||
|
||
|
||
## Deployment
|
||
|
||
**1.** When you're done filling the `secrets` and `variables`, click `Duplicate Space` in the bottom of that window
|
||
|
||

|
||
|
||
|
||
**2.** The project will now build, this will take a couple of minutes
|
||
|
||

|
||
|
||
|
||
**3.** When ready, `Building` will change to `Running`
|
||
|
||

|
||
|
||
And you will be able to access LibreChat!
|
||
|
||

|
||
|
||
## Update
|
||
To update LibreChat, simply select `Factory Reboot` from the ⚙️Settings menu
|
||
|
||

|
||
|
||
|
||
## Conclusion
|
||
You can now access it with from the current URL. If you want to access it without the Hugging Face overlay, you can modify this URL template with your info:
|
||
|
||
`https://username-projectname.hf.space/`
|
||
|
||
e.g. `https://cooluser-librechat.hf.space/`
|
||
|
||
### 🎉 Congratulation, you've sucessfully deployed LibreChat on Hugging Face! 🤗
|