Where Does LocalAI Store Models and Config?
LocalAI reads model weights plus YAML configs from a models directory. Defaults per install type and the MODELS_PATH override.
Last updated
LocalAI treats one models directory as the whole universe. Drop in .gguf weights plus a same-named .yaml config describing backend, context and sampling, and the model appears. The gallery installer writes into this same folder, and prompt caches land relative to it too.
Location depends on how you run it: ./models beside the binary, /models in Docker, ~/.localai/models for the launcher app. Override everything with LOCALAI_MODELS_PATH or --models-path. Deleting a model means removing both its weight file and its yaml; the gallery cache beside it rebuilds itself.
Where LocalAI stores this, by platform
.\models
Relative to the working directory for CLI runs. Launcher builds use %USERPROFILE%\.localai\models instead. Set LOCALAI_MODELS_PATH to park weights on a bigger drive.
~/.localai/models
Launcher default. Docker mounts host ./models at /models in the container. Gallery fetches cache under <models>/../cache/gallery and can be deleted safely.
~/.localai/models
Mirrors macOS for launcher installs, ./models for bare binaries. Runtime settings like custom galleries live in runtime_settings.json under LOCALAI_CONFIG_DIR.
Frequently asked questions
How do I install a model in LocalAI manually?
Copy the weight file into the models directory and add a matching .yaml with name, backend and parameters. Restart or let the watcher pick it up. Gallery installs do exactly this for you through the web UI.
How do I move LocalAI models to another drive?
Move the folder, then set LOCALAI_MODELS_PATH or --models-path to the new spot. Keep file:// gallery references inside the models tree or LocalAI rejects them for security. Preload lists with PRELOAD_MODELS still resolve the same way.
Notice an outdated path? Let us know.