Skip to content

How-ToGPU

How to Run LocalAI on Your PC With Docker

How to run LocalAI, a self-hosted server for chat, image, speech and other open models with OpenAI- and Anthropic-style APIs, in Docker on a Windows PC: the CPU and NVIDIA CUDA 13/12 images, the web interface on port 8080, connecting other apps and keeping it secure.

By , Systems & Technical Editor

3 min read

How to Run LocalAI on Your PC With Docker

The commands and features below come from LocalAI's official GitHub README, read on 23 November 2026, which says the current install script and latest image give version 5.0.0. Commands may change in later versions.

Most local AI apps do one job: chat with a language model, or generate images. LocalAI aims to be one server for many kinds of model. Its README says it runs open models for "chat, images, speech and video" on your own machines, with an API that "speaks the OpenAI and Anthropic formats". It lists text, vision, speech to text, text to speech, images, video, music, embeddings and reranking, with more than 80 backends such as llama.cpp, vLLM and whisper.cpp. Each backend is its own image, pulled only when a model needs it.

That makes LocalAI interesting if you want a single always-on AI server on a home PC that other apps can talk to, rather than a desktop chat window. If you just want a simple chat app, tools like Ollama or LM Studio are easier starting points; our guide to running AI models locally with Ollama or LM Studio covers those.

Step 1: Pick your install route

The README lists three ways to install:

Route

Platforms the README names

What it does

Install script

Linux, and macOS on Apple Silicon

Downloads the release binary and checks it against release checksums; local-ai then starts the server

Container

Docker, podman and similar

Runs LocalAI as a container on port 8080

Desktop app

macOS and Linux (new in 5.0)

Installs, updates, starts and stops the server and shows the web interface in its own window

The script and desktop app aren't listed for Windows, so on a Windows PC the container route is the one to follow. That means installing Docker first. If you haven't set up Docker with GPU support on Windows before, our guides to setting up WSL2 for GPU local AI and running Ollama in Docker cover the groundwork.

Step 2: Start LocalAI in a container

The README's basic command, which runs on the CPU, is:

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

LocalAI says no GPU is needed, "though a GPU makes it faster". For an NVIDIA graphics card, the README lists separate GPU images. For current NVIDIA drivers with CUDA 13:

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

There's also a latest-gpu-nvidia-cuda-12 image for CUDA 12. If you're not sure which your driver supports, our guide on how to check your CUDA version on Windows shows where to look. The README also lists GPU images for AMD, Intel and Vulkan, plus NVIDIA Jetson boards, so check its GPU images section for the exact tag for your hardware.

To start the same container again later, the README says to use:

docker start -i local-ai

Step 3: Open the web interface and install a model

Once the container is running, open http://localhost:8080 in your browser. LocalAI's quick start says you install a model from there. The web interface also includes chats and saved agents that can use tools, MCP servers and files, and Projects that group chats, files and notes around one piece of work.

Model size is the main thing to watch. As an example, the README says a small Google Gemma 4 model aimed at CPUs is a 4.3GB download. Bigger models need much more disk space and memory; our guide to how much RAM you need for local AI explains the trade-offs.

Step 4: Point your other apps at it

Because LocalAI's API uses the OpenAI and Anthropic formats, apps and scripts written for those services can often be pointed at your own PC instead by changing the base URL to your LocalAI server. The approach is the same idea as our guide to using Ollama's OpenAI-compatible API.

A note on security

LocalAI's release notes in the README say version 4.9.0 added deny-by-default authentication. Even so, think before exposing port 8080 beyond your own PC: only open it to your home network if you need to, never forward it through your router to the internet, and keep the container up to date.

The bottom line

LocalAI is worth a look if you want one self-hosted server that can handle chat, images, speech and more through OpenAI- and Anthropic-style APIs, rather than a separate app for each job. On Windows, run it as a Docker container, use the CUDA 13 or CUDA 12 image for an NVIDIA card, then open `localhost:8080` to install models. If you only want to chat with a model, a simpler desktop app will be quicker to set up.

Sources

  1. 01LocalAI, GitHub repository and README

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

How to Set Up a UPS to Shut Down Your PC Automatically

How-To

How to Set Up a UPS to Shut Down Your PC Automatically

How to make a UPS shut your PC down automatically in a power cut: connect the UPS's USB data cable, install the maker's software (CyberPower PowerPanel Personal as the example), choose Keep Computer Running or Preserve Battery Power, pick shutdown or hibernation, then test it.

Marcus Thorne7 min

Clonezilla vs Rescuezilla: Which Free Disk Imaging Tool Should You Use?

Versus

Clonezilla vs Rescuezilla: Which Free Disk Imaging Tool Should You Use?

Clonezilla vs Rescuezilla: both are free bootable disk imaging and cloning tools that share an image format. Clonezilla adds network destinations, encryption, scripting and mass deployment; Rescuezilla offers a point-and-click desktop, image browsing and extra rescue tools.

Callum Reid6 min

ShareX vs Snipping Tool: Which Free Screenshot Tool Should You Use?

Versus

ShareX vs Snipping Tool: Which Free Screenshot Tool Should You Use?

ShareX vs Snipping Tool: Windows' built-in Snipping Tool is quick and now does local OCR and video snips, while free, open-source ShareX adds scrolling captures, richer annotation, automated after-capture tasks, uploads and many extra tools. Here's which suits you.

Callum Reid7 min

How to Set Up SillyTavern with a Local LLM Using KoboldCpp

How-To

How to Set Up SillyTavern with a Local LLM Using KoboldCpp

How to set up SillyTavern with a local LLM: installing it on Windows or Linux, loading a GGUF model in KoboldCpp, connecting the two, tuning GPU layers to fit your graphics card's VRAM, adjusting context settings and fixing common problems.

Marcus Thorne8 min