Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
refactor(docker-compose): Set UID/GID (#1044)
Marco Berettae7e473d3356c
diff --git a/.env.example b/.env.exampleindex 2f49cc517a..80515f798e 100644--- a/.env.example+++ b/.env.example@@ -67,6 +67,11 @@ LIMIT_MESSAGE_USER=false # Whether to limit the amount of messages an IP can senMESSAGE_USER_MAX=40 # The max amount of messages an IP can send per MESSAGE_USER_WINDOWMESSAGE_USER_WINDOW=1 # in minutes, determines the window of time for MESSAGE_USER_MAX messages+# If you have permission problems, set here the UID and GID of the user running+# the docker compose command. The applications in the container will run with these uid/gid.+UID=1000+GID=1000+# Change this to proxy any API request.# It's useful if your machine has difficulty calling the original API server.# PROXY=diff --git a/docker-compose.yml b/docker-compose.ymlindex cbef3744fe..da5f5569b3 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -25,6 +25,7 @@ services:target: node # ^------v# image: ghcr.io/danny-avila/librechat:latest # Uncomment this & comment above to build from docker hub imagerestart: always+ user: "${UID}:${GID}"extra_hosts: # if you are running APIs on docker you need access to, you will need to uncomment this line and next- "host.docker.internal:host-gateway"env_file:@@ -50,6 +51,7 @@ services:# - 27018:27017image: mongorestart: always+ user: "${UID}:${GID}"volumes:- ./data-node:/data/dbcommand: mongod --noauth@@ -61,6 +63,7 @@ services:# - 7700:7700 # if exposing these ports, make sure your master key is not the default valueenv_file:- .env+ user: "${UID}:${GID}"environment:- MEILI_HOST=http://meilisearch:7700- MEILI_HTTP_ADDR=meilisearch:7700diff --git a/docs/install/docker_compose_install.md b/docs/install/docker_compose_install.mdindex c6c9bfbdbd..520e0bb82e 100644--- a/docs/install/docker_compose_install.md+++ b/docs/install/docker_compose_install.md@@ -32,6 +32,11 @@ How to set up the user/auth system and Google login.### Running LibreChatOnce you have completed all the setup, you can start the LibreChat application by running the command `docker-compose up` in your terminal. After running this command, you can access the LibreChat application at `http://localhost:3080`.+If you build your own containers out of the git checkout with `docker up -d --build` you should pre-create the mount points for the volumes. This avoids occasional trouble with directory permissions when rebuilding:+```+mkdir meili_data images .env.production .env.development data-node+```+**Note:** MongoDB does not support older ARM CPUs like those found in Raspberry Pis. However, you can make it work by setting MongoDB’s version to mongo:4.4.18 in docker-compose.yml, the most recent version compatible withThat's it! If you need more detailed information on configuring your compose file, see my notes below.