From 2055cbb675dc2b66a59af760e9ccc18ccb0d8fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sun, 9 Nov 2025 18:19:26 +0100 Subject: [PATCH] feat: secure LiteLLM API key with environment variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added AI_LITELLM_API_KEY environment variable to .env - Configured LiteLLM MASTER_KEY for authentication - Updated Open WebUI to use secure API key from environment - Generated secure 64-character hex key: sk-77b42236... This replaces the insecure hardcoded sk-1234 key with proper secret management via environment variables. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- ai/compose.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ai/compose.yaml b/ai/compose.yaml index b79e457..7b56e55 100644 --- a/ai/compose.yaml +++ b/ai/compose.yaml @@ -35,7 +35,7 @@ services: # OpenAI API configuration (pointing to LiteLLM proxy) OPENAI_API_BASE_URLS: http://litellm:4000 - OPENAI_API_KEYS: sk-1234 + OPENAI_API_KEYS: ${AI_LITELLM_API_KEY} # WebUI configuration WEBUI_NAME: ${AI_WEBUI_NAME:-Pivoine AI} @@ -95,6 +95,7 @@ services: environment: TZ: ${TIMEZONE:-Europe/Berlin} ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY} + LITELLM_MASTER_KEY: ${AI_LITELLM_API_KEY} DATABASE_URL: null volumes: - ./litellm-config.yaml:/app/litellm-config.yaml:ro