This guide covers common issues you may encounter when using LocalAI, organized by category. For each issue, diagnostic steps and solutions are provided.
## Quick Diagnostics
Before diving into specific issues, run these commands to gather diagnostic information:
```bash
# Check LocalAI is running and responsive
curl http://localhost:8080/readyz
# List loaded models
curl http://localhost:8080/v1/models
# Check LocalAI version
local-ai --version
# Enable debug logging for detailed output
DEBUG=true local-ai run
# or
local-ai run --log-level=debug
```
For Docker deployments:
```bash
# View container logs
docker logs local-ai
# Check container status
docker ps -a | grep local-ai
# Test GPU access (NVIDIA)
docker run --rm --gpus all nvidia/cuda:12.8.0-base-ubuntu24.04 nvidia-smi
```
## Installation Issues
### Binary Won't Execute on Linux
**Symptoms:** Permission denied or "cannot execute binary file" errors.
**Solution:**
```bash
chmod +x local-ai-*
./local-ai-Linux-x86_64 run
```
If you see "cannot execute binary file: Exec format error", you downloaded the wrong architecture. Verify with:
```bash
uname -m
# x86_64 → download the x86_64 binary
# aarch64 → download the arm64 binary
```
### macOS: Application Is Quarantined
**Symptoms:** macOS blocks LocalAI from running because the DMG is not signed by Apple.
**Solution:** See [GitHub issue #6268](https://github.com/mudler/LocalAI/issues/6268) for quarantine bypass instructions. This is tracked for resolution in [issue #6244](https://github.com/mudler/LocalAI/issues/6244).
## Model Loading Problems
### Model Not Found
**Symptoms:** API returns `404` or `"model not found"` error.
**Diagnostic steps:**
1. Check the model exists in your models directory:
```bash
ls -la /path/to/models/
```
2. Verify your models path is correct:
```bash
# Check what path LocalAI is using
local-ai run --models-path /path/to/models --log-level=debug
**Symptoms:** Model is found but fails to load, with backend errors in the logs.
**Common causes and fixes:**
- **Wrong backend:** Ensure the backend in your model YAML matches the model format. GGUF models use `llama-cpp`, diffusion models use `diffusers`, etc. See the [compatibility table](/docs/reference/compatibility-table/) for details.
- **Backend not installed:** Check installed backends:
```bash
local-ai backends list
# Install a missing backend:
local-ai backends install llama-cpp
```
- **Corrupt model file:** Re-download the model. Partial downloads or disk errors can corrupt files.
- **Wrong model format:** LocalAI uses GGUF format for llama.cpp models. Older GGML format is deprecated.
### Model Configuration Issues
**Symptoms:** Model loads but produces unexpected results or errors during inference.
Check your model YAML configuration:
```yaml
# Example model config
name: my-model
backend: llama-cpp
parameters:
model: my-model.gguf # Relative to models directory
context_size: 2048
threads: 4 # Should match physical CPU cores
```
Common mistakes:
-`model` path must be relative to the models directory, not an absolute path
-`threads` set higher than physical CPU cores causes contention
-`context_size` too large for available RAM causes OOM errors
## GPU and Memory Issues
### GPU Not Detected
**NVIDIA (CUDA):**
```bash
# Verify CUDA is available
nvidia-smi
# For Docker, verify GPU passthrough
docker run --rm --gpus all nvidia/cuda:12.8.0-base-ubuntu24.04 nvidia-smi
```
When working correctly, LocalAI logs should show: `ggml_init_cublas: found X CUDA devices`.
Ensure you are using a CUDA-enabled container image (tags containing `cuda11`, `cuda12`, or `cuda13`). CPU-only images cannot use NVIDIA GPUs.
**AMD (ROCm):**
```bash
# Verify ROCm installation
rocminfo
# Docker requires device passthrough
docker run --device=/dev/kfd --device=/dev/dri --group-add=video ...
If your GPU is not in the default target list, open up an Issue. Supported targets include: gfx908, gfx90a, gfx942, gfx950, gfx1030, gfx1100, gfx1101, gfx1102, gfx1200, gfx1201.
These can also be set via environment variables (`LOCALAI_WATCHDOG_IDLE=true`, `LOCALAI_WATCHDOG_IDLE_TIMEOUT=15m`) or in the Web UI under Settings → Watchdog Settings.
See the [VRAM Management guide](/advanced/vram-management/) for more details.
## API Connection Problems
### Connection Refused
**Symptoms:** `curl: (7) Failed to connect to localhost port 8080: Connection refused`
**Diagnostic steps:**
1. Verify LocalAI is running:
```bash
# Direct install
ps aux | grep local-ai
# Docker
docker ps | grep local-ai
```
2. Check the bind address and port:
```bash
# Default is :8080. Override with:
local-ai run --address=0.0.0.0:8080
# or
LOCALAI_ADDRESS=":8080" local-ai run
```
3. Check for port conflicts:
```bash
ss -tlnp | grep 8080
```
### Authentication Errors (401)
**Symptoms:** `401 Unauthorized` response.
If API key authentication is enabled (`LOCALAI_API_KEY` or `--api-keys`), include the key in your requests:
```bash
curl http://localhost:8080/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"
```
Keys can also be passed via `x-api-key` or `xi-api-key` headers.
### Request Errors (400/422)
**Symptoms:** `400 Bad Request` or `422 Unprocessable Entity`.
Common causes:
- Malformed JSON in request body
- Missing required fields (e.g., `model` or `messages`)
- Invalid parameter values (e.g., negative `top_n` for reranking)
Enable debug logging to see the full request/response:
```bash
DEBUG=true local-ai run
```
See the [API Errors reference](/reference/api-errors/) for a complete list of error codes and their meanings.