Setup LibreChat on Docker in Azure/AWS/GCP

Setup and install LibreChat on Ubuntu 24.04 running on Docker in Azure, AWS or Google GCP.  AI chat platform to serve all AI conversations in one place with a familiar ChatGPT interface.  This Web UI offers vast customization, supporting numerous AI providers, services, and integrations. Serves all AI Conversations in one place with a familiar interface, innovative enhancements, for as many users as you need.

Self-Host LibreChat in The Cloud

Setup LibreChat on Azure

LibreChat Azure

Deploy LibreChat on Ubuntu 24.04 in Azure

Setup LibreChat on AWS

LibreChat AWS

Deploy LibreChat on Ubuntu 24.04 in AWS

Setup LibreChat on GCP

LibreChat Google cloud

Deploy LibreChat on  Ubuntu 24.04 in GCP

Getting Started with LibreChat

Once your LibreChat server has been deployed, the following links explain how to connect to a Linux VM:

 

 

Once connected and logged in, the following section explains how to start using LibreChat. 

Using LibreChat on Docker

LibreChat runs as a container using Docker Compose. If you run the following command you will see a list of pre installed containers:

				
					sudo docker ps
				
			

Login URL for LibreChat

Once the LibreChat docker container has started, the login URL is as follows:

 

http://ServerIPAddress:3080

You will need to create a new account by pressing on the Sign Up button and fill out your details.

LibreChat login

Configure API Keys

Once logged in, the first step is to add the API keys to the AI Platform you would like to use.  For example Open AI.

Please refer to the following documentation on setting up AI Platforms and API Keys: https://www.librechat.ai/docs/configuration/pre_configured_ai

Once you’ve got your API Key, you will need to update the LibreChat .env file as follows. Run the following command to open the .env file.

				
					sudo nano /usr/local/librechat/LibreChat/.env

				
			

Scroll down and under your chosen AI provider, for example Open AI, add you API key secret to the following field:

 

OPENAI_API_KEY=

 

If its commented out #. Remove the hash #.

 

Next remove the comment # next to OPENAI_MODELS=

 

So it should look like this in my example:

Save and exit the file. Then reload your browser and log back into LibreChat. You should now be able to use the chat. If you get any errors, check your local log file located:

 

/usr/local/librechat/LibreChat/logs

 

Common error you may receive which relates to LibreChat or API key is not being setup correctly:

 

Something went wrong. Here’s the specific error message we encountered: An error occurred while processing your request. Please contact the Admin.

 

First check the error log. This could be related to not setting up API key correctly (check you’ve added it correctly to your .env file and also check you’ve enabled the model you want to use by removing the # symbol) or you have reached your Open AI budget limit and needs topping up.

LibreChat File Locations

LibreChat is installed in the following directory:

 

/usr/local/librechat/LibreChat

 

Logs can be found in:

 

/usr/local/librechat/LibreChat/logs

 

Environment File is located:

 

/usr/local/librechat/LibreChat/.env

LibreChat Firewall Ports

By default LibreChat runs as a Docker container on the following port:

 

  • TCP 3080

 

The links below explain how to modify / create firewall rules depending on which cloud platform you are using.

 

To setup AWS firewall rules refer to – AWS Security Groups

To setup Azure firewall rules refer to – Azure Network Security Groups

To setup Google GCP firewall rules refer to – Creating GCP Firewalls

Documentation and Support

For further documentation and support refer to the following:

 

https://www.librechat.ai/docs

 

If you have issues with getting the server up and running on any of the cloud platforms. Contact us directly.

 

Disclaimer: LibreChat is licensed under MIT license. No warrantee of any kind, express or implied, is included with this software. Use at your risk, responsibility for damages (if any) to anyone resulting from the use of this software rest entirely with the user. The author is not responsible for any damage that its use could cause.

 

Avatar for Andrew Fitzgerald
Andrew Fitzgerald

Cloud Solution Architect. Helping customers transform their business to the cloud. 20 years experience working in complex infrastructure environments and a Microsoft Certified Solutions Expert on everything Cloud.

0 0 votes
Article Rating
Subscribe
Notify of
1 Comment
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Sebastian Schroen

Just gave it a try on GCP, great work, thank you. One question: Did you, by any chance, look into the RAG API?

https://www.librechat.ai/docs/configuration/rag_api#default-configuration

1
0
Would love your thoughts, please comment.x
()
x