.env.common Reference
.env.common holds the host-wide settings shared by every profile across both backends — Hugging Face credentials, cache paths, downloader settings, dev-build sources, and the timezone. It lives at the repo root and is gitignored. Running llmux creates it through the first-run wizard; manual installs must initialize the template with owner-only permissions:
install -m 600 .env.common.example .env.common
# then edit the values
llmux loads this file at launch time and merges it into the Compose environment for both backends. Per-model settings (sampling flags, context length, GPU ids, …) belong in profiles.yaml and config/<backend>/<name>.yaml, not here.
Validate it
Run llmux env-check to confirm the file exists, has owner-only permissions, and that required paths such as HF_CACHE_PATH are set and absolute. HF_TOKEN is optional, and the selected vLLM version is injected at start time.
Shell expansion
$HOME in the template is expanded by llmux before host-path validation and Docker Compose startup, so $HOME/.cache/huggingface resolves to your home directory. A path that remains relative after expansion is rejected.
Keep credentials owner-only
.env.common can contain HF_TOKEN. The setup wizard writes it with owner-only mode 0600; manual setup must use the install -m 600 command above rather than a plain copy that may inherit group or world read access.
All variables at a glance
| Variable | Required | Default (template) | Backend | Purpose |
|---|---|---|---|---|
HF_TOKEN |
Optional¹ | (empty) | both | Hugging Face token for gated/private model downloads. |
HF_CACHE_PATH |
Yes | /home/$USER/.cache/huggingface |
both | Host path mounted as the in-container HF cache. |
PREPARE_DOWNLOADER_IMAGE |
For llama.cpp prepare |
vllm/vllm-openai:v0.27.1 |
llama.cpp | Python-capable image used by the download-only GGUF preparation path. |
PREPARE_MAX_WORKERS |
Optional | (empty) | both | Hugging Face download worker limit; overridden by prepare --max-workers. |
LORA_BASE_PATH |
Optional² | (empty) | vLLM | Host directory of LoRA adapters, mounted at /app/lora. |
VLLM_VERSION |
Optional³ | (not in template) | vLLM | Tag for the official vllm/vllm-openai image. |
VLLM_IMAGE |
Optional | (empty) | vLLM | Image override for direct Docker Compose use; llmux uses the profile's runtime image. |
VLLM_USE_V2_MODEL_RUNNER |
Optional | 1 |
vLLM | Set to 0 to use the V1 model runner, which is required for thinking_token_budget. |
VLLM_REPO_URL |
Optional | https://github.com/vllm-project/vllm.git |
vLLM | Source repo for image build-dev --backend vllm. |
VLLM_BRANCH |
Optional | main |
vLLM | Default source branch for vLLM dev builds. |
MODEL_DIR |
Optional⁴ | /home/$USER/Project/docker/llmux/models |
llama.cpp | Legacy GGUF detection and disk-view directory; not mounted by current profiles. |
LLAMACPP_IMAGE |
Optional | ghcr.io/ggml-org/llama.cpp:server-cuda |
llama.cpp | Official llama.cpp server image tag. |
LLAMACPP_REPO_URL |
Optional | https://github.com/ggml-org/llama.cpp.git |
llama.cpp | Source repo for image build-dev --backend llamacpp. |
LLAMACPP_BRANCH |
Optional | master |
llama.cpp | Default source branch for llama.cpp dev builds. |
TZ |
Optional | Asia/Seoul |
both | Container timezone. |
¹ Required only for gated/private Hugging Face repos — public models download without it.
² Required only when a vLLM profile has enable_lora: true.
³ vllm container up injects the highest local versioned tag, or Docker Hub's explicit current stable version when none is local.
⁴ Reserved for the host GGUF directory; current llama.cpp profiles download GGUF files directly into the HF cache via llama-server -hf (see below).
Hugging Face
HF_TOKEN
Hugging Face access token. Used to download gated or private models on both backends — vLLM passes it as HUGGING_FACE_HUB_TOKEN, llama.cpp as HF_TOKEN. If you only ever serve public repositories you can leave it empty.
HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The token is also read by llmux system mem-estimate to size gated models. env-check masks it in text output and emits only its presence and length in JSON.
HF_CACHE_PATH
Required. Absolute host path mounted into every container as the Hugging Face cache (/root/.cache/huggingface). Both backends download model weights here, so the cache is shared and persistent across container restarts and across the two backends.
HF_CACHE_PATH=/home/$USER/.cache/huggingface
Must be absolute
env-check rejects a relative HF_CACHE_PATH. Point it at a disk with enough room for the largest models you plan to serve.
PREPARE_DOWNLOADER_IMAGE / PREPARE_MAX_WORKERS
prepare downloads weights without starting the serving container. llama.cpp's server image has no Python/Hugging Face client, so its GGUF preparation path uses PREPARE_DOWNLOADER_IMAGE. PREPARE_MAX_WORKERS limits parallel Hugging Face transfers; leave it empty for the library default or override one run with llmux prepare <profile> --max-workers N.
PREPARE_DOWNLOADER_IMAGE=vllm/vllm-openai:v0.27.1
PREPARE_MAX_WORKERS=
vLLM
LORA_BASE_PATH
Host directory containing LoRA adapter folders. When set, it is mounted read-only at /app/lora inside the vLLM container (via compose/vllm/docker-compose.lora.yaml), so a profile's lora_modules entries can reference /app/lora/<adapter>. Only consumed when the profile has enable_lora: true.
LORA_BASE_PATH=/home/$USER/lora-adapters
VLLM_VERSION
Tag of the official vllm/vllm-openai image used by Compose. llmux up injects the highest local versioned tag, or resolves Docker Hub's current stable version when none is local. Set this only for a bare Compose invocation; env-check does not require it.
VLLM_VERSION=v0.20.1
VLLM_IMAGE
This variable no longer selects the autocomplete image. Autocomplete queries the running profile's container directly, or the image selected for its next startup when stopped. Set a profile's image_tag to pin that image; use llmux config flags --image IMAGE for an explicit image query.
VLLM_IMAGE=registry.example.com/team/vllm:v0.20.1
VLLM_USE_V2_MODEL_RUNNER
vLLM ships two model runners and defaults to V2. The V2 runner does not support the per-request thinking_token_budget parameter — a request that uses it fails with:
400: thinking_token_budget is not yet supported by the V2 model runner.
Run vLLM with VLLM_USE_V2_MODEL_RUNNER=0
Set it to 0 in .env.common to cap how long a reasoning model thinks:
VLLM_USE_V2_MODEL_RUNNER=0
Speculative decoding overrides the budget
If the profile's config enables speculative-config (MTP and friends), the budget is ignored even on the V1 runner — the model keeps thinking past the cap (vLLM #39573). MTP is a decode-speed feature and is mutually exclusive with a thinking budget in practice, so keep them on separate profiles.
The budget itself is a per-request field, passed top-level — nesting it inside chat_template_kwargs silently does nothing:
client.chat.completions.create(
model=..., messages=...,
extra_body={
"chat_template_kwargs": {"enable_thinking": True},
"thinking_token_budget": 512, # top-level
},
)
VLLM_REPO_URL / VLLM_BRANCH
Defaults for the vLLM dev-build pipeline (llmux image build-dev --backend vllm). When --repo-url / --branch are omitted on the CLI, these values are used; if they are also unset, the pipeline falls back to https://github.com/vllm-project/vllm.git and main.
VLLM_REPO_URL=https://github.com/vllm-project/vllm.git
VLLM_BRANCH=main
llama.cpp
MODEL_DIR
Legacy host directory used by old-file detection and the disk inventory view. Current profiles do not mount it into the container.
MODEL_DIR=/home/$USER/.llmux/models
How llama.cpp gets its models
Current llama.cpp profiles do not rely on a pre-populated MODEL_DIR. render-override.py builds a llama-server -hf <repo> -hff <file> command from the profile's hf_repo / hf_file, so llama-server downloads the GGUF straight into the shared HF_CACHE_PATH — exactly like the vLLM flow, with no host-side hf CLI dependency.
LLAMACPP_IMAGE
Tag of the official llama.cpp server image used by compose/llamacpp/docker-compose.yaml (image: ${LLAMACPP_IMAGE:-ghcr.io/ggml-org/llama.cpp:server-cuda}). Override it to pin a specific upstream build.
LLAMACPP_IMAGE=ghcr.io/ggml-org/llama.cpp:server-cuda
To run a profile on a locally-built image instead, build with llmux image build-dev --backend llamacpp and set image_tag: llamacpp-dev:<branch> on that profile in profiles.yaml — that is a per-profile override and does not touch LLAMACPP_IMAGE.
LLAMACPP_REPO_URL / LLAMACPP_BRANCH
Defaults for the llama.cpp dev-build pipeline (llmux image build-dev --backend llamacpp). When --repo-url / --branch are omitted, these are used; if also unset, the pipeline falls back to https://github.com/ggml-org/llama.cpp.git and master.
LLAMACPP_REPO_URL=https://github.com/ggml-org/llama.cpp.git
LLAMACPP_BRANCH=master
Common
LLMUX_LANG
UI language for the TUI — ko or en. Read from the process environment (not .env.common, which is a container-side file), and resolved once at startup, so set it before launching:
LLMUX_LANG=en llmux
Unset falls back to the system locale. This affects the TUI only; CLI output is English.
TZ
Timezone applied to both backend containers (TZ=${TZ:-UTC} in both Compose files). Affects log timestamps inside the container. Defaults to UTC if unset.
TZ=Asia/Seoul
Template
The first-run wizard renders the shipped .env.common.example, preserving advanced image, downloader, dev-build, and timezone variables while replacing the three prompted paths/token values.
For where these values flow at launch time, see Architecture. For the per-command flags that override these defaults, see the CLI Reference.