config.json Reference

config.json lives at the repository root and holds every machine-specific setting LlamaForge needs — nothing is hardcoded into the source. It is created by the bootstrap scripts on first run and updated by the dashboard (POST /api/config, POST /api/network) as you use it. backend/config.py defines the defaults; any key missing from the file on disk falls back to its default at load time.

Keys

KeyTypeDefaultMeaning
llama_srcstring""Path to a git checkout of llama.cpp.
build_dirstring""CMake build directory for llama.cpp (usually <llama_src>/build).
server_binstring""Path to the built llama-server (or llama-server.exe) binary.
models_inistring<repo root>/models.iniPath to the models.ini preset file passed to llama-server --models-preset.
model_dirslist[]Directories the Discover/scan feature searches for GGUF files.
router_portint8080Port llama-server (the router) listens on.
panel_portint8090Port the LlamaForge dashboard (backend/server.py) listens on.
router_hoststring"127.0.0.1"Router bind address. 127.0.0.1 = local only; 0.0.0.0 = reachable on the LAN.
router_api_keystring""API key required from clients when router_host is not 127.0.0.1.
wsl_distrostring""WSL distro that runs vLLM. Empty string auto-picks the default distro.
vllm_portint8081Port vLLM serves on inside WSL (localhost-forwarded to Windows).
cmake_flagsobject{}Persisted CMake build flags, normally seeded from hardware detection.
git_remotestring"https://github.com/ggml-org/llama.cpp"Remote used to clone/update the llama.cpp source.
auto_load_modelstring""Model id to load automatically on launch. Empty string disables auto-load.
presetsobject{}Named knob sets: {name: {knob: value}}, managed from the dashboard.
ui_modestring"lite""lite" shows a curated knob set; "advanced" exposes all ~220 llama-server flags.
onboardedboolFalseWhether the first-run wizard has already been shown; set to True once dismissed.
anthropic_default_modelstring""Fallback local model id used by the Anthropic-compatible shim when a request doesn't map to one.
anthropic_shim_enabledboolTrueWhether /v1/messages (Anthropic-compatible) is served.
wiki_dirstring""Context-doc directory for the wiki feature. Empty string resolves to <repo root>/wiki.
wiki_profilesobject{}Named context-doc profiles: {name: {"docs": [...], "description": str}}.
wiki_activeobject{}Active profile per model: {model_id: profile_name}.
themestring""UI theme. Empty string follows OS/localStorage; otherwise "light" or "dark".
cvdboolFalseEnables the colorblind-safe palette and non-color status cues.
docs_dirstring""Directory the in-app docs viewer reads from. Empty string resolves to <repo root>/docs/content.

25 keys total, matching DEFAULTS in backend/config.py.

Loading and saving

config.load() deep-copies DEFAULTS and overlays whatever is present in config.json on disk, so a config file written before a new key was added still works — the new key simply falls back to its default. config.save() writes the full in-memory dict back to disk as indented JSON.

config.migrate() runs once at server startup (backend/server.py main()) to classify pre-existing installs: a config file with no ui_mode key is treated as a legacy install. If server_bin is already set, it is stamped ui_mode: "advanced" and onboarded: True; otherwise it gets ui_mode: "lite" and onboarded: False, so the onboarding wizard shows. The migration is idempotent — a config that already has ui_mode is returned unchanged.

See also models.ini Format for the preset file models_ini points at, and HTTP API for the endpoints that read and write these keys.