kossakovsky/selfhost-ai

★ 967⑂ 0

One-command installer for a self-hosted AI stack on your own server: n8n, Ollama, Open WebUI, OpenClaw, Dify, Flowise, Supabase, ComfyUI, Qdrant & 30+ tools.

About kossakovsky/selfhost-ai

kossakovsky/selfhost-ai is an open-source project on GitHub, mainly written in Shell. One-command installer for a self-hosted AI stack on your own server: n8n, Ollama, Open WebUI, OpenClaw, Dify, Flowise, Supabase, ComfyUI, Qdrant & 30+ tools. It currently holds 967 stars and 0 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

Git Homed tracks it on the Automation Agent Trending board and on the AI Automation Agent Trending list.

GitHub Repository Details

Repository kossakovsky/selfhost-ai · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

README

Selfhost AI — One-Command Self-Hosted AI Stack (n8n, Ollama, Open WebUI, OpenClaw)

GitHub stars Latest release License Ubuntu

Deploy 30+ open-source AI and automation tools on your own server with a single command. Selfhost AI is a Docker Compose installer for a private AI homelab: n8n workflow automation, local LLMs with Ollama, a ChatGPT-style chat in Open WebUI, AI agents (OpenClaw, Flowise, Keelflow, Dify, Letta), RAG engines and vector databases (Qdrant, Weaviate, LightRAG, RAGFlow), Supabase, ComfyUI and Grafana monitoring. An interactive wizard picks the services, generates every secret and puts them all behind Caddy with automatic HTTPS. A free, self-hosted alternative to Zapier, Make and ChatGPT.

Quick Start

You need a VPS with a public IP running Ubuntu 24.04 LTS (4 GB RAM / 2 CPU for n8n and monitoring; 20 GB RAM / 4 CPU / 60 GB disk for everything), a domain, and a wildcard DNS record A *.yourdomain.com -> YOUR_SERVER_IP. Then run:

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

The wizard does the rest; see Installation for what it asks.

Key Features

What's Included

Always installed: Caddy (reverse proxy and HTTPS), PostgreSQL, and Valkey (Redis-compatible). Everything below is optional and chosen in the wizard. "internal" means the service has no public URL and is reachable only from other containers.

AI Chat and Agents

| Service | What it does | URL | |---|---|---| | Open WebUI | ChatGPT-like interface for local and API LLMs and n8n agents | webui. | | OpenClaw | Personal AI agent with a web dashboard, a Telegram bot, and full server access (guide) | openclaw. | | Open Terminal | Linux shell sandbox for Open WebUI agents, with a separate account per user (guide) | internal | | Flowise | No-code / low-code AI agent builder (archived upstream) | flowise. | | Keelflow | No-code / low-code AI agent builder, continuation of Flowise; can take over existing Flowise data (guide) | keelflow. | | Dify | AI application platform with LLMOps, RAG pipelines and agent orchestration | dify. | | Letta | Agent server and SDK with persistent memory (formerly MemGPT) | letta. |

Workflow Automation

| Service | What it does | URL | |---|---|---| | n8n | Workflow automation with 400+ integrations and AI nodes, in queue mode with workers (guide) | n8n. | | n8n-MCP | MCP server that gives Claude Code, Cursor, Windsurf and VS Code n8n node docs and workflow tools | n8n-mcp. | | n8n Assistant sandbox | Code-execution sandbox for n8n's AI Assistant and Agents, isolated with Sysbox, or privileged if you accept that (guide) | internal | | Postiz | Social media scheduling and publishing | postiz. | | WAHA | WhatsApp HTTP API (WEBJS, NOWEB and GOWS engines) | waha. | | Python Runner | Runs your own Python code from python-runner/ (main.py, requirements.txt, installed on every start) on the internal network | internal |

Local LLMs and Image Generation

| Service | What it does | URL | |---|---|---| | Ollama | Run Llama, Qwen, Mistral, Gemma and other LLMs locally, on CPU, NVIDIA or AMD, with multi-GPU support (guide) | ollama. (Bearer token) | | ComfyUI | Node-based Stable Diffusion / Flux image generation UI (NVIDIA, AMD or CPU; pin GPUs with COMFYUI_GPU_DEVICES) | comfyui. | | InvokeAI | Stable Diffusion studio with a canvas, inpainting and a workflow editor; download a model in the Model Manager first | invokeai. |

RAG, Vector and Graph Databases

| Service | What it does | URL | |---|---|---| | Qdrant | High-performance vector database | qdrant. | | Weaviate | AI-native vector database with hybrid search | weaviate. | | Supabase | Postgres backend with auth, storage and pgvector (a Firebase alternative) | supabase. | | Neo4j | Graph database | neo4j. | | LightRAG | Graph-based RAG with automatic knowledge-graph extraction | lightrag. | | RAGFlow | RAG engine with deep document understanding and citations | ragflow. | | RAGApp | RAG assistant over your data, with a web UI and an HTTP API | ragapp. |

Documents, OCR, Web Scraping and Search

| Service | What it does | URL | |---|---|---| | Docling | Converts PDF, DOCX, PPTX, XLSX, HTML and images to Markdown/JSON, with OCR; web UI at /ui | docling. | | PaddleOCR | OCR API that runs on CPU | paddleocr. | | Gotenberg | Converts HTML, Markdown and Office documents to PDF or images | internal | | Crawl4AI | LLM-friendly web crawler and scraper | internal | | SearXNG | Private metasearch engine, also used as the web search for n8n's AI Assistant | searxng. | | LibreTranslate | Self-hosted translation API (50+ languages) | translate. |

Low-Code Apps and Data

| Service | What it does | URL | |---|---|---| | Appsmith | Low-code builder for internal tools and admin panels | appsmith. | | NocoDB | Open-source Airtable alternative | nocodb. |

Monitoring and Operations

| Service | What it does | URL | |---|---|---| | Grafana + Prometheus | System and n8n workflow dashboards and alerts (with cAdvisor and node-exporter) | grafana., prometheus. | | Langfuse | LLM observability, tracing and evals | langfuse. | | Uptime Kuma | Uptime monitoring with notifications | uptime-kuma. | | Portainer | Docker management UI (behind basic auth; create the Portainer admin on first login) | portainer. | | Databasus | Database backups and monitoring | databasus. | | Gost | Outbound HTTP/HTTPS proxy for AI services | internal | | Cloudflare Tunnel | Zero-trust access without open ports | — |

URLs are subdomains of your domain, for example n8n.yourdomain.com.

Installation

Prerequisites

1. A domain name with a wildcard A record, *.yourdomain.com, pointing to your server's IP, configured before installing. 2. A VPS with a public IP address. Home servers, shared hosting and localhost setups are not supported.

Run the installer over SSH:

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

The installer updates the system, configures the firewall and brute-force protection, installs Docker, generates .env with all secrets, and starts the services. It asks for:

1. Your domain (e.g. yourdomain.com). 2. Your email, used for service logins and for the Let's Encrypt certificate. 3. Which services to install, in a checklist wizard, plus follow-ups for some of them (hardware profile, Telegram bot token, Cloudflare token, ...). 4. An optional OpenAI API key (used by Supabase AI and Crawl4AI). 5. If n8n is selected: whether to import ~300 community n8n workflows (takes 20-30 minutes) and the number of n8n workers (each gets its own task runner).

At the end it prints the Welcome Page URL and login (save them). The Welcome dashboard at welcome.yourdomain.com lists every service's URL and credentials.

Upgrading

make update     # pull the latest installer, update images, restart
make git-pull   # for forks: merge from upstream instead of resetting

make update resets tracked files such as Caddyfile and docker-compose.yml, so put your customizations in the places that survive updates:

Commands

| Command | Description | |---|---| | make install | Full installation | | make update | Update the installer and all services | | make update-preview | Preview available updates (dry run) | | make pull | Pull the latest prebuilt images only (n8n and OpenClaw are rebuilt by make update); run make restart afterwards | | make git-pull | Update a fork by merging from upstream | | make status | Container status | | make logs / make logs s=n8n | Logs for all services or for one | | make monitor | Live CPU and memory usage | | make restart / make stop / make start | Control the whole stack | | make show-restarts | Restart count per container | | make doctor | Diagnostics: DNS, SSL, containers, disk, memory | | make import / make import n=10 | Import n8n workflows from the backup | | make openclaw a="..." | Run an OpenClaw CLI command | | make setup-tls | Use custom TLS certificates instead of Let's Encrypt | | make clean | Remove unused Docker images and containers (keeps data) |

Run make help for the full list.

Guides

Troubleshooting

  git config pull.rebase true && git fetch origin && git checkout main && git reset --hard "origin/main" && make update
  

Credits

Telemetry

The installer sends anonymous usage statistics through Scarf: event type, installer version, selected services, OS, a random installation ID, and the country Scarf derives from your IP. No personal data is collected. To opt out, set SCARF_ANALYTICS=false in .env.

License

Apache License 2.0. See LICENSE.

GitHub Stars & Activity

967Stars
0Forks
0Open issues
ShellLanguage

GitHub Popularity

GitHub stars967
Forks0
Open issues0
Primary languageShell
License-
Stars gained today0
Created-
Last pushed-

Trending History

Trending statusnot on today's boards

Related GitHub Projects

1

czlonkowski / n8n-skills

Shell★ 6,745⑂ 0
→
2

qdhenry / Claude-Command-Suite

Shell★ 1,360⑂ 0
→
3

n8n-io / n8n

TypeScript★ 212,778⑂ 0
→
4

langgenius / dify

Python★ 162,246⑂ 0
→
5

harry0703 / MoneyPrinterTurbo

Python★ 147,111⑂ 0
→
6

Panniantong / Agent-Reach

Python★ 116,468⑂ 0
→
7

D4Vinci / Scrapling

Python★ 107,481⑂ 0
→
8

microsoft / playwright

TypeScript★ 101,528⑂ 0
→

More Trending Repositories