The install script, the macOS app and the latest container image give version 4.12.1. The add-ons, Office, Sandbox, Pages and Team in these docs need a newer build.
Start with the install script on Linux, or on a Mac with Apple Silicon. On Windows, on an Intel Mac, in a cluster, or when you want to keep LocalAI apart from the host, use a container. On a Mac you can also use the app.
You have
Use
Command or guide
Linux, or a Mac with Apple Silicon
Install script
curl -sSL https://localai.io/install.sh | sh
Windows (WSL2), an Intel Mac, a server, or a GPU image
The script downloads the release binary for your machine, checks it against the checksums of the release, and puts it on your PATH. It builds nothing. Running it twice changes nothing.
curl -sSL https://localai.io/install.sh | sh
local-ai run qwen3-4b
The API and the web interface are then at http://localhost:8080.
You can set these environment variables before the command:
Variable
Effect
LOCALAI_VERSION
Install a given release, for example v4.7.1. The default is the latest release.
INSTALL_DIR
Install into this folder. The default is /usr/local/bin, or ~/.local/bin when /usr/local/bin is not writable.
LOCALAI_FORCE
Set to 1 to install again when the same build is present.
LOCALAI_NO_SUDO
Set to 1 to never ask for sudo. LocalAI then installs into ~/.local/bin.
The script supports Linux and macOS on amd64 and arm64. There is no binary for Intel Macs. Use a container there. For a different install, see the other guides.
Container
docker run -p 8080:8080 --name local-ai -ti localai/localai:latest
Podman works the same way. For GPU images, see Containers.
macOS app
Download LocalAI.dmg, open it and move LocalAI to Applications. The DMG is signed and notarized. See macOS for the details.
Podman might not resolve short image names such as localai/localai:latest.
The Podman and Compose examples use the docker.io/ prefix to identify the
container registry explicitly.
Quick Start
The fastest way to get started is with the CPU image:
docker run -p 8080:8080 --name local-ai -ti localai/localai:latest
# Or with Podman:podman run -p 8080:8080 --name local-ai -ti docker.io/localai/localai:latest
This will:
Start LocalAI (you’ll need to install models separately)
Make the API available at http://localhost:8080
Image Types
LocalAI provides several image types to suit different needs. These images work with both Docker and Podman.
Standard Images
Standard images don’t include pre-configured models. Use these if you want to configure models manually.
CPU Image
docker run -ti --name local-ai -p 8080:8080 localai/localai:latest
# Or with Podman:podman run -ti --name local-ai -p 8080:8080 docker.io/localai/localai:latest
GPU Images
Choose the image that matches your hardware and installed drivers:
NVIDIA CUDA 12 is the compatibility choice for systems with CUDA 12 drivers. Use CUDA 13 when your NVIDIA driver and toolkit support CUDA 13.
AMD ROCm is for supported AMD GPUs, while Intel is for Intel GPUs with the required device runtime.
Jetson uses the L4T ARM64 image. Choose its CUDA 12 image for Jetson AGX Orin-class devices or CUDA 13 for DGX Spark.
Vulkan works across vendors and is the fallback when no matching CUDA, ROCm, or Intel image is available.
NVIDIA CUDA 13:
docker run -ti --name local-ai -p 8080:8080 --gpus all localai/localai:latest-gpu-nvidia-cuda-13
# Or with Podman:podman run -ti --name local-ai -p 8080:8080 --device nvidia.com/gpu=all docker.io/localai/localai:latest-gpu-nvidia-cuda-13
NVIDIA CUDA 12:
docker run -ti --name local-ai -p 8080:8080 --gpus all localai/localai:latest-gpu-nvidia-cuda-12
# Or with Podman:podman run -ti --name local-ai -p 8080:8080 --device nvidia.com/gpu=all docker.io/localai/localai:latest-gpu-nvidia-cuda-12
AMD GPU (ROCm):
docker run -ti --name local-ai -p 8080:8080 --device=/dev/kfd --device=/dev/dri --group-add=video localai/localai:latest-gpu-hipblas
# Or with Podman:podman run -ti --name local-ai -p 8080:8080 --device rocm.com/gpu=all docker.io/localai/localai:latest-gpu-hipblas
Intel GPU:
docker run -ti --name local-ai -p 8080:8080 localai/localai:latest-gpu-intel
# Or with Podman:podman run -ti --name local-ai -p 8080:8080 --device gpu.intel.com/all docker.io/localai/localai:latest-gpu-intel
Vulkan:
docker run -ti --name local-ai -p 8080:8080 localai/localai:latest-gpu-vulkan
# Or with Podman:podman run -ti --name local-ai -p 8080:8080 docker.io/localai/localai:latest-gpu-vulkan
NVIDIA Jetson (L4T ARM64):
CUDA 12 (for Nvidia AGX Orin and similar platforms):
docker run -ti --name local-ai -p 8080:8080 --runtime nvidia --gpus all localai/localai:latest-nvidia-l4t-arm64
CUDA 13 (for Nvidia DGX Spark):
docker run -ti --name local-ai -p 8080:8080 --runtime nvidia --gpus all localai/localai:latest-nvidia-l4t-arm64-cuda-13
Using Compose
The repository’s docker-compose.yaml installs phi-2-chat from the model gallery by default. Change its command list to select a different gallery model.
For a more manageable setup, especially with persistent volumes, use Docker Compose or Podman Compose:
Using CDI (Container Device Interface) - Recommended for NVIDIA Container Toolkit 1.14+
The CDI approach is recommended for newer versions of the NVIDIA Container Toolkit (1.14 and later). It provides better compatibility and is the future-proof method:
version:"3.9"services:api:image:docker.io/localai/localai:latest-gpu-nvidia-cuda-12# For CUDA 13, use: docker.io/localai/localai:latest-gpu-nvidia-cuda-13healthcheck:test:["CMD","curl","-f","http://localhost:8080/readyz"]# start_period, not timeout, is the knob for a slow first boot: startup# preload can download tens of GB before the API binds, and failures# inside the start period leave the container `starting` rather than# marking it unhealthy. timeout is a per-probe deadline.start_period:60minterval:1mtimeout:10sretries:3ports:- 8080:8080environment:- DEBUG=falsevolumes:- ./models:/models:cached# CDI driver configuration (recommended for NVIDIA Container Toolkit 1.14+)# This uses the nvidia.com/gpu resource APIdeploy:resources:reservations:devices:- driver:nvidia.com/gpucount:allcapabilities:[gpu]
Save this as compose.yaml and run:
docker compose up -d
# Or with Podman:podman-compose up -d
Using Legacy NVIDIA Driver - For Older NVIDIA Container Toolkit
If you are using an older version of the NVIDIA Container Toolkit (before 1.14), or need backward compatibility, use the legacy approach:
version:"3.9"services:api:image:docker.io/localai/localai:latest-gpu-nvidia-cuda-12# For CUDA 13, use: docker.io/localai/localai:latest-gpu-nvidia-cuda-13healthcheck:test:["CMD","curl","-f","http://localhost:8080/readyz"]# start_period, not timeout, is the knob for a slow first boot: startup# preload can download tens of GB before the API binds, and failures# inside the start period leave the container `starting` rather than# marking it unhealthy. timeout is a per-probe deadline.start_period:60minterval:1mtimeout:10sretries:3ports:- 8080:8080environment:- DEBUG=falsevolumes:- ./models:/models:cached# Legacy NVIDIA driver configuration (for older NVIDIA Container Toolkit)deploy:resources:reservations:devices:- driver:nvidiacount:1capabilities:[gpu]
Persistent data (collections, chat files, JSON stores when there is no database). Downloads are staged in /data/downloading until they are extracted
--data-path
$LOCALAI_DATA_PATH
Warning
Container files that are not stored in a volume are lost when the container is
recreated during an image upgrade. Mount all four paths if you want to preserve
installed models, backends, settings, and application data.
The host paths can be anywhere on persistent storage, but the container paths
must be exactly /models, /backends, /configuration, and /data. In
UnRAID and other container-template UIs, create one path mapping for each row
in the table above.
Backend OCI images contain symbolic links. When /backends is stored on a
filesystem that cannot create links, such as some CIFS/SMB mounts, LocalAI
materializes each link as a regular file so installation can complete. This can
use more disk space than a local filesystem. Prefer a Docker or Podman named
volume for /backends when possible.
The image starts as root only to run entrypoint.sh, which gives the data folders (/models, /backends, /configuration, /data, /tmp/generated) to the user localai (uid and gid 10001) and then runs LocalAI as that user. An add-on that runs commands in an isolated sandbox needs this, because it refuses to run as root. See the sandbox in the LocalAI container for the devices and permissions it needs.
Volumes from an older image are owned by root. The first start with this image changes their owner to 10001 (it logs this, and it can take a while on a large models folder). No manual step is needed.
LOCALAI_UID and LOCALAI_GID change the user. docker run --user or a Kubernetes runAsUser is respected, and the data folders must then be writable by that user.
LOCALAI_RUN_AS_ROOT=true keeps the old behaviour. Add-ons that run commands in a sandbox are then unavailable.
A bind mount whose owner cannot be changed (a read-only or network mount) must be made writable for uid 10001 on the storage side.
Next Steps
After installation:
Access the WebUI at http://localhost:8080
Check available models: curl http://localhost:8080/v1/models
For AMD: Ensure devices are accessible: ls -la /dev/kfd /dev/dri
NVIDIA Container fails to start with “Auto-detected mode as ’legacy’” error
If you encounter this error:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running prestart hook #0: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: requirement error: invalid expression
This indicates a Docker/NVIDIA Container Toolkit configuration issue. The container runtime’s prestart hook fails before LocalAI starts. This is not a LocalAI code bug.
Solutions:
Use CDI mode (recommended): Update your docker-compose.yaml to use the CDI driver configuration:
Upgrade NVIDIA Container Toolkit: Ensure you have version 1.14 or later, which has better CDI support.
Check NVIDIA Container Toolkit configuration: Run nvidia-container-cli --query-gpu to verify your installation is working correctly outside of containers.
Verify Docker GPU access: Test with docker run --rm --gpus all nvidia/cuda:12.0.0-base-ubuntu22.04 nvidia-smi
Models not downloading
Check internet connection
Verify disk space: df -h
Check container logs for errors: docker logs local-ai or podman logs local-ai
The quick-start examples above use the Docker Hub image names. Every image is published to both Docker Hub and Quay. The tables below map the Docker Hub tag to its Quay equivalent for each variant. Replace v4.12.1 with a released version to pin a specific build.
These images are compatible with Nvidia ARM64 devices with CUDA 12, such as the Jetson Nano, Jetson Xavier NX, and Jetson AGX Orin. For more information, see the Nvidia L4T guide.
You can also double-click the executable image in a file manager. Normal
AppImage mounting requires FUSE support (on Ubuntu 22.04, libfuse2). If FUSE
is unavailable, extract it into a writable directory and run the launcher:
This is the existing desktop/tray launcher, not the server bundled into an
image. First use needs internet access to download LocalAI. Models and backends
are downloaded separately. The launcher stores configuration in
~/.localai/launcher.json, runtime downloads in ~/.localai/bin, and default
models/backends under ~/.localai/. Fyne preferences use the user configuration
directory. These remain writable outside the read-only image. Keep your home
writable; replacing or deleting the AppImage does not delete your data.
The supported release target is x86_64 Ubuntu 22.04 or newer, with glibc
2.35+, OpenGL and X11 desktop libraries (XWayland on Wayland). A tray-enabled
desktop is recommended. This is not a static executable: other distributions
must provide compatible graphics libraries. ARM64 AppImages are not currently
published; use the server binaries below instead. Server/backend requirements
are separate from launcher requirements. Replace the AppImage manually to
update the launcher; there is no AppImage self-updater.
Download the binary for your architecture (amd64, arm64, etc.)
Make it executable:
chmod +x local-ai-*
Run LocalAI:
./local-ai-*
Run your first model
Starting the binary on its own gives you an empty server. To get a working chat right away, run LocalAI with a model name and it will download and serve it from the gallery:
./local-ai-* run qwen3-4b
Once it is ready, open the WebUI at http://localhost:8080 or send a request to the API:
For performance benchmarks with different backends like llama.cpp, visit this link.
Configuration
After installation, you can:
Access the WebUI at http://localhost:8080
Configure models in the models directory
Customize settings via environment variables or config files
Start LocalAI on demand with systemd
LocalAI accepts a single TCP listener passed through the systemd socket
activation protocol. This lets systemd listen on the public port and start
LocalAI only when the first client connects.
Create /etc/systemd/system/local-ai.socket:
[Unit]Description=LocalAI API socket[Socket]ListenStream=8080NoDelay=true[Install]WantedBy=sockets.target
Create the matching /etc/systemd/system/local-ai.service:
The first connection to port 8080 starts local-ai.service; systemd holds that
connection until LocalAI is ready to accept it. LOCALAI_ADDRESS and
--address are ignored while an inherited listener is present. LocalAI
rejects activation with multiple stream listeners so it cannot silently choose
the wrong endpoint.
For a Podman-managed container, configure Podman to preserve and pass the
systemd socket file descriptor into the container. The LocalAI process inside
the container consumes the same activation protocol.
Activation needs both LISTEN_PID and LISTEN_FDS. If only one of them is set,
LocalAI ignores them and binds --address as usual. A container engine started
from a socket-activated system unit can leak a bare LISTEN_PID into every
container it spawns, and that is not an activation attempt.
The install script, the macOS app and the latest container image give version 4.12.1. The add-ons, Office, Sandbox, Pages and Team in these docs need a newer build.
The easiest way to install LocalAI on macOS is using the DMG application.
Drag the LocalAI application to your Applications folder
Launch LocalAI from your Applications folder
First Launch
The app you installed is a small launcher that manages the LocalAI server for
you. On the first launch it offers to download and install the latest server
release; once that finishes, the server starts automatically and on every
following launch of the app.
The launcher lives in the menu bar (look for the LocalAI icon in the top
right of your screen) and does not open a window of its own. From the menu bar
icon you can start and stop the server, open the WebUI, check for updates, and
change settings, including turning off the automatic server start
(“Start LocalAI when the launcher opens” under Settings).
Once the server is running, the WebUI is available at
http://localhost:8080.
Verification
The LocalAI.dmg (and the app inside it) and the local-ai server binary are
signed with an Apple Developer ID and notarized by Apple, so they launch with no
quarantine prompt or workaround. To inspect the signature yourself:
Edit values.yaml before you install. The chart is maintained in the helm-charts repository. The chart repository is separate from the LocalAI release. Check its values.yaml for the image tag it uses.
Example manifests
You can also apply a plain deployment file from the examples repository:
LocalAI can be run on Nvidia ARM64 devices, such as the Jetson Nano, Jetson Xavier NX, Jetson AGX Orin, and Nvidia DGX Spark. The following instructions will guide you through building and using the LocalAI container for Nvidia ARM64 devices.
Platform Compatibility
CUDA 12 L4T images: Compatible with Nvidia AGX Orin and similar platforms (Jetson Nano, Jetson Xavier NX, Jetson AGX Xavier)
CUDA 13 L4T images: Compatible with Nvidia DGX Spark
Run the LocalAI container on Nvidia ARM64 devices using the following commands, where /data/models is the directory containing the models:
CUDA 12 (for AGX Orin and similar platforms)
docker run -e DEBUG=true -p 8080:8080 -v /data/models:/models -ti --restart=always --name local-ai --runtime nvidia --gpus all quay.io/go-skynet/local-ai:latest-nvidia-l4t-arm64
CUDA 13 (for DGX Spark)
docker run -e DEBUG=true -p 8080:8080 -v /data/models:/models -ti --restart=always --name local-ai --runtime nvidia --gpus all quay.io/go-skynet/local-ai:latest-nvidia-l4t-arm64-cuda-13
Note: /data/models is the directory containing the models. You can replace it with the directory containing your models.
GPU reporting in distributed mode
If you run a worker on a Jetson, DGX Spark (GB10), or Thor and the Nodes
page in the frontend shows the node as fully used, check two things:
NVIDIA_DRIVER_CAPABILITIES must include utility so nvidia-smi /
NVML work inside the container. With --gpus all alone (or
--runtime nvidia without extra flags) only compute is wired in on
some driver versions. Add -e NVIDIA_DRIVER_CAPABILITIES=compute,utility
to your docker run. For Docker Compose with driver: nvidia, use
capabilities: [gpu, compute, utility] on the device reservation.
Include compute for CUDA libraries such as libcuda.so.1; utility
alone only provides monitoring libraries and tools.
Pass --init to docker run (or init: true in compose) so the
container has a proper PID 1 reaper - otherwise short-lived child
processes like nvidia-smi can intermittently fail with
waitid: no child processes.
On unified-memory devices LocalAI auto-detects the SoC via
/sys/devices/soc0/{family,soc_id} and reports system RAM as VRAM, so
nvidia-smi is not strictly required for VRAM metrics. See
Distributed Mode → NVIDIA GPU support
for full context.