selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
llama-swap logo

Self-host llama-swap

v270

Run and hot-swap multiple local AI models locally

ReleaseOpen SourceMIT
docker run -it --rm --runtime nvidia -p 9292:8080 -v /path/to/models:/models -v /path/to/custom/config.yaml:/etc/llama-swap/config/config.yaml ghcr.io/mostlygeek/llama-swap:unified-cuda13
Updated3 days ago
LanguageGo
Setup difficultyModerate
Stars
6 205
Port
8080 (Main HTTP listening port)
Docker
ghcr.io/mostlygeek/llama-swap

What is llama-swap?

A lightweight Go binary that manages multiple AI inference servers and switches between them based on incoming API requests. Users can run various backends like llama.cpp, vllm, stable-diffusion.cpp, audio.cpp, and ComfyUI simultaneously. The software provides a web interface for testing models, viewing token usage metrics, inspecting requests and responses, managing model loading/unloading, and monitoring logs in real-time. Configuration is done via a single YAML file that specifies commands for each model backend.

Should you self-host llama-swap?

llama-swap scores 73/100 on selfhost.directory (how scoring works) and ranks #2 of 7 in AI Workflows. It has 6 205 GitHub stars, +384 in the last 30 days.

It shipped 53 stable releases in the past year. The latest, v270, came out on 5 November 2026. New versions land roughly every 3 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is dify (90/100, 160 634 stars). It scores higher overall, so compare the two before you pick. See llama-swap vs dify side by side.

llama-swap README

llama-swap header image GitHub Downloads (all assets, all releases) GitHub Actions Workflow Status GitHub Repo stars

llama-swap

Run multiple generative AI models on your machine and hot-swap between them on demand. llama-swap works with any OpenAI and Anthropic API compatible server and is used by thousands of people to power their local AI workflows.

Built in Go for performance and simplicity, llama-swap has zero dependencies and is incredibly easy to set up. Get started in minutes - just one binary and one configuration file.

Tip

Got questions about configuring llama-swap? Try out the Chat agent on llama-swap.ai. It runs entirely in your browser and is powered by LFM3-1.7B fine tuned on the docs.

How to install llama-swap

Install llama-swap with Docker

Environment variables
LLAMA_SWAP_CONFIG, LLAMA_SWAP_CONFIG_DIR, LLAMA_SWAP_LISTEN, LLAMA_SWAP_TLS_CERT_FILE, LLAMA_SWAP_TLS_KEY_FILE, LLAMA_SWAP_LISTEN_TAILCAT, LLAMA_SWAP_WATCH_CONFIG
$ docker pull ghcr.io/mostlygeek/llama-swap:unified-cuda13
$ docker run -it --rm --runtime nvidia -p 9292:8080 \
 -v /path/to/models:/models \
 -v /path/to/custom/config.yaml:/etc/llama-swap/config/config.yaml \
 ghcr.io/mostlygeek/llama-swap:unified-cuda13

Three unified images available: unified-cuda13 (NVIDIA Ampere+), unified-cuda (NVIDIA Pascal-Ada), unified-vulkan (AMD/Vulkan)

llama-swap releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

Models for llama-swap

Open-weight models you can plug into llama-swap, most popular first.

openai logo Chat20.9BA4.2BCommercial OK≈13 GB↓ 5.9M
meta-llama logo Chat8BConditions≈6.3 GB↓ 4.3M
Qwen logo Chat8.2BCommercial OK≈6.5 GB↓ 7M
openai logo Chat117BA5.8BCommercial OK≈70 GB↓ 2.4M
zai-org logo
GLM-5.3zai-org
Chat753BA41.8BCheck licence≈476 GB↓ 2.1M
Qwen logo Chat752MCommercial OK≈1.8 GB↓ 21.4M
Qwen logo Chat7.6BCommercial OK≈5.5 GB↓ 6.2M
meta-llama logo Chat3.2BConditions≈3.3 GB↓ 914.1K

Browse all 1 428 models →

More in AI Workflows

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…