-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
122 lines (105 loc) · 4.69 KB
/
Copy pathenv.example
File metadata and controls
122 lines (105 loc) · 4.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Claude Local Stack - Fast Start Environment Template
#
# Quick start:
# 1) Copy this file to docker/.env
# 2) Run: docker compose -f docker\docker-compose.yml --env-file docker\.env up -d
# --------------------------------------------------
# Required for fast start
# --------------------------------------------------
COMPOSE_PROJECT_NAME=claude-local-stack
OLLAMA_PORT=11434
LITELLM_PORT=4000
WEBUI_PORT=3000
# Security: all ports bind to 127.0.0.1 (localhost only) by default.
# To expose a port on all interfaces (e.g. behind a reverse proxy), set the
# corresponding BIND variable to 0.0.0.0 — but NEVER do this without a
# firewall or authentication layer in front of it, especially for Ollama
# (which has no built-in auth).
OLLAMA_BIND=127.0.0.1
LITELLM_BIND=127.0.0.1
WEBUI_BIND=127.0.0.1
OPENAI_API_BASE_URL=http://litellm:4000
# Shared token sent by bundled clients to LiteLLM for local use.
# This value does not by itself enforce per-user API auth on LiteLLM.
OPENAI_API_KEY=dummy
# --------------------------------------------------
# Security — REQUIRED for production
# --------------------------------------------------
# Path to the directory holding secret files (must be outside the repo).
# Secrets are never passed as env vars; they are mounted at /run/secrets/ inside containers.
#
# How to set up (once per machine):
# mkdir -p ~/.secrets/claude-local-stack
# python -c "import secrets; print('sk-' + secrets.token_hex(32))" > ~/.secrets/claude-local-stack/litellm_master_key
# python -c "import secrets; print(secrets.token_hex(32))" > ~/.secrets/claude-local-stack/webui_secret_key
#
# Then set SECRETS_DIR to the absolute path of that directory (recommended for production).
# Leave empty to use the local fallback at docker/.secrets (dev/CI convenience).
SECRETS_DIR=
# Example (Windows): SECRETS_DIR=C:/Users/yourname/.secrets/claude-local-stack
# Example (Linux/Mac): SECRETS_DIR=/home/yourname/.secrets/claude-local-stack
# Space-separated models used by the model-init container
# Set MODELS=skip to bypass model pulling (useful for CI/smoke tests behind strict TLS/proxy rules).
MODELS=deepseek-v4-flash deepseek-coder llama3 phi3
# --------------------------------------------------
# Optional tuning and image overrides
# --------------------------------------------------
RESTART_POLICY=unless-stopped
OLLAMA_IMAGE=ollama/ollama:0.11.6
OLLAMA_NUM_PARALLEL=2
OLLAMA_MAX_LOADED_MODELS=2
OLLAMA_HEALTHCHECK_INTERVAL=5s
OLLAMA_HEALTHCHECK_RETRIES=10
MODEL_INIT_RESTART=no
LITELLM_IMAGE=claude-local-stack-litellm:local
LITELLM_HEALTHCHECK_INTERVAL=10s
LITELLM_HEALTHCHECK_TIMEOUT=5s
LITELLM_HEALTHCHECK_RETRIES=12
# Rate limiting — protects local GPU/CPU from runaway scripts.
# rpm = requests per minute, tpm = tokens per minute (global across all models).
# max_parallel_requests = max concurrent in-flight requests.
LITELLM_RPM_LIMIT=60
LITELLM_TPM_LIMIT=100000
LITELLM_MAX_PARALLEL_REQUESTS=10
WEBUI_IMAGE=ghcr.io/open-webui/open-webui:main
WEBUI_CONTAINER_PORT=8080
# Browser login for Open WebUI. This protects the UI, not the direct LiteLLM API port.
WEBUI_AUTH=true
# Set to true only for initial user onboarding; disable afterwards.
ENABLE_SIGNUP=false
WEBUI_HEALTHCHECK_INTERVAL=10s
WEBUI_HEALTHCHECK_TIMEOUT=5s
WEBUI_HEALTHCHECK_RETRIES=12
# --- Open-WebUI memory reduction ---
# Disable features that load heavy ML libraries/processes into RAM.
# Saves ~400-600 MB compared to all-features-on defaults.
ENABLE_LITELLM=false # We use our own LiteLLM container
ENABLE_RAG_WEB_SEARCH=false # Web-search ML libraries
ENABLE_IMAGE_GENERATION=false # ComfyUI/A1111 clients
ENABLE_CODE_EXECUTION=false # Jupyter kernel process
ENABLE_COMMUNITY_SHARING=false
TASK_MODEL= # Prevents auto-loading a task model into Ollama
TASK_MODEL_EXTERNAL=
AUDIO_STT_ENGINE= # Disables audio/STT library loading
# --------------------------------------------------
# Resource limits (prevents a single container from
# exhausting all host memory/CPU)
# --------------------------------------------------
# Ollama needs the most RAM — adjust to your model sizes.
OLLAMA_MEMORY_LIMIT=12g
OLLAMA_CPU_LIMIT=4.0
LITELLM_MEMORY_LIMIT=1g
LITELLM_CPU_LIMIT=2.0
WEBUI_MEMORY_LIMIT=512m
WEBUI_CPU_LIMIT=1.0
# Leave empty for CPU-only mode. For GPU, use docker/docker-compose.gpu.yml and set this to all.
NVIDIA_VISIBLE_DEVICES=
# --------------------------------------------------
# Optional Claude-compatible client defaults
# --------------------------------------------------
ANTHROPIC_BASE_URL=http://localhost:4000
# Shared local token for Claude-compatible clients.
ANTHROPIC_API_KEY=dummy
ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4
ANTHROPIC_DEFAULT_SONNET_MODEL=chat
ANTHROPIC_DEFAULT_HAIKU_MODEL=fast