Version: v2.2
A lightweight, single-file Web UI manager for Lemonade Server.
This tool provides a clean interface to download, load, unload, delete, and configure models running on your local Lemonade instance. It is designed to run alongside the Lemonade server and persists configuration preferences directly to your Lemonade recipe path.
(Note: UI may vary slightly in newer versions)
- Model Management: View all available models, their running status, and recipe details.
- Pull / Download Models: dedicated interface to pull new models directly from HuggingFace (via Lemonade) with real-time streaming progress logs.
- Load/Unload Controls: Quickly start or stop models. Supports custom backend overrides (e.g., swapping
vulkanvscpuon the fly). - Delete Models: Remove model files from disk directly from the UI.
- Persistent Configuration: Save default context sizes (
ctx_size),llamacpp_args, and backend preferences torecipe_options.json. - Hiding Models: "Disable" models to hide them from the main view without deleting the files (stored locally in
manager_prefs.json). - Authentication Support: Optional Bearer token support (
LEMONADE_KEY) for securing connections to the Lemonade Server. - Responsive UI: Dark-mode enabled, lightweight HTML/CSS interface with zero external frontend dependencies.
- Python 3.8+
- A running instance of Lemonade Server (reachable via HTTP).
- Clone or download the
lemonade_manager.pyandrequirements.txtfile to your desired directory (e.g.,/opt/lemonade-manager). - Create a virtual environment to keep dependencies isolated:
python3 -m venv venv
- Activate the environment:
source venv/bin/activate - Install dependencies:
pip install -r requirements.txt
Manual Start
Ensure your virtual environment is active, then run:
python lemonade_manager.pyBy default, the UI will be accessible at http://localhost:9000.
Environment Variables
You can override defaults by setting environment variables before running the script:
| Variable | Default | Description |
|---|---|---|
| LEMONADE_BASE | http://localhost:8000 | Base URL of the Lemonade Server API. |
| LEMONADE_KEY | (empty) | API Key (Bearer Token) if your Lemonade Server requires auth. |
| MANAGER_HOST | 0.0.0.0 | Interface to bind the Manager UI to. |
| MANAGER_PORT | 9000 | Port to run this Web UI on. |
| RECIPE_FILE | ~/.cache/lemonade/recipe_options.json | Path to the shared Lemonade server config file. |
| PREFS_FILE | manager_prefs.json | Path to store local UI preferences (hidden models list). |
| TIMEOUT_LOAD | 120.0 | Timeout (seconds) for loading models. |
| TIMEOUT_PULL | 3600.0 | Timeout (seconds) for downloading large models. |
| TIMEOUT_LIGHT | 10.0 | Timeout (seconds) for light ops (stats, health checks). |
Pulling New Models
The Manager includes a "Pull New Model" section at the bottom of the UI.
- Model Name: The identifier for the model (e.g., user.mistral-7b).
- Checkpoint: The HuggingFace ID (e.g., unsloth/Phi-4-mini-instruct-GGUF:Q4_K_M).
- Recipe: The backend recipe to use (usually llamacpp).
- Multimodal: Optional path to an mmproj file if required. Note: The download process streams logs to the browser window. Do not close the tab until the download is complete.
Running as a System Service (Systemd)
For a persistent setup, use systemd to auto-start the manager.
- Create the service file:
sudo nano /etc/systemd/system/lemonade-manager.service- Paste the following configuration: Replace /opt/lemonade-manager with your actual installation path and your_username with your Linux user.
[Unit]
Description=Lemonade Manager Web UI
After=network.target
[Service]
Type=simple
User=your_username
Group=your_username
# Set the working directory to where the script is located
WorkingDirectory=/opt/lemonade-manager
# Use the python executable INSIDE the venv
ExecStart=/opt/lemonade-manager/venv/bin/python lemonade_manager.py
# Restart automatically if it crashes
Restart=on-failure
RestartSec=5
# Environment Overrides
Environment=LEMONADE_BASE=http://localhost:8000
Environment=MANAGER_PORT=9000
# Environment=LEMONADE_KEY=your_secret_key
# Environment=TIMEOUT_PULL=3600
[Install]
WantedBy=multi-user.target- Enable and Start:
sudo systemctl daemon-reload
sudo systemctl enable lemonade-manager
sudo systemctl start lemonade-manager- Check Status:
sudo systemctl status lemonade-managerMIT