9 min read

LocalAI: A Self-Hosted OpenAI API for Every Kind of Model (GitHub, Scanned)

A self-hosted, OpenAI-compatible API for text, image, voice and video models, with or without a GPU.

LocalAI logo
✅
Scan: safe. Nothing malicious. Two things to know: none of the 70 third-party actions in the pipeline that builds its images is pinned to a commit, and a few optional Python backends pin old PyTorch releases with a critical advisory. Scanned Sep 26, 2026; the full report is below.

LocalAI is a drop-in replacement for the OpenAI API that you run yourself, and it goes well past text. Behind one endpoint on port 8080 it serves chat models, embeddings, rerankers, image and video generation, speech-to-text, text-to-speech and object detection, and it also speaks the Anthropic and ElevenLabs APIs. Each engine (llama.cpp, vLLM, whisper.cpp, diffusers, MLX and some 60 others) is a separate backend image pulled only when a model needs it, so the core stays small.

Ettore Di Giacinto started it in 2023 and it has grown into a platform: a web UI, multi-user accounts with API keys and quotas, built-in agents with MCP, and a distributed mode that spreads models across machines. It is MIT-licensed, written mostly in Go, and releases often; 4.10.0 came out ten days before this scan. No GPU is required to start.

  • Repository: github.com/mudler/LocalAI
  • Licence: MIT (MIT License)
  • Language: Go. Stars: 49.3K. Forks: 4,473. Last push: Sep 27, 2026.
  • Scan: safe, Sep 26, 2026, commit 92b8f1d

Who it is for

Self-hosters and teams who want one API for every kind of model, developers swapping OpenAI calls in an existing app for local ones, and anyone running on CPUs or a mix of hardware.

Getting started

1. Run the CPU image with Docker, then open http://localhost:8080 (AMD, Intel and Vulkan images are in the README)

docker run -ti --name local-ai -p 8080:8080 localai/localai:latest

2. Or on an NVIDIA GPU with CUDA 12

docker run -ti --name local-ai -p 8080:8080 --gpus all localai/localai:latest-gpu-nvidia-cuda-12

3. With the local-ai binary, pull and run a model from the gallery

local-ai run llama-3.2-1b-instruct:q4_k_m

The macOS app is an unsigned DMG, so the README has you clear the quarantine flag with sudo xattr -d com.apple.quarantine /Applications/LocalAI.app after installing. The localai.io site also offers a curl | sh installer; it downloads the release binary from GitHub, checks it against the published checksums, and uses sudo only to write to /usr/local/bin (LOCALAI_NO_SUDO=1 installs to ~/.local/bin instead).

Safety scan

We cloned mudler/LocalAI at commit 92b8f1d on Sep 26, 2026 and ran the checks described on the GitHub Tools page: credential patterns, decode-and-execute code, install-time scripts, committed binaries, risky CI workflows, every host the code talks to, known vulnerabilities in pinned dependencies, and project hygiene. A person read every hit. This is what we found.

  • No secrets, no self-decoding code and no committed binaries across 670,000 lines, mostly Go. The single bare-IP URL is a TEST-NET address (203.0.113.1) in a unit test.
  • Three pattern hits, all about install commands rather than code that runs them: the Makefile fetches GoReleaser's runner with curl | bash for release builds, and the website's installer and its copy button both show curl -sSL https://localai.io/install.sh | sh. That script is 274 lines, verifies checksums and asks for sudo only to write the binary to /usr/local/bin.
  • The 126 installer scripts are mostly per-backend install.sh and run.sh files that set up each Python or C++ engine; none pipes to a shell or edits your shell profile. The other sudo is .docker/install-base-deps.sh, which installs CUDA, Intel and Vulkan packages during the image build.
  • 12 critical advisories after de-duplication. Eight are in go.mod: seven in golang.org/x/crypto 0.51.0, all about its SSH code, and one in gofiber/utils, an indirect dependency. The other four are torch 2.2.2 and 2.4.1, pinned by optional backends (Coqui TTS, faster-whisper, whisper-medusa); their torch.load advisory matters when loading untrusted model files. The React UI's lockfile has a single high entry.
  • 36 workflows, none using pull_request_target, but all 70 third-party actions are pinned to tags rather than commits, in the pipeline that publishes the Docker images. Dependabot, Renovate, CodeQL and a security policy are all present.

What the scanner counted

CheckResult
SecretsNone found.
Suspicious code3 pattern hits found and read; every one is listed under the raw findings.
Install-time code1 Cargo build script. 126 installer scripts (one can call sudo)
Committed binariesNone.
CI workflows36 workflows. None use pull_request_target. 70 of 70 third-party actions pinned to a tag rather than a commit.
Network hosts40 distinct hosts referenced from source; most often huggingface.co, github.com, platform.openai.com, localai.io. 1 URL to a bare IP address, listed under the raw findings.
Known vulnerabilities312 advisories across 1,479 pinned packages: 12 critical, 122 high, 100 moderate, 41 low, 37 unrated. backend/python/ace-step/requirements-hipblas.txt: 1 packages, 1 advisories; backend/python/ace-step/requirements.txt: 1 packages, 0 advisories; backend/python/chatterbox/requirements-cpu.txt: 4 packages, 0 advisories; backend/python/chatterbox/requirements-cublas12.txt: 6 packages, 19 advisories; backend/python/chatterbox/requirements-cublas13.txt: 4 packages, 0 advisories; backend/python/chatterbox/requirements-hipblas.txt: 6 packages, 1 advisories; backend/python/chatterbox/requirements-intel.txt: 5 packages, 0 advisories; backend/python/chatterbox/requirements-l4t12.txt: 4 packages, 0 advisories; backend/python/chatterbox/requirements-l4t13.txt: 4 packages, 0 advisories; backend/python/chatterbox/requirements-mps.txt: 4 packages, 0 advisories; backend/python/chatterbox/requirements.txt: 1 packages, 0 advisories; backend/python/common/template/requirements-intel.txt: 2 packages, 0 advisories; backend/python/common/template/requirements.txt: 1 packages, 0 advisories; backend/python/coqui/requirements-cpu.txt: 3 packages, 42 advisories; backend/python/coqui/requirements-cublas12.txt: 3 packages, 42 advisories; backend/python/coqui/requirements-hipblas.txt: 3 packages, 23 advisories; backend/python/coqui/requirements-intel.txt: 3 packages, 30 advisories; backend/python/coqui/requirements-mps.txt: 2 packages, 31 advisories; backend/python/coqui/requirements.txt: 2 packages, 0 advisories; backend/python/diffusers/requirements-cpu.txt: 4 packages, 14 advisories; backend/python/diffusers/requirements-cublas12.txt: 2 packages, 5 advisories; backend/python/diffusers/requirements-cublas13.txt: 2 packages, 5 advisories; backend/python/diffusers/requirements-hipblas.txt: 4 packages, 6 advisories; backend/python/diffusers/requirements-intel.txt: 2 packages, 5 advisories; backend/python/diffusers/requirements-l4t12.txt: 2 packages, 5 advisories; backend/python/diffusers/requirements-l4t13.txt: 2 packages, 5 advisories; backend/python/diffusers/requirements-mps.txt: 4 packages, 14 advisories; backend/python/diffusers/requirements.txt: 1 packages, 0 advisories; backend/python/faster-qwen3-tts/requirements.txt: 2 packages, 0 advisories; backend/python/faster-whisper/requirements-cpu.txt: 1 packages, 20 advisories; backend/python/faster-whisper/requirements-cublas12.txt: 1 packages, 20 advisories; backend/python/faster-whisper/requirements-cublas13.txt: 1 packages, 4 advisories; backend/python/faster-whisper/requirements-mps.txt: 1 packages, 9 advisories; backend/python/faster-whisper/requirements.txt: 1 packages, 0 advisories; backend/python/fish-speech/requirements-cublas13.txt: 2 packages, 4 advisories; backend/python/fish-speech/requirements-hipblas.txt: 2 packages, 1 advisories; backend/python/fish-speech/requirements-l4t13.txt: 2 packages, 4 advisories; backend/python/fish-speech/requirements.txt: 2 packages, 0 advisories; backend/python/funasr/requirements-mps.txt: 2 packages, 9 advisories; backend/python/funasr/requirements.txt: 2 packages, 0 advisories; backend/python/insightface/requirements.txt: 1 packages, 0 advisories; backend/python/kitten-tts/requirements-mps.txt: 2 packages, 0 advisories; backend/python/kitten-tts/requirements.txt: 2 packages, 0 advisories; backend/python/kokoro/requirements-cublas12.txt: 2 packages, 9 advisories; backend/python/kokoro/requirements-cublas13.txt: 2 packages, 4 advisories; backend/python/kokoro/requirements-hipblas.txt: 2 packages, 1 advisories; backend/python/kokoro/requirements-intel.txt: 3 packages, 23 advisories; backend/python/kokoro/requirements-mps.txt: 1 packages, 9 advisories; backend/python/kokoro/requirements.txt: 2 packages, 0 advisories; backend/python/liquid-audio/requirements.txt: 1 packages, 0 advisories; backend/python/llama-cpp-quantization/requirements-cpu.txt: 1 packages, 1 advisories; backend/python/llama-cpp-quantization/requirements-mps.txt: 1 packages, 2 advisories; backend/python/llama-cpp-quantization/requirements.txt: 1 packages, 0 advisories; backend/python/longcat-video/requirements-cpu.txt: 2 packages, 1 advisories; backend/python/longcat-video/requirements-cublas12.txt: 2 packages, 1 advisories; backend/python/longcat-video/requirements-cublas13.txt: 2 packages, 1 advisories; backend/python/longcat-video/requirements-l4t13.txt: 2 packages, 1 advisories; backend/python/longcat-video/requirements.txt: 14 packages, 29 advisories; backend/python/mlx-audio/requirements.txt: 1 packages, 0 advisories; backend/python/mlx-distributed/requirements.txt: 1 packages, 0 advisories; backend/python/mlx-video/requirements.txt: 1 packages, 0 advisories; backend/python/mlx-vlm/requirements.txt: 1 packages, 0 advisories; backend/python/mlx/requirements.txt: 1 packages, 0 advisories; backend/python/moonshine/requirements-mps.txt: 1 packages, 0 advisories; backend/python/moonshine/requirements.txt: 1 packages, 0 advisories; backend/python/nemo/requirements-cublas13.txt: 1 packages, 0 advisories; backend/python/nemo/requirements.txt: 3 packages, 1 advisories; backend/python/neutts/requirements-after.txt: 2 packages, 1 advisories; backend/python/neutts/requirements-cpu.txt: 7 packages, 17 advisories; backend/python/neutts/requirements-cublas12.txt: 7 packages, 17 advisories; backend/python/neutts/requirements-hipblas.txt: 6 packages, 10 advisories; backend/python/neutts/requirements-l4t12.txt: 4 packages, 0 advisories; backend/python/neutts/requirements.txt: 2 packages, 0 advisories; backend/python/outetts/requirements-cpu.txt: 4 packages, 9 advisories; backend/python/outetts/requirements-cublas12.txt: 4 packages, 9 advisories; backend/python/outetts/requirements-cublas13.txt: 4 packages, 5 advisories; backend/python/outetts/requirements-hipblas.txt: 4 packages, 1 advisories; backend/python/outetts/requirements-intel.txt: 3 packages, 0 advisories; backend/python/outetts/requirements.txt: 3 packages, 0 advisories; backend/python/pocket-tts/requirements-hipblas.txt: 1 packages, 1 advisories; backend/python/pocket-tts/requirements-mps.txt: 2 packages, 9 advisories; backend/python/pocket-tts/requirements.txt: 2 packages, 0 advisories; backend/python/qwen-asr/requirements-hipblas.txt: 1 packages, 1 advisories; backend/python/qwen-asr/requirements-mps.txt: 1 packages, 9 advisories; backend/python/qwen-asr/requirements.txt: 2 packages, 0 advisories; backend/python/qwen-tts/requirements-hipblas.txt: 2 packages, 1 advisories; backend/python/qwen-tts/requirements.txt: 2 packages, 0 advisories; backend/python/rerankers/requirements-cpu.txt: 1 packages, 9 advisories; backend/python/rerankers/requirements-cublas12.txt: 1 packages, 9 advisories; backend/python/rerankers/requirements-cublas13.txt: 1 packages, 4 advisories; backend/python/rerankers/requirements-hipblas.txt: 1 packages, 1 advisories; backend/python/rerankers/requirements-mps.txt: 1 packages, 9 advisories; backend/python/rerankers/requirements.txt: 1 packages, 0 advisories; backend/python/rfdetr/requirements-cpu.txt: 1 packages, 9 advisories; backend/python/rfdetr/requirements-cublas12.txt: 1 packages, 9 advisories; backend/python/rfdetr/requirements-cublas13.txt: 1 packages, 4 advisories; backend/python/rfdetr/requirements-hipblas.txt: 2 packages, 1 advisories; backend/python/rfdetr/requirements-mps.txt: 1 packages, 9 advisories; backend/python/rfdetr/requirements.txt: 1 packages, 0 advisories; backend/python/sglang/requirements-cpu.txt: 1 packages, 1 advisories; backend/python/sglang/requirements-cublas12.txt: 1 packages, 4 advisories; backend/python/sglang/requirements.txt: 1 packages, 0 advisories; backend/python/speaker-recognition/requirements.txt: 1 packages, 0 advisories; backend/python/tinygrad/requirements.txt: 2 packages, 0 advisories; backend/python/transformers/requirements-cpu.txt: 5 packages, 9 advisories; backend/python/transformers/requirements-cublas12.txt: 5 packages, 9 advisories; backend/python/transformers/requirements-cublas13.txt: 5 packages, 5 advisories; backend/python/transformers/requirements-hipblas.txt: 5 packages, 1 advisories; backend/python/transformers/requirements-intel.txt: 4 packages, 0 advisories; backend/python/transformers/requirements-mps.txt: 5 packages, 9 advisories; backend/python/transformers/requirements.txt: 3 packages, 0 advisories; backend/python/trl/requirements-cpu.txt: 1 packages, 2 advisories; backend/python/trl/requirements-cublas12.txt: 1 packages, 2 advisories; backend/python/trl/requirements-cublas13.txt: 1 packages, 2 advisories; backend/python/trl/requirements-mps.txt: 1 packages, 2 advisories; backend/python/trl/requirements.txt: 1 packages, 0 advisories; backend/python/vibevoice/requirements-cpu.txt: 2 packages, 9 advisories; backend/python/vibevoice/requirements-hipblas.txt: 2 packages, 1 advisories; backend/python/vibevoice/requirements-mps.txt: 2 packages, 9 advisories; backend/python/vibevoice/requirements.txt: 2 packages, 0 advisories; backend/python/vllm-omni/requirements-cublas12.txt: 1 packages, 14 advisories; backend/python/vllm-omni/requirements.txt: 1 packages, 0 advisories; backend/python/vllm/requirements-cpu.txt: 1 packages, 4 advisories; backend/python/vllm/requirements-cublas13-after.txt: 1 packages, 0 advisories; backend/python/vllm/requirements-l4t13-after.txt: 1 packages, 0 advisories; backend/python/vllm/requirements.txt: 1 packages, 0 advisories; backend/python/voxcpm/requirements-hipblas.txt: 1 packages, 1 advisories; backend/python/voxcpm/requirements.txt: 2 packages, 0 advisories; backend/python/whisper-medusa/requirements-cpu.txt: 2 packages, 20 advisories; backend/python/whisper-medusa/requirements-cublas12.txt: 2 packages, 20 advisories; backend/python/whisper-medusa/requirements.txt: 2 packages, 23 advisories; backend/python/whisperx/requirements-cpu.txt: 1 packages, 8 advisories; backend/python/whisperx/requirements.txt: 1 packages, 0 advisories; backend/rust/kokoros/Cargo.lock: 313 packages, 6 advisories; core/http/react-ui/package-lock.json: 614 packages, 1 advisories; go.mod: 533 packages, 95 advisories.
Project hygieneHas security policy, automated dependency updates, CodeQL, licence file, contributing guide.
OpenSSF ScorecardNot scored: the project is not in Scorecard's weekly index.

The raw findings

Every hit the scanner wrote out, with a link to the exact line at the scanned commit. Secrets candidates are redacted.

Pattern hits (3)
WhereRuleMatch
Makefile:74download-piped-to-shellGORELEASER=curl -sfL https://goreleaser.com/static/run | bash -s --
website/static/install.sh:4download-piped-to-shell# curl -sSL https://localai.io/install.sh | sh
website/static/js/site.js:377download-piped-to-shellvar CMD = {'p-script':'curl -sSL https://localai.io/install.sh | sh',
URLs to bare IP addresses (1)
WhereRuleMatch
pkg/utils/base64_internal_test.go:45ip-literal-urlb64, err := GetContentURIAsBase64("http://203.0.113.1/whatever.png")
Installer scripts (126)
Worst known vulnerabilities (24 of 312)
AdvisorySeverityPackageSummary
GHSA-53q9-r3pm-6pq6criticaltorch@2.4.1PyTorch: `torch.load` with `weights_only=True` leads to remote code execution
CVE-2024-48063criticaltorch@2.4.1
GHSA-53q9-r3pm-6pq6criticaltorch@2.2.2PyTorch: `torch.load` with `weights_only=True` leads to remote code execution
CVE-2024-48063criticaltorch@2.2.2
GHSA-m98w-cqp3-qcqrcriticalgithub.com/gofiber/utils@1.1.0Fiber Utils UUIDv4 and UUID Silent Fallback to Predictable Values
GHSA-5cgq-3rg8-m6cvcriticalgolang.org/x/crypto@0.51.0golang.org/x/crypto vulnerable to auth bypass via unenforced @revoked status
GHSA-89gr-r52h-f8rxcriticalgolang.org/x/crypto@0.51.0golang.org/x/crypto: FIDO/U2F security key physical presence check can be bypassed
GHSA-f5wc-c3c7-36mccriticalgolang.org/x/crypto@0.51.0golang.org/x/crypto doesn't drop invoking agent constraints when forwarding keys
GHSA-jppx-rxg9-jmrxcriticalgolang.org/x/crypto@0.51.0golang.org/x/crypto doesn't enforce invoking key constraints
GHSA-rm3j-f69w-wqmqcriticalgolang.org/x/crypto@0.51.0golang.org/x/crypto vulnerable to infinite loop on large channel writes
GHSA-vgwf-h737-ff37criticalgolang.org/x/crypto@0.51.0golang.org/x/crypto: Invoking client can cause server deadlock on unexpected responses
GHSA-x527-x647-q7ggcriticalgolang.org/x/crypto@0.51.0golang.org/x/crypto: Invoking VerifiedPublicKeyCallback permissions skip enforcement
CVE-2025-55551hightorch@2.6.0+cu124
CVE-2025-55552hightorch@2.6.0+cu124
CVE-2025-55553hightorch@2.6.0+cu124
CVE-2025-55557hightorch@2.6.0+cu124
CVE-2025-55558hightorch@2.6.0+cu124
CVE-2025-55560hightorch@2.6.0+cu124
CVE-2026-4538hightorch@2.6.0+cu124
GHSA-63cw-57p8-fm3phightorch@2.6.0+cu124
GHSA-29pf-2h5f-8g72hightransformers@4.48.3HuggingFace transformers vulnerable to remote code execution
GHSA-fgcw-684q-jj6rhightransformers@4.48.3huggingface/transformers: Arbitrary Code Execution During Model Initialization in the LightGlue Model Loading Path
GHSA-xrqw-3rrv-vx5whightransformers@4.48.3Transformers save_pretrained path traversal allows arbitrary file writes through chat template names
CVE-2025-14920hightransformers@4.48.3

By the numbers

Stars49.3K
Forks4,473
Contributors254
Commits8,134
Open issues102
Open pull requests73
Releases136
Latest releasev4.10.0
LicenceMIT
Main languageGo
Project age3 years
Last pushSep 27, 2026
Tracked files3,895
Lines of code671.3K
Checkout size57 MB

Lines by language: Go 385.8K, JavaScript 69.3K, CSS 36.5K, Markdown 32.4K, YAML 31.6K, Python 31.2K.

Questions

Is LocalAI free?

Yes. LocalAI is MIT-licensed and free for any use, with no paid edition. Models from its gallery, Hugging Face or the Ollama registry are free to download under their own licences. Running it costs only your hardware, and since it runs on a CPU, a spare machine or a small server is enough to try it.

Does LocalAI need a GPU?

No. The default image runs on CPU, and small quantized models of 1B to 4B parameters are usable that way. A GPU makes it much faster, and LocalAI detects NVIDIA, AMD, Intel, Apple Silicon and Vulkan hardware and downloads the matching backend automatically. Image and video generation are where a GPU stops being optional in practice.

LocalAI or Ollama?

Ollama does one thing, text and vision models on llama.cpp, with the least setup. LocalAI is broader: speech, image, video and detection models behind the same API, OpenAI, Anthropic and ElevenLabs compatibility, multi-user accounts and a distributed mode, and it can run vLLM or llama.cpp as backends. Pick Ollama for a personal chat model and LocalAI for a shared, multi-modal server.


This post is part of GitHub Tools, where every repository is cloned and scanned before it is written up. The scan is a snapshot of one commit on one day; the repository has moved on since, so check it before you install.