Skip to content

AI Assistant

X4Applegate edited this page Sep 10, 2026 · 1 revision

AI Assistant

An opt-in floating chat button that knows the whole CaddyUI surface (every page, Settings field and proxy-host section), answers Caddy / TLS / DNS questions, writes production-grade Caddyfile snippets, and can create resources for you through tool calling. It is off until you pick a backend.

Pick a backend

Settings → AI assistant:

Backend Best for You need
Ollama (local) Fully offline, on your own GPU An Ollama instance reachable from CaddyUI; qwen2.5:14b, qwen2.5-coder:14b, gemma2:9b, llama3.1:8b work well
Ollama Cloud Hosted MoE models too big for a home GPU API key from ollama.com/settings/keys; e.g. qwen3-coder:480b-cloud, gpt-oss:120b
Anthropic Claude Strongest reasoning and Caddy knowledge API key from console.anthropic.com; pick the model in the form
OpenAI-compatible OpenAI, OpenRouter, Groq, Together, self-hosted vLLM, LM Studio Base URL, API key, model name

Switching providers keeps the other providers' credentials, so you can flip back and forth. Saved keys are never shown again; a •••••••• placeholder means one is stored.

What you can ask

  • Where is… questions: "How do I strip the X-Powered-By header globally?" → Settings → General → Globally stripped response headers. "Where do I configure SSE flushing?" → proxy host → Streaming → Flush immediately.
  • Caddyfile help: the default system prompt steers the model toward complete snippets (encode zstd gzip, path blocking, security headers, the X-Forwarded-* trio). Ask for "just the basics" to get a minimal one.
  • Conversation memory across turns and Markdown rendering, whichever backend you use.

Auto-fill with tool calling

Describe what you want:

"Set up nextcloud at cloud.example.com pointing to nextcloud:80 with auto-SSL"

The assistant emits create_proxy_host(domains="cloud.example.com", forward_host="nextcloud", forward_port=80, ssl_enabled=true, ssl_forced=true) and the chat panel shows a confirmation card with the exact arguments. Click Apply and CaddyUI creates the resource, syncs Caddy and writes an ai_tool_call Activity-log entry so admins can audit what the AI did.

Tools available: create_proxy_host(domains, forward_scheme, forward_host, forward_port, ssl_enabled, ssl_forced) and create_redirection(domains, forward_scheme, forward_domain, forward_http_code, preserve_path). Models with native tool support (Claude, GPT-4 class, qwen2.5+, llama3.1+, gemma2) use them; older or smaller models just chat.

Custom system prompt

Paste your own steering text into Settings → AI assistant → Custom system prompt for a different persona, in-house naming conventions or a terser voice. Blank uses the built-in prompt with the full CaddyUI knowledge map.

Privacy

API keys live in CaddyUI's database. With local Ollama the conversation never leaves your machine; cloud backends receive the conversation under their own terms. The assistant never sees your database, only what you type and the app map in its prompt.

Community integrations

CaddyUI-MCP is a community-maintained MCP server that wraps the REST API for agent-driven automation. Use a dedicated CaddyUI user and the narrowest token scope that fits.

Clone this wiki locally