Desktop control panel and Ollama-compatible proxy for local llama.cpp servers.
llama.cpp Control Deck helps you run one or many local GGUF models without
turning every launch into a long shell command. It provides a Tkinter GUI,
multi-instance process management, GPU/device diagnostics, log viewing,
automatic runtime path detection, beginner-friendly setup, and an
Ollama-compatible proxy that forwards requests to the OpenAI-compatible API
exposed by llama-server.
Tkinter GUI + Ollama-compatible FastAPI proxy for managing one or many local
llama.cpp llama-server instances.
- GUI control for local models: start, stop, restart, status, uptime, health checks, and logs.
- Multi-instance mode for chat, embeddings, rerank, multimodal, and router profiles, each with its own model, port, and runtime settings.
- Ollama-compatible proxy for tools that expect the Ollama API.
- OpenAI-compatible workflow: copy URLs like
http://127.0.0.1:8081/v1. - Automatic detection of
python,llama-server, working directory, andLD_LIBRARY_PATH. - Automatic download/update flow for prebuilt
llama.cppllama-serverreleases from GitHub. - Beginner setup mode that creates a local
.venvand installs Python dependencies. - Interactive buttons for Python dependencies and system Tkinter packages.
- GPU/device diagnostics through
llama-server --list-devices. - CLI commands for headless diagnostics and generated command inspection.
Use Control Deck if you:
- run multiple local models at the same time, for example LLM + embeddings + rerank;
- want direct
llama.cppusage while keeping compatibility with Ollama clients; - frequently change models, context size, GPU layers, batch size, and ports;
- need a local OpenAI-compatible endpoint for Open WebUI, IDE tools, RAG apps, or your own scripts.
| Component | Minimum | Recommended |
|---|---|---|
| OS | Linux | Ubuntu 22.04/24.04 |
| Python | 3.10 | 3.11+ |
llama.cpp |
built llama-server |
CUDA build for NVIDIA GPU |
| RAM | 8 GB | 32 GB+ |
| GPU | optional | NVIDIA CUDA |
System packages:
python3python3-venvpython3-pippython3-tk/python3-tkinter/tk
Python dependencies:
psutilfastapiuvicornhttpx
Beginner-friendly path:
git clone https://github.com/deposist/llama.cpp-Control-Deck.git
cd llama.cpp-Control-Deck
./start_gui.sh --setup--setup creates a local .venv, installs Python dependencies, and starts the
GUI. If Tkinter is missing, install the system package first:
# Debian / Ubuntu
sudo apt install -y python3 python3-venv python3-pip python3-tkManual setup:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Debian / Ubuntu
sudo apt install -y python3-tk
./start_gui.shAfter the GUI opens, go to Server, click Auto-detect runtime, choose a
.gguf model, and click Start.
If llama-server is not built yet:
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# CUDA build for NVIDIA GPU
cmake -B build-cuda -DGGML_CUDA=ON
cmake --build build-cuda --config Release -j"$(nproc)"
# CPU-only build
# cmake -B build
# cmake --build build --config Release -j"$(nproc)"The binary is usually located at:
llama.cpp/build-cuda/bin/llama-server
./start_gui.shFor a clean first run:
./start_gui.sh --setupOr run the GUI module directly:
python3 llama_cpp_gui.pyUseful options:
python3 llama_cpp_gui.py --help
./start_gui.sh --setup
python3 llama_cpp_gui.py --geometry 1280x860
python3 llama_cpp_gui.py --skip-device-refresh- Open the Server tab.
- If you did not start with
--setup, click Beginner setup. - Click Auto-detect runtime.
- Select a model in Model .gguf.
- Check Host, Port, Context, and GPU layers.
- Click Save.
- Click Start.
- When the server is
running, click Copy OpenAI URL.
The URL will look like this:
http://127.0.0.1:8081/v1
Use it in Open WebUI, Continue, an OpenAI-compatible client, or a RAG app.
Use the Instances tab for multiple servers.
- Select an existing row or click Add.
- Set
Profile,Model .gguf,Port, andAlias. - Click Apply to selected.
- Click Start selected or Start enabled.
Typical layout:
| Instance | Profile | Port | Purpose |
|---|---|---|---|
| Chat | chat |
8081 |
conversational LLM |
| Embeddings | embeddings |
8082 |
RAG embeddings |
| Rerank | rerank |
8083 |
document reranking |
| Vision | multimodal |
8084 |
multimodal model with mmproj |
| Router | router |
8085 |
multi-model router |
Some clients only know how to talk to the Ollama API. The built-in proxy accepts
Ollama-style requests and forwards them to the OpenAI API exposed by
llama-server.
- Open the Ollama proxy tab.
- Leave Target OpenAI URL empty to use the active server, or set a specific instance URL.
- Click Start proxy.
- Click Copy Ollama URL.
Default proxy URL:
http://127.0.0.1:11435
Supported endpoints:
GET /GET /api/versionGET /api/tagsPOST /api/chatPOST /api/generatePOST /api/embeddingsPOST /api/embed
Control Deck can detect:
- Python runtime
llama-server- working directory
LD_LIBRARY_PATH- models directory
Environment variables override detection:
export LLAMA_CPP_PYTHON=/path/to/.venv/bin/python
export LLAMA_CPP_BINARY=/path/to/llama.cpp/build-cuda/bin/llama-server
export LLAMA_CPP_CWD=/path/to/llama.cpp/build-cuda/bin
export LLAMA_CPP_LIB_DIR=/path/to/llama.cpp/build-cuda/bin
export LLAMA_CPP_MODELS_DIR=/path/to/models
export LLAMA_CPP_SEARCH_ROOTS=/extra/search/root:/another/rootCLI:
python3 config.py --detect-runtime
python3 config.py --apply-runtime--detect-runtime only prints detected paths. --apply-runtime updates
config.json.
The Server → Runtime block includes release-management buttons:
- Check server version runs the selected
llama-server --version. - Check updates checks the latest
ggml-org/llama.cppGitHub release and compares it with the managed install when possible. - Download llama-server downloads the latest prebuilt archive, extracts it
under
runtime/llama.cpp/, and updates Runtime paths automatically.
Choose llama.cpp backend before downloading:
| Backend | Notes |
|---|---|
auto / cpu |
Most compatible prebuilt Linux option. |
vulkan |
GPU acceleration through Vulkan drivers. |
rocm |
AMD ROCm build, requires ROCm runtime. |
openvino |
Intel OpenVINO build. |
sycl-fp16 / sycl-fp32 |
SYCL builds for supported systems. |
Current upstream Linux releases may not include a CUDA prebuilt archive. For
CUDA, build llama.cpp yourself and use Auto-detect runtime or Browse.
The GUI is not required for diagnostics or headless use:
python3 llama_server_manager.py status
python3 llama_server_manager.py server-command
python3 llama_server_manager.py instance-command chat-8081
python3 llama_server_manager.py proxy-command
python3 llama_server_manager.py devicesYou can also start the proxy directly:
python3 ollama_proxy.py \
--host 127.0.0.1 \
--port 11435 \
--target-base-url http://127.0.0.1:8081/v1 \
--model local-llamaProfile: chat
Context: 8192
GPU layers: all
Split mode: none
Flash attention: auto
Profile: embeddings
Context: 8192
Batch: 8192
Micro-batch: 8192
GPU layers: all
Split mode: none
Extra args: --pooling cls
Main GPU: 0
Split mode: layer
Tensor split: 3,1
| File | Purpose |
|---|---|
llama_cpp_gui.py |
Tkinter GUI |
llama_server_manager.py |
process manager, state, health, CLI |
ollama_proxy.py |
FastAPI Ollama-compatible proxy |
config.py |
defaults, config merge, runtime detection |
llama_cpp_release.py |
GitHub release check/download/install helper |
start_gui.sh |
Linux launcher |
config.example.json |
example configuration |
requirements.txt |
runtime dependencies |
requirements-dev.txt |
test/lint dependencies |
tests/ |
smoke tests |
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
ruff check .
python3 -m pytest -q
python3 -m py_compile config.py llama_cpp_gui.py llama_server_manager.py ollama_proxy.pyBefore a pull request:
- update README when behavior changes;
- add tests for new logic;
- do not commit
config.json,logs/,runtime/, models, or API keys.
| Symptom | Likely cause | Fix |
|---|---|---|
ModuleNotFoundError: psutil |
Python dependencies are missing | pip install -r requirements.txt or Install Python libs |
No module named venv / .venv cannot be created |
system python3-venv is missing |
sudo apt install python3-venv python3-pip |
Tkinter is not available |
system Tkinter is missing | sudo apt install python3-tk or Install system libs |
llama-server not found |
wrong binary path | Auto-detect runtime or LLAMA_CPP_BINARY |
| downloaded server starts without GPU acceleration | CPU backend was selected or required driver is missing | choose vulkan/rocm backend or build CUDA manually |
| server exits immediately | wrong model, missing .so, not enough VRAM |
open Logs |
Port 8081 is busy |
another process uses the port | change the port or stop the process |
CUDA error: out of memory |
not enough VRAM | reduce Context, Batch, or GPU layers |
| proxy returns 502 | target llama-server is not running |
start the server first |
| GUI startup is slow | --list-devices takes time |
./start_gui.sh --skip-device-refresh |
By default, llama-server and the proxy are intended for trusted local
environments. Do not bind services to 0.0.0.0 on untrusted networks without a
firewall, VPN, reverse proxy authentication, or another access-control layer.
Do not publish API keys, private paths, or logs with sensitive data.
See SECURITY.md.
Issues and pull requests are welcome. Especially useful contributions:
- tests for different
llama.cppbuilds; - UX improvements that keep the interface simple;
- documentation for popular clients;
- reports about compatibility with new
llama-serverversions.
See CONTRIBUTING.md and CODE_OF_CONDUCT.md.
Tkinter GUI + Ollama-compatible FastAPI proxy для управления одним или
несколькими локальными llama.cpp llama-server instance.
- Управление локальными моделями через GUI: запуск, остановка, рестарт, статус, uptime, health-check и логи.
- Multi-instance режим: отдельные профили и порты для chat, embeddings, rerank, multimodal и router.
- Ollama-compatible proxy: клиенты, которые ждут Ollama API, могут работать с
чистым
llama.cpp. - OpenAI-compatible workflow: GUI копирует URL вида
http://127.0.0.1:8081/v1. - Автообнаружение
python,llama-server, working directory иLD_LIBRARY_PATH. - Автоматическое скачивание/обновление prebuilt
llama.cppllama-serverrelease с GitHub. - Beginner setup: создание локального
.venvи установка Python-зависимостей одной командой. - Интерактивные кнопки установки Python-зависимостей и системного Tkinter.
- Диагностика GPU через
llama-server --list-devices. - CLI для headless-сценариев и проверки generated commands.
Проект подойдёт, если вы:
- запускаете несколько локальных моделей одновременно, например LLM + embeddings + rerank;
- хотите заменить Ollama на прямой
llama.cpp, но оставить совместимость с Ollama-клиентами; - часто меняете модели, контекст, GPU layers, batch size и порты;
- хотите простой локальный OpenAI-compatible endpoint для Open WebUI, IDE, RAG-приложений или собственных скриптов.
| Компонент | Минимум | Рекомендуется |
|---|---|---|
| ОС | Linux | Ubuntu 22.04/24.04 |
| Python | 3.10 | 3.11+ |
llama.cpp |
собранный llama-server |
CUDA build для NVIDIA GPU |
| RAM | 8 GB | 32 GB+ |
| GPU | опционально | NVIDIA CUDA |
Системные пакеты:
python3python3-venvpython3-pippython3-tk/python3-tkinter/tk
Python-зависимости:
psutilfastapiuvicornhttpx
Самый простой вариант для новичков:
git clone https://github.com/deposist/llama.cpp-Control-Deck.git
cd llama.cpp-Control-Deck
./start_gui.sh --setup--setup создаёт локальное .venv, устанавливает Python-зависимости и запускает
GUI. Если Tkinter ещё не установлен, поставьте системный пакет:
# Debian / Ubuntu
sudo apt install -y python3 python3-venv python3-pip python3-tkРучной вариант:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Debian / Ubuntu
sudo apt install -y python3-tk
./start_gui.shЕсли GUI открылся, перейдите во вкладку Server, нажмите
Auto-detect runtime, выберите .gguf модель и нажмите Start.
Если llama-server ещё не собран:
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# CUDA build для NVIDIA GPU
cmake -B build-cuda -DGGML_CUDA=ON
cmake --build build-cuda --config Release -j"$(nproc)"
# CPU-only вариант
# cmake -B build
# cmake --build build --config Release -j"$(nproc)"После сборки бинарник обычно находится здесь:
llama.cpp/build-cuda/bin/llama-server
./start_gui.shДля первого запуска на чистой системе:
./start_gui.sh --setupили:
python3 llama_cpp_gui.pyПолезные опции:
python3 llama_cpp_gui.py --help
./start_gui.sh --setup
python3 llama_cpp_gui.py --geometry 1280x860
python3 llama_cpp_gui.py --skip-device-refresh- Откройте вкладку Server.
- Если запускали GUI не через
--setup, нажмите Beginner setup. - Нажмите Auto-detect runtime.
- В поле Model .gguf выберите модель.
- Проверьте Host, Port, Context, GPU layers.
- Нажмите Save.
- Нажмите Start.
- Когда сервер стал
running, нажмите Copy OpenAI URL.
URL будет выглядеть примерно так:
http://127.0.0.1:8081/v1
Его можно вставить в Open WebUI, Continue, собственный OpenAI-compatible клиент или RAG-приложение.
Для нескольких серверов используйте вкладку Instances.
- Выберите существующую строку или нажмите Add.
- Укажите
Profile,Model .gguf,Port,Alias. - Нажмите Apply to selected.
- Нажмите Start selected или Start enabled.
Типичный набор:
| Instance | Profile | Port | Назначение |
|---|---|---|---|
| Chat | chat |
8081 |
диалоговая модель |
| Embeddings | embeddings |
8082 |
RAG-векторизация |
| Rerank | rerank |
8083 |
переоценка документов |
| Vision | multimodal |
8084 |
multimodal модель с mmproj |
| Router | router |
8085 |
multi-model router |
Некоторые клиенты умеют подключаться только к Ollama API. Встроенный прокси
принимает Ollama-style запросы и отправляет их в OpenAI API llama-server.
- Откройте вкладку Ollama proxy.
- Оставьте Target OpenAI URL пустым, чтобы использовать активный сервер, или укажите конкретный URL instance.
- Нажмите Start proxy.
- Нажмите Copy Ollama URL.
По умолчанию прокси слушает:
http://127.0.0.1:11435
Поддерживаемые endpoints:
GET /GET /api/versionGET /api/tagsPOST /api/chatPOST /api/generatePOST /api/embeddingsPOST /api/embed
Control Deck умеет искать:
- Python runtime
llama-server- working directory
LD_LIBRARY_PATH- папку моделей
Приоритеты можно задать переменными окружения:
export LLAMA_CPP_PYTHON=/path/to/.venv/bin/python
export LLAMA_CPP_BINARY=/path/to/llama.cpp/build-cuda/bin/llama-server
export LLAMA_CPP_CWD=/path/to/llama.cpp/build-cuda/bin
export LLAMA_CPP_LIB_DIR=/path/to/llama.cpp/build-cuda/bin
export LLAMA_CPP_MODELS_DIR=/path/to/models
export LLAMA_CPP_SEARCH_ROOTS=/extra/search/root:/another/rootCLI:
python3 config.py --detect-runtime
python3 config.py --apply-runtime--detect-runtime только печатает найденные пути. --apply-runtime обновляет
config.json.
В блоке Server → Runtime есть кнопки управления release:
- Check server version запускает
llama-server --versionдля выбранного бинарника. - Check updates проверяет последний release
ggml-org/llama.cppна GitHub и сравнивает его с managed install, если он есть. - Download llama-server скачивает последний prebuilt archive, распаковывает
его в
runtime/llama.cpp/и автоматически прописывает Runtime paths.
Перед скачиванием выберите llama.cpp backend:
| Backend | Примечание |
|---|---|
auto / cpu |
Самый совместимый prebuilt Linux-вариант. |
vulkan |
GPU acceleration через Vulkan drivers. |
rocm |
AMD ROCm build, нужен ROCm runtime. |
openvino |
Intel OpenVINO build. |
sycl-fp16 / sycl-fp32 |
SYCL builds для поддерживаемых систем. |
В текущих upstream Linux releases может не быть CUDA prebuilt archive. Для CUDA
соберите llama.cpp вручную и используйте Auto-detect runtime или
Browse.
GUI не обязателен для диагностики и headless-сценариев:
python3 llama_server_manager.py status
python3 llama_server_manager.py server-command
python3 llama_server_manager.py instance-command chat-8081
python3 llama_server_manager.py proxy-command
python3 llama_server_manager.py devicesПрокси можно запустить отдельно:
python3 ollama_proxy.py \
--host 127.0.0.1 \
--port 11435 \
--target-base-url http://127.0.0.1:8081/v1 \
--model local-llamaProfile: chat
Context: 8192
GPU layers: all
Split mode: none
Flash attention: auto
Profile: embeddings
Context: 8192
Batch: 8192
Micro-batch: 8192
GPU layers: all
Split mode: none
Extra args: --pooling cls
Main GPU: 0
Split mode: layer
Tensor split: 3,1
| Файл | Назначение |
|---|---|
llama_cpp_gui.py |
Tkinter GUI |
llama_server_manager.py |
process manager, state, health, CLI |
ollama_proxy.py |
FastAPI Ollama-compatible proxy |
config.py |
defaults, config merge, runtime detection |
llama_cpp_release.py |
helper для проверки/скачивания/установки GitHub release |
start_gui.sh |
Linux launcher |
config.example.json |
пример конфигурации |
requirements.txt |
runtime dependencies |
requirements-dev.txt |
test/lint dependencies |
tests/ |
smoke tests |
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
ruff check .
python3 -m pytest -q
python3 -m py_compile config.py llama_cpp_gui.py llama_server_manager.py ollama_proxy.pyПеред pull request:
- обновите README, если меняется поведение;
- добавьте тесты для новой логики;
- не коммитьте
config.json,logs/,runtime/, модели и API-ключи.
| Симптом | Вероятная причина | Что сделать |
|---|---|---|
ModuleNotFoundError: psutil |
Python-зависимости не установлены | pip install -r requirements.txt или кнопка Install Python libs |
No module named venv / .venv не создаётся |
Нет системного python3-venv |
sudo apt install python3-venv python3-pip |
Tkinter is not available |
Нет системного Tkinter | sudo apt install python3-tk или кнопка Install system libs |
llama-server not found |
Неверный путь | Auto-detect runtime или LLAMA_CPP_BINARY |
| скачанный сервер работает без GPU acceleration | выбран CPU backend или нет нужного драйвера | выбрать vulkan/rocm backend или собрать CUDA вручную |
| Сервер сразу завершается | неверная модель, нет .so, не хватает VRAM |
открыть вкладку Logs |
Port 8081 is busy |
порт занят другим процессом | сменить порт или остановить процесс |
CUDA error: out of memory |
не хватает VRAM | уменьшить Context, Batch или GPU layers |
| Proxy возвращает 502 | целевой llama-server не запущен |
сначала запустить сервер |
| GUI долго стартует | --list-devices занимает время |
./start_gui.sh --skip-device-refresh |
По умолчанию llama-server и proxy рассчитаны на локальный trusted network.
Не открывайте 0.0.0.0 в недоверенной сети без firewall, VPN, reverse proxy
authentication или другого слоя контроля доступа. Не публикуйте API keys,
приватные пути и логи с чувствительными данными.
См. SECURITY.md.
Issues и pull requests приветствуются. Особенно полезны:
- тесты на разные сборки
llama.cpp; - улучшения UX без усложнения интерфейса;
- документация для популярных клиентов;
- отчёты о несовместимостях с новыми версиями
llama-server.