av/harbor/run-llms

Claude Code and agent skill by av/harbor

Trust tier 2
  • community
  • ext:[{"type":"config","description":"Configuration overrides"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Comprehensive guide for setting up and running local LLMs using Harbor. Use when user wants to run LLMs locally, set up or troubleshoot Ollama, Open WebUI, llama.cpp, vLLM, SearXNG, Open Terminal, or similar local AI services. Covers full setup from Docker prerequisites through running models, per-service configuration, VRAM optimization, GPU troubleshooting, web search integration, code execution, profiles, tunnels, and advanced features. Includes decision trees for autonomous agent workflows and step-by-step troubleshooting playbooks.

Install

npx vskill@latest install av/harbor/run-llms

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as av/harbor/run-llms.

Run LLMs Locally with Harbor

Harbor is a containerized LLM toolkit. This skill enables autonomous setup, configuration, troubleshooting, and operation of local LLM infrastructure.

Agent Decision Trees

Use these decision trees to determine what action to take for common user requests.

User wants to run an LLM
1. Is Harbor installed?
→ NO: Install Harbor (see Initial Setup)
→ YES: Continue
2. Is Docker running?
→ Run: docker info
→ FAIL: Start Docker daemon, check installation
→ OK: Continue
3. Does the user have a specific model in mind?
→ YES: Determine format (Ollama tag, GGUF, HF safetensors)
→ Ollama tag (e.g. qwen3:4b): harbor pull <model> && harbor up
→ GGUF from HuggingFace: harbor pull <org/repo> && harbor up llamacpp
→ Safetensors/HF model: harbor vllm model <user/repo> && harbor up vllm
→ NO: Recommend a small default: harbor pull qwen3:4b && harbor up
4. Verify: harbor ps → confirm services healthy
5. Open UI: harbor open
User has GPU issues
1. Check NVIDIA drivers: nvidia-smi
→ FAIL: User needs to install NVIDIA drivers
→ OK: Continue
2. Check Container Toolkit: docker run --rm --gpus all nvidia/cuda:12.0-base nvidia-smi
→ FAIL: Install NVIDIA Container Toolkit, restart Docker
→ OK: Continue
3. Check service logs: harbor logs <service> # ⚠️ TAILS INDEFINITELY! (Agents: use `docker logs harbor.<service>` instead)
→ Look for: "CUDA error", "out of memory", "no GPU"
→ OOM: See "Model won't load / OOM" troubleshooting
→ No GPU detected: Check /etc/docker/daemon.json for nvidia runtime
4. Restart: sudo systemctl restart docker && harbor down && harbor up
User wants web search in chat
1. Start SearXNG: harbor up searxng
→ SearXNG auto-wires to Open WebUI when both run together
2. If WebUI was already running: harbor restart webui
3. Verify: harbor ps | grep searxng
4. Open UI: harbor open → Web search is now available in chat
User wants to change the model
1. Which backend is running?
→ harbor ps → identify running backend
2. Apply correct command:
→ Ollama: harbor pull <model> → select in UI dropdown
→ llama.cpp (single model): harbor llamacpp model <url> → harbor restart llamacpp
→ llama.cpp (router mode): harbor pull <org/repo> → model auto-discovered
→ vLLM: harbor vllm model <user/repo> → harbor restart vllm
3. Verify: docker logs harbor.<backend> → wait for ready message
User wants code execution in chat
1. Start Open Terminal: harbor up openterminal
→ Auto-wires to Open WebUI with shared bearer token
2. Verify: harbor ps | grep openterminal
3. Open UI: harbor open → Code blocks now have "Run" button
User wants to expose Harbor to network/internet
1. LAN access:
→ harbor url --lan webui → get LAN URL
→ harbor qr webui → QR code for mobile
2. Internet tunnel:
→ harbor tunnel webui → creates cloudflared tunnel
→ Share the generated URL
→ harbor tunnel down → when done

Initial Setup Workflow

  1. Check prerequisites
  2. Install Harbor CLI
  3. Start default services (Open WebUI + llama.cpp)
  4. Pull a model
  5. Verify the setup
Step 1: Check Prerequisites
bash
docker --version # Need Docker 20.10+
docker compose version # Need Docker Compose 2.23.1+
git --version

If Docker missing:

  • Linux: Install via official Docker repo
  • macOS: Install Docker Desktop
  • Windows: Install Docker Desktop + WSL2 (run all commands in WSL2)

If Docker Compose too old:

bash
# Ubuntu/Debian
sudo apt-get update && sudo apt-get install docker-compose-plugin

Linux permission fix (if docker commands fail):

bash
sudo usermod -aG docker $USER
# Log out and back in
Step 2: Install Harbor
bash
# Check if installed
harbor --version
# Install if missing
curl https://av.codes/get-harbor.sh | bash
source ~/.bashrc # or ~/.zshrc

Verify:

bash
harbor doctor # All checks should pass
Step 3: Start Harbor
bash
harbor up

First run downloads images (may take several minutes). Wait for healthy output:

✔ Container harbor.llamacpp Healthy
✔ Container harbor.webui Healthy

Open UI: harbor open

First launch requires creating a local admin account in the browser.

Step 4: Pull a Model
bash
# Recommended small model (GGUF, served by llama.cpp)
harbor pull unsloth/Qwen3.5-4B-GGUF:Q4_K_M
# Verify
harbor models ls
Step 5: Verify
  1. harbor open — opens UI in browser
  2. Select the pulled model from dropdown
  3. Send a test message

Core Commands

⚠️ CRITICAL WARNING FOR AI AGENTS: harbor logs tails indefinitely by default (passes -f). If you use this in your Bash tool, it will hang your execution until timeout. ALWAYS use `docker logs harbor.<service>` instead to read logs safely.
CommandPurpose
harbor up [services...]Start services (defaults + specified)
harbor up --no-defaults <svc>Start only specified services
harbor downStop all services
harbor psShow running services
harbor logs [service]⚠️ TAILS INDEFINITELY (HANGS AGENTS). Use docker logs instead
docker logs harbor.<service>Non-tailing logs (SAFE FOR AGENTS)
harbor open [service]Open in browser
harbor url [service]Print service URL
harbor url --lan <service>Print LAN URL
harbor url -i <service>Print Docker-internal URL
`harbor pull <model\service>`Download model or pull Docker image
harbor restart [service]Restart service(s)
harbor build <service>Build service image
harbor shell <service>Interactive shell in container
harbor exec <service> <cmd>Run command in container
harbor run <service> <cmd>One-off command in fresh container
harbor doctorSystem diagnostics
harbor fixfsFix file system ACLs for service volumes
harbor topGPU monitoring via nvtop
harbor sizeShow disk usage
harbor find <pattern>Find files in caches
harbor ejectExport standalone docker-compose config
harbor qr <service>Generate QR code for service URL

Model Management

Pull Sources
bash
# Ollama registry
harbor pull qwen3:4b
harbor pull llama3.2:3b
harbor pull gemma3:4b
# HuggingFace via Ollama (hf.co prefix)
harbor pull hf.co/bartowski/gemma-2-2b-it-GGUF:Q4_K_M
# HuggingFace for llama.cpp / vLLM (org/repo format)
harbor pull microsoft/Phi-3.5-mini-instruct-gguf
harbor pull microsoft/Phi-3.5-mini-instruct-gguf:Q4_K_M

Pull routing logic: specs with / are tried against HuggingFace first (HEAD request, 5s timeout), then fall through to Ollama if unreachable.

Cross-Source Model Management
bash
# List all models across Ollama, HuggingFace, and llama.cpp caches
harbor models ls
# List as JSON for scripting
harbor models ls --json
# Pull (auto-routes to HF or Ollama)
harbor models pull unsloth/Qwen3-4B-Instruct-GGUF
# Remove from all sources
harbor models rm qwen3.5:9b
harbor models rm unsloth/Qwen3-4B-Instruct-GGUF
HuggingFace Tools
bash
harbor hf scan-cache # Show cache status
harbor hf token <token> # Set token for gated models
harbor hf download user/repo # Download model
harbor hf find gguf gemma # Search HF in browser
harbor hf path user/repo # Find local cache path
harbor hf cache # Show cache location
harbor hf cache /path/to/cache # Change cache location

Service: Ollama

Handle: ollama | Port: 33821

Ergonomic wrapper around llama.cpp with model management, auto-pull, and OpenAI-compatible API.

Ollama CLI
bash
harbor ollama list # List cached models
harbor ollama ls # Alias for list
harbor ollama pull <model> # Pull model from registry
harbor ollama rm <model> # Remove model
harbor ollama run <model> # Interactive chat in terminal
harbor ollama cp <src> <dst> # Copy/alias a model
harbor ollama create -f <file> <name> # Create from Modelfile
harbor ollama show <model> --modelfile # Show model's Modelfile
harbor ollama ps # Show currently loaded models
harbor ollama ctx # Get current context length
harbor ollama ctx <n> # Set global context length
harbor ollama --help # Full CLI help
harbor ollama version # Show Ollama version
harbor ollama serve --help # Show supported env vars
Ollama Model Sources

From Ollama registry:

bash
harbor pull phi4
harbor pull qwen3:4b
harbor pull llama3.2:3b

From HuggingFace (hf.co prefix):

bash
harbor ollama pull hf.co/unsloth/DeepSeek-R1-Distill-Llama-8B-GGUF:Q8_0
# Copy to a shorter alias
harbor ollama cp hf.co/unsloth/DeepSeek-R1-Distill-Llama-8B-GGUF:Q8_0 r1-8b
Ollama Custom Modelfiles
bash
# Create a Modelfile
touch mymodel.Modelfile
# Edit with your settings (FROM, PARAMETER, SYSTEM, etc.)
# Import into Ollama (run from the directory containing the Modelfile)
harbor ollama create -f mymodel.Modelfile mymodel
# Source from existing model as template
harbor ollama show modelname:latest --modelfile > mymodel.Modelfile
# Test
harbor ollama run mymodel

Modelfiles in $(harbor home)/services/ollama/modelfiles/ can be referenced as:

bash
harbor ollama create -f /modelfiles/mymodel.Modelfile mymodel
Ollama Context Length
bash
# Get current global default
harbor ollama ctx
# Set global default (applies to all models)
harbor ollama ctx 8192
# Alternative via env
harbor env ollama OLLAMA_CONTEXT_LENGTH 8192

Note: harbor ollama ctx syncs to env, but not vice versa.

Ollama Configuration
bash
# See all config keys
harbor config ls | grep OLLAMA
# Set version (docker tag)
harbor config set ollama.version 0.3.7-rc5-rocm
# Set env overrides
harbor env ollama OLLAMA_DEBUG 1
harbor env ollama OLLAMA_NUM_PARALLEL 4
Config KeyDefaultPurpose
OLLAMA_CACHE~/.ollamaCache location (absolute or relative to harbor home)
OLLAMA_HOST_PORT33821Host port
OLLAMA_VERSIONlatestDocker image tag
OLLAMA_INTERNAL_URLhttp://ollama:11434URL given to connected services (change to use external Ollama)
OLLAMA_DEFAULT_MODELSmxbai-embed-large:latestComma-separated models to pull on startup
OLLAMA_CONTEXT_LENGTH4096Global default context length
Switching to External Ollama
bash
# Point all Harbor services to an external Ollama instance
# Use host.docker.internal or 172.17.0.1 instead of localhost
harbor config set ollama.internal_url http://172.17.0.1:11434
Ollama Troubleshooting

Model loading failures:

bash
docker logs harbor.ollama # Check for errors
# Common: insufficient VRAM → try smaller quant
harbor pull model:q4_k_m # Instead of larger quant

Slow first inference: Expected — model is loading into memory. Subsequent requests are fast.

Context length issues:

bash
harbor ollama ctx 4096 # Reduce if OOM
harbor ollama ctx 131072 # Increase for large-context models

Model not found after pull:

bash
harbor ollama list # Verify model exists
harbor restart ollama # Restart if needed

Service: llama.cpp

Handle: llamacpp | Port: 33831 | Default service (starts with harbor up)

LLM inference in C/C++. Bypasses Ollama's release cycle for access to latest models and features.

llama.cpp Modes

Single-model mode — set a specific model, server loads it on start:

bash
harbor llamacpp model https://huggingface.co/user/repo/blob/main/file.gguf
harbor up llamacpp

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
2,953
Repository forks
200
Repository npm downloads, 7 days
9
7-day trend score
51

Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 20 May 2026, 6 months ago.

Extension points

  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/av/harbor/run-llms/badge)](https://verified-skill.com/skills/av/harbor/run-llms)

Something wrong with this skill or its page? Tell us.