Skip to content

Commit

Permalink
πŸ–‹οΈ docs: Formatting Fix (danny-avila#1726)
Browse files Browse the repository at this point in the history
* πŸƒ docs: Formatting Fix

* πŸ–‹οΈ docs: Formatting Fix

* πŸ–‹οΈ docs: Formatting Fix
  • Loading branch information
fuegovic authored Feb 5, 2024
1 parent beddce7 commit 9361afc
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 48 deletions.
60 changes: 27 additions & 33 deletions docs/features/manage_your_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ To enhance the security of your data, external ports for MongoDB are not exposed

Mongo Express allows you to interact with your MongoDB database through your browser. To set it up, perform the following steps:

1. Create a new file named `docker-compose.override.yml` in the same directory as your main `docker-compose.yml` file for LibreChat.

2. Copy the following contents into the `docker-compose.override.yml` file:
### Setting up Mongo Express service
- Create a new file named `docker-compose.override.yml` in the same directory as your main `docker-compose.yml` file for LibreChat.
- Copy the following contents into the `docker-compose.override.yml` file:

```yaml
version: '3.4'
Expand All @@ -39,55 +39,49 @@ services:
- mongodb
restart: always
```
3. **Security Notice:**
### Security Notice
- Before using this configuration, replace `admin` and `password` with a unique username and password for accessing Mongo Express. These credentials should be strong and not easily guessable to prevent unauthorized access.
- Optional: You can also add native authentication to your database. See the [`docker-compose.override` guide](../install/configuration/docker_override.md#mongodb-authentication) for instructions on how to do so.
- If utilizing authentication, ensure the admin user has the "clusterAdmin" and "readAnyDatabase" permissions. These steps are detailed in the [docker-compose.override guide](../install/configuration/docker_override.md#step-1-creating-an-admin-user).
- After following the guide to authenticate MongoDB, you will need these variables under the environment section for mongo-express:

```yaml
environment:
ME_CONFIG_MONGODB_SERVER: mongodb
ME_CONFIG_BASICAUTH_USERNAME: admin
ME_CONFIG_BASICAUTH_PASSWORD: password
# database authentication variables, using example credentials from guide
ME_CONFIG_MONGODB_URL: 'mongodb://adminUser:securePassword@mongodb:27017'
ME_CONFIG_MONGODB_ADMINUSERNAME: adminUser
ME_CONFIG_MONGODB_ADMINPASSWORD: securePassword
```

4. Save the `docker-compose.override.yml` file and run the following command from the directory where your `docker-compose.yml` file is located to start Mongo-Express along with your other Docker services:
- If utilizing authentication, ensure the admin user has the "clusterAdmin" and "readAnyDatabase" permissions. These steps are detailed in the [docker-compose.override guide](../install/configuration/docker_override.md#step-1-creating-an-admin-user).
- After following the guide to authenticate MongoDB, you will need these variables under the environment section for mongo-express:

```yaml
environment:
ME_CONFIG_MONGODB_SERVER: mongodb
ME_CONFIG_BASICAUTH_USERNAME: admin
ME_CONFIG_BASICAUTH_PASSWORD: password
# database authentication variables, using example credentials from guide
ME_CONFIG_MONGODB_URL: 'mongodb://adminUser:securePassword@mongodb:27017'
ME_CONFIG_MONGODB_ADMINUSERNAME: adminUser
ME_CONFIG_MONGODB_ADMINPASSWORD: securePassword
```

### Launching and accessing Mongo Express
- Save the `docker-compose.override.yml` file and run the following command from the directory where your `docker-compose.yml` file is located to start Mongo-Express along with your other Docker services:

```
docker-compose up -d
```

This command will merge the `docker-compose.override.yml` with your `docker-compose.yml` and apply the configuration.

5. Once Mongo-Express is up and running, access it by navigating to `http://localhost:8081` in your web browser. You'll need to enter the username and password you specified for `ME_CONFIG_BASICAUTH_USERNAME` and `ME_CONFIG_BASICAUTH_PASSWORD`.
- Once Mongo-Express is up and running, access it by navigating to `http://localhost:8081` in your web browser. You'll need to enter the username and password you specified for `ME_CONFIG_BASICAUTH_USERNAME` and `ME_CONFIG_BASICAUTH_PASSWORD`.

---

## Removing Mongo Express

If you wish to remove Mongo-Express from your Docker environment, follow these straightforward steps:
- Navigate to the directory containing your `docker-compose.yml` and `docker-compose.override.yml` files.

1. Navigate to the directory containing your `docker-compose.yml` and `docker-compose.override.yml` files.

2. Bring down the current Docker environment, which will stop and remove all running containers defined in the `docker-compose.yml` and `docker-compose.override.yml` files. Use the following command:

```
- Bring down the current Docker environment, which will stop and remove all running containers defined in the `docker-compose.yml` and `docker-compose.override.yml` files. Use the following command:
```sh
docker-compose down
```

3. Now you can either rename or delete the `docker-compose.override.yml` file, which contains the Mongo Express configuration.

4. Finally, bring your Docker environment back up, which will now exclude Mongo Express:
- Now you can either rename or delete the `docker-compose.override.yml` file, which contains the Mongo Express configuration.

- Finally, bring your Docker environment back up, which will now exclude Mongo Express:
```
docker-compose up -d
```

By following these steps, you will have successfully removed Mongo Express from your Docker environment. If you want to reinstate Mongo Express at a later time, you can either rename the backup file back to `docker-compose.override.yml` or recreate the original `docker-compose.override.yml` file with the Mongo Express configuration.
> By following these steps, you will have successfully removed Mongo Express from your Docker environment. If you want to reinstate Mongo Express at a later time, you can either rename the backup file back to `docker-compose.override.yml` or recreate the original `docker-compose.override.yml` file with the Mongo Express configuration.
10 changes: 6 additions & 4 deletions docs/install/configuration/ai_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ To use Azure with the Plugins endpoint, make sure the following environment vari
## [OpenRouter](https://openrouter.ai/)

**[OpenRouter](https://openrouter.ai/)** is a legitimate proxy service to a multitude of LLMs, both closed and open source, including:

- OpenAI models (great if you are barred from their API for whatever reason)
- Anthropic Claude models (same as above)
- Meta's Llama models
Expand All @@ -422,18 +423,19 @@ OpenRouter is integrated to the LibreChat by overriding the OpenAI endpoint.

**Important**: As of v0.6.6, you can use OpenRouter as its own standalone endpoint:

### [Review the Custom Config Guide (click here)](./custom_config.md) to add an `OpenRouter` Endpoint

![image](https://github.com/danny-avila/LibreChat/assets/110412045/4955bfa3-7b6b-4602-933f-daef89c9eab3)

### [Review the Custom Config Guide (click here)](./custom_config.md) to add an `OpenRouter` Endpoint
#### Setup (legacy):

**Setup (legacy):**
- Signup to **[OpenRouter](https://openrouter.ai/)** and create a key. You should name it and set a limit as well.
- Set the environment variable `OPENROUTER_API_KEY` in your .env file to the key you just created.
- Set something in the `OPENAI_API_KEY`, it can be anyting, but **do not** leave it blank or set to `user_provided`
- Restart your LibreChat server and use the OpenAI or Plugins endpoints.

**Notes:**
- [TODO] **In the future, you will be able to set up OpenRouter from the frontend as well.**
#### Notes (legacy):

- This will override the official OpenAI API or your reverse proxy settings for both Plugins and OpenAI.
- On initial setup, you may need to refresh your page twice to see all their supported models populate automatically.
- Plugins: Functions Agent works with OpenRouter when using OpenAI models.
Expand Down
1 change: 1 addition & 0 deletions docs/install/configuration/docker_override.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ Use of the `docker-compose.override.yml` file allows us to enable explicit authe
- While the steps outlined may also be applicable to Docker Desktop environments, or with non-Docker, local MongoDB, or other container setups, details specific to those scenarios are not provided.

**There are 3 basic steps:**

- Create an admin user within your mongodb container
- Enable authentication and create a "readWrite" user for "LibreChat"
- Configure the MONGO_URI with newly created user
Expand Down
20 changes: 10 additions & 10 deletions docs/install/configuration/dotenv.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,45 +422,45 @@ AZURE_AI_SEARCH_SEARCH_OPTION_SELECT=
- `DALLE_API_KEY`: This environment variable is intended for storing the OpenAI API key that grants access to both DALL-E 2 and DALL-E 3 services. Typically, this key should be kept private. If you are distributing a plugin or software that integrates with DALL-E, you may choose to leave this commented out, requiring the end user to input their own API key. If you have a shared API key you want to distribute with your software (not recommended for security reasons), you can uncomment this and provide the key.

```bash
# DALLE_API_KEY=
DALLE_API_KEY=
```

- `DALLE3_API_KEY` and `DALLE2_API_KEY`: These are similar to the above but are specific to each version of DALL-E. They allow for separate keys for DALL-E 2 and DALL-E 3, providing flexibility if you have different access credentials or subscription levels for each service.

```bash
# DALLE3_API_KEY=
# DALLE2_API_KEY=
DALLE3_API_KEY=
DALLE2_API_KEY=
```

**System Prompts:**
- `DALLE3_SYSTEM_PROMPT` and `DALLE2_SYSTEM_PROMPT`: These variables allow users to set system prompts that can preconfigure or guide the image generation process for DALL-E 3 and DALL-E 2, respectively. Use these to set default prompts or special instructions that affect how the AI interprets the user's input prompts.

```bash
# DALLE3_SYSTEM_PROMPT="Your DALL-E-3 System Prompt here"
# DALLE2_SYSTEM_PROMPT="Your DALL-E-2 System Prompt here"
DALLE3_SYSTEM_PROMPT="Your DALL-E-3 System Prompt here"
DALLE2_SYSTEM_PROMPT="Your DALL-E-2 System Prompt here"
```

**Reverse Proxy Settings:**
- `DALLE_REVERSE_PROXY`: This setting enables the specification of a reverse proxy for DALL-E API requests. This can be useful for routing traffic through a specific server, potentially for purposes like caching, logging, or adding additional layers of security. Ensure that the URL follows the required pattern and is appropriately configured to handle DALL-E requests.

```bash
# DALLE_REVERSE_PROXY=
DALLE_REVERSE_PROXY=
```

**Base URLs:**
- `DALLE3_BASEURL` and `DALLE2_BASEURL`: These variables define the base URLs for DALL-E 3 and DALL-E 2 API endpoints, respectively. These might need to be set if you are using a custom proxy or a specific regional endpoint provided by OpenAI.

```bash
# DALLE3_BASEURL=
# DALLE2_BASEURL=
DALLE3_BASEURL=
DALLE2_BASEURL=
```

**Azure OpenAI Integration (Optional):**
- `DALLE3_AZURE_API_VERSION` and `DALLE2_AZURE_API_VERSION`: If you are using Azure's OpenAI service to access DALL-E, these environment variables specify the API version for DALL-E 3 and DALL-E 2, respectively. Azure may have specific API version strings that need to be set to ensure compatibility with their services.

```bash
# DALLE3_AZURE_API_VERSION=
# DALLE2_AZURE_API_VERSION=
DALLE3_AZURE_API_VERSION=
DALLE2_AZURE_API_VERSION=
```

---
Expand Down
18 changes: 18 additions & 0 deletions docs/install/configuration/user_auth_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ EMAIL_FROM_NAME="My LibreChat Server"
- Paste your `Client ID` and `Client Secret` in the `.env` file:

```bash
DOMAIN_CLIENT=https://your-domain.com #use http://localhost:3080 if not using a custom domain
DOMAIN_SERVER=https://your-domain.com #use http://localhost:3080 if not using a custom domain

DISCORD_CLIENT_ID=your_client_id
DISCORD_CLIENT_SECRET=your_client_secret
DISCORD_CALLBACK_URL=/oauth/discord/callback
Expand Down Expand Up @@ -279,6 +282,9 @@ DISCORD_CALLBACK_URL=/oauth/discord/callback
- Copy the `App ID` and `App Secret` and paste them into the `.env` file as follows:

```bash
DOMAIN_CLIENT=https://your-domain.com #use http://localhost:3080 if not using a custom domain
DOMAIN_SERVER=https://your-domain.com #use http://localhost:3080 if not using a custom domain

FACEBOOK_CLIENT_ID=your_app_id
FACEBOOK_CLIENT_SECRET=your_app_secret
FACEBOOK_CALLBACK_URL=/oauth/facebook/callback
Expand Down Expand Up @@ -338,6 +344,9 @@ FACEBOOK_CALLBACK_URL=/oauth/facebook/callback
![image](https://github.com/danny-avila/LibreChat/assets/138638445/aaf78840-48a9-44e1-9625-4109ed91d965)

```bash
DOMAIN_CLIENT=https://your-domain.com #use http://localhost:3080 if not using a custom domain
DOMAIN_SERVER=https://your-domain.com #use http://localhost:3080 if not using a custom domain

GITHUB_CLIENT_ID=your_client_id
GITHUB_CLIENT_SECRET=your_client_secret
GITHUB_CALLBACK_URL=/oauth/github/callback
Expand Down Expand Up @@ -429,6 +438,9 @@ GITHUB_CALLBACK_URL=/oauth/github/callback
- Add them to your `.env` file:

```bash
DOMAIN_CLIENT=https://your-domain.com #use http://localhost:3080 if not using a custom domain
DOMAIN_SERVER=https://your-domain.com #use http://localhost:3080 if not using a custom domain

GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
GOOGLE_CALLBACK_URL=/oauth/github/callback
Expand Down Expand Up @@ -535,6 +547,9 @@ You can now make last minute changes, click on `Create user pool` when you're do
6. Open the `.env` file at the root of your LibreChat folder and add the following variables with the values you copied:

```bash
DOMAIN_CLIENT=https://your-domain.com #use http://localhost:3080 if not using a custom domain
DOMAIN_SERVER=https://your-domain.com #use http://localhost:3080 if not using a custom domain

OPENID_CLIENT_ID=Your client ID
OPENID_CLIENT_SECRET=Your client secret
OPENID_ISSUER=https://cognito-idp.[AWS REGION].amazonaws.com/[USER POOL ID]/.well-known/openid-configuration
Expand Down Expand Up @@ -563,6 +578,9 @@ OPENID_CALLBACK_URL=/oauth/openid/callback
10. Open the .env file in your project folder and add the following variables with the values you copied:

```bash
DOMAIN_CLIENT=https://your-domain.com #use http://localhost:3080 if not using a custom domain
DOMAIN_SERVER=https://your-domain.com #use http://localhost:3080 if not using a custom domain

OPENID_CLIENT_ID=Your Application (client) ID
OPENID_CLIENT_SECRET=Your client secret
OPENID_ISSUER=https://login.microsoftonline.com/Your Directory (tenant ID)/v2.0/
Expand Down
3 changes: 2 additions & 1 deletion docs/install/installation/linux_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,14 @@ sudo apt-get install -y nodejs

### Using the command line (in the root directory)
Setup the app:

1. Run `npm ci`
2. Run `npm run frontend`

## Start the app:
1. Run `npm run backend`
2. Run `meilisearch --master-key put_your_meilesearch_Master_Key_here` (Only if SEARCH=TRUE)
3. Visit http://localhost:3080 (default port) & enjoy
3. Visit [http://localhost:3080](http://localhost:3080) (default port) & enjoy

### Using a shell script

Expand Down

0 comments on commit 9361afc

Please sign in to comment.