← Back to Leaderboard
Skossakovsky

kossakovsky/selfhost-ai

A Docker Compose stack for self-hosted AI chat, workflows, and document retrieval

Engineering Health (Methodology)
A · 86/100
Maintenance Activity
● Updated 1mo ago
Latest Release
v1.18.2
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance26/35
Fork Adoption20/25
Release Cadence20/20
License Clarity20/20
DockerSelf-HostedLocal AI
Total Stars
★ 967
24h Growth
+0
7d Growth
+2
Forks
238

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

kossakovsky/selfhost-ai Star History (2025-05-04 - 2026-12-03) ALL-TIME STAR HISTORY (2025-05 – 2026-12) +965 in 578d · avg +2/day 1k 511 0 2025-05-04: ★ 22025-06-14: ★ 982025-07-19: ★ 1212025-08-23: ★ 1712025-10-04: ★ 2722025-11-08: ★ 3422025-12-13: ★ 5182026-01-24: ★ 6502026-02-28: ★ 7212026-04-04: ★ 7752026-05-16: ★ 8452026-06-20: ★ 8782026-07-25: ★ 9002026-09-05: ★ 9222026-10-10: ★ 9422026-12-03: ★ 967 ★ 967 2025-05 2026-02 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Selfhost AI is a Docker Compose distribution, not a new chat application or inference engine. The interactive scripts/install.sh entry point selects services, generates secrets in .env, and starts the stack. Caddy, PostgreSQL, and Redis-compatible Valkey are always installed. Caddy terminates HTTPS and routes web traffic by subdomain, while tools such as Python Runner and Open Terminal run without a public URL. The Compose manifest declares named volumes for state such as n8n workflows, Ollama storage, and Qdrant data.

Open WebUI is the chat front end; Ollama runs local inference, and external model APIs are another option. n8n runs workflows in queue mode with a configurable worker count and one task runner per worker. Integrations can be added at several levels: the n8n MCP service exposes node documentation and workflow tools to compatible IDEs, Python Runner loads code and requirements from python-runner/, and Compose overrides or Caddy add-ons let operators extend the deployment without editing files that updates reset.

Key Capabilities & Differentiators

Ollama runs model families including Llama, Qwen, Mistral, and Gemma on CPU or on NVIDIA and AMD GPUs, with multi-GPU support. Open WebUI brings local inference, API models, and n8n agents into one chat interface. n8n supplies more than 400 integrations and an optional import of roughly 300 community workflows; Dify and Letta offer different approaches to agent orchestration and persistent memory. ComfyUI and InvokeAI provide separate image-generation interfaces.

For document workflows, Docling converts PDF, Office, HTML, and image inputs into Markdown or JSON with OCR support, and PaddleOCR offers a separate CPU-based OCR API. Qdrant and Weaviate provide vector and hybrid search options, LightRAG offers graph-based retrieval, and RAGFlow focuses on document understanding and citations. These are components to assemble, not a single preconfigured retrieval pipeline. Prometheus and Grafana cover system and n8n workflow monitoring, while optional Langfuse adds LLM tracing and evaluations.

Trade-offs & Limitations

Compared with ChatGPT, this stack puts the chat interface and local inference under the operator's control; it does not bundle a hosted model service. Compared with Zapier AI, n8n Cloud, or Dify Cloud, the advantage is running automation, model serving, and retrieval together. The cost is owning resource contention, upgrades, backups, and access control. On a modest server, start with chat and inference or with n8n, then add document processing and indexing once their resource requirements are clear. Use Keelflow rather than starting a new Flowise deployment if you want the continuation of the archived upstream project.

Caddy-managed TLS does not govern ports published directly by Docker. Review the Supabase port exceptions and inspect bindings with make doctor: published ports can bypass ufw. Review the trust boundary before enabling OpenClaw with full server access or selecting the privileged fallback for the n8n Assistant sandbox. External APIs still receive whatever inputs a workflow sends them. Apache-2.0 covers the installer, not the separate terms of bundled services or models.

Hardware & Deployment Guide

The supported quick-start path is a public-IP VPS running 64-bit Ubuntu 24.04 LTS, with a domain and wildcard A record configured before installation. Review the privileged installer before running it: it updates the host, configures the firewall and brute-force protection, installs Docker, and generates secrets for the selected services. The n8n, monitoring, Databasus, and Portainer profile lists 4 GB RAM, 2 CPU cores, and 40 GB disk; the full stack lists at least 20 GB RAM, 4 cores, and 60 GB disk. Size inference, OCR, and indexing separately for the chosen models and concurrency. Local inference avoids a hosted model API, but the standard install with image pulls and Let's Encrypt is not an air-gapped deployment.

Use make status, make logs, and make doctor to check service health. Preview updates with make update-preview, back up persistent data and .env, and keep local changes in docker-compose.override.yml or caddy-addon/site-*.conf because make update resets tracked files. Recent releases cover practical operating issues: v1.18.0 added checks for broadly published ports, v1.18.1 fixed a leftover-container check that misread Docker's lowercase missing-object error, and v1.18.2 addressed cAdvisor memory pressure and swapping on smaller hosts with many local images.

Service composition: Docker Compose keeps Caddy, PostgreSQL, and Valkey as the base and lets the installer enable optional services.
Chat and inference: Open WebUI works with local or API models; Ollama supports CPU, NVIDIA and AMD GPUs, including multi-GPU setups.
Workflow execution: n8n uses queue mode with a configurable worker count and a separate task runner per worker.
Retrieval stack: Docling handles PDF and Office document conversion with OCR; Qdrant, Weaviate, LightRAG, and RAGFlow cover different retrieval needs.
Operations: Prometheus and Grafana provide host and n8n workflow monitoring; make doctor checks DNS, certificates, containers, resources, and published ports.
Upgrade boundaries: Put Compose changes in docker-compose.override.yml and Caddy routes in caddy-addon/site-*.conf; make update resets tracked files.
Best For

Teams or individual operators with an Ubuntu VPS who want local-model chat, n8n automation, and a selectable retrieval stack on one server, and can own backups, upgrades, and access control.

Skip If

You only need a managed chat or automation service, require a supported localhost or home-server setup, or want the full stack to fit on a 16 GB host without making service and model trade-offs.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedLocal AI
git clone https://github.com/kossakovsky/selfhost-ai && cd selfhost-ai && sudo bash ./scripts/install.sh

Comparison vs. Top Chat UI & AI Apps Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
selfhost-ai ★967+2ShellApache-2.0A Docker Compose stack for self-hosted AI chat, workflows, and document retrieva
cherry-studio54.1k+204TypeScriptAGPL-3.0Electron AI workspace for comparing cloud and local models, running agents, and
ODS8k+88PythonApache-2.0A Docker Compose stack for private AI chat and inference on your own hardware
LocalAI50.7k+102GoMITA Go-based, self-hosted chat workspace and API server for local models

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/kossakovsky/selfhost-ai.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

kossakovsky/selfhost-ai Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about selfhost-ai

How do chat, inference, and automation connect?

Open WebUI can use Ollama for local inference, connect to API models, and expose n8n agents through its chat interface. Caddy routes browser traffic to enabled apps on service subdomains; internal tools such as Python Runner have no public URL. The optional n8n MCP server exposes n8n node documentation and workflow tools to compatible AI IDEs.

What can a 16 GB server run, and is a GPU required?

The baseline for n8n, monitoring, Databasus, and Portainer is 4 GB RAM, 2 CPU cores, and 40 GB disk. The full stack lists at least 20 GB RAM, 4 CPU cores, and 60 GB disk. Neither figure is a model-sizing rule: Ollama supports CPU and NVIDIA or AMD GPUs, and actual RAM, VRAM, and disk needs depend on the selected models, concurrent workloads, and enabled services. On a 16 GB host, treat this as a selective deployment, not an all-services install.

Does Apache-2.0 cover commercial use of the whole stack?

Selfhost AI's installer is Apache-2.0. That does not relicense bundled applications, downloaded models, or third-party API services. Review each applicable license or service term before commercial redistribution or providing hosted access. The installer also sends usage telemetry by default; set SCARF_ANALYTICS=false in .env if your deployment requires opting out.

When should I choose this over standalone Open WebUI or a managed platform?

If you only need local chat, Open WebUI and Ollama by themselves are a smaller stack. If managed workflows are the priority, n8n Cloud or Zapier AI avoids running the queue and its workers yourself; Dify Cloud is the closer comparison for managed AI application and RAG development. Selfhost AI is a better fit when you need several of those capabilities on one server and are prepared to operate them.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining kossakovsky/selfhost-ai? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature kossakovsky/selfhost-ai on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare