-
First, follow the official LibreChat instructions to update your
librechat.yaml
file in the base directory. -
(unclear if needed) Set the environment variable
launchctl setenv OLLAMA_HOST "0.0.0.0:11434"
to expose the ollama API beforeollama serve
, per this github issue -
Set the
volume
to yourdocker-compose.override.yml
for Librechat (under the service namedapi
):services: api: volumes: - type: bind source: ./librechat.yaml target: /app/librechat.yaml
-
Restart LibreChat
docker-compose down && docker-compose up -d`
-
Set the environment variable
launchctl setenv OPENROUTER_KEY "sk..."
-
Or in
~/.zshrc
export OPENROUTER_KEY="sk-..."
-
Add the OPENROUTER_KEY environment variable to
docker-compose.yml
for Librechatservices: api: environment: - OPENROUTER_KEY=${OPENROUTER_KEY}
-
Run this command to watch the Librechat logs:
cd /path/to/LibreChat docker logs LibreChat --follow
-
Cmd-C
to stop following
-
Run this command to connect to the instance (to check for environment variables or ability to curl to endpoints)
docker exec -it LibreChat sh
-
exit
to leave the shell.