selfhost-ai is a free, open source machine learning infrastructure project written in Shell and released under Apache-2.0. It has 933 GitHub stars, 235 forks and 0 open issues, and was last pushed 6 days ago. On this registry it ranks #68 of 80 tracked projects in Machine Learning Infrastructure, with 5 head-to-head comparisons available.

Selfhost AI β€” Self-Hosted AI Automation Platform

GitHub stars License Docker Ubuntu n8n

Deploy 30+ AI and automation tools with a single command. This open-source Docker Compose template creates a complete self-hosted environment with n8n (workflow automation), Flowise (AI agents), Ollama (local LLMs), vector databases (Qdrant, Weaviate), RAG engines, Supabase, monitoring stack, and more β€” all pre-configured behind Caddy reverse proxy with automatic HTTPS. Plus, optionally import 300+ community workflows during setup!

Table of Contents

Key Features

  • Private AI Homelab β€” Run LLMs locally with Ollama, keep your data on your own servers
  • ChatGPT Alternative β€” Open WebUI provides a familiar chat interface for local AI models
  • Workflow Automation β€” n8n with 400+ integrations, scalable queue-based architecture
  • AI Agents & RAG β€” Flowise, Dify, LangChain, vector databases (Qdrant, Weaviate)
  • One Command Install β€” Interactive wizard, automatic secrets, zero manual configuration
  • Auto HTTPS β€” Caddy reverse proxy with automatic Let's Encrypt certificates
  • Built-in Monitoring β€” Grafana + Prometheus stack included, with an n8n dashboard that tracks workflow executions (outcomes, per-workflow volume, time since last success) and ready-made alert rules for failed or stalled workflows
  • Production Ready β€” Scalable workers, health checks, proper service dependencies
  • Free & Open Source β€” No vendor lock-in, Apache 2.0 license

Why This Setup?

This installer helps you create your own powerful, private AI workshop. Imagine having a suite of tools at your fingertips to:

  • Automate repetitive tasks.
  • Build smart assistants tailored to your needs.
  • Analyze information and gain insights.
  • Generate creative content.

This setup provides a comprehensive suite of cutting-edge services, all pre-configured to work together. Key advantages include:

  • Rich Toolset: Get a curated collection of powerful open-source tools for AI development, automation, and monitoring, all in one place.
  • Scalable n8n Performance: n8n runs in queue mode by default, leveraging Redis for task management and Postgres for data storage. You can dynamically specify the number of n8n workers and task runners during installation, allowing for robust parallel processing of your workflows to handle demanding loads.
  • Full Control: All of this is hosted by you, giving you full control over your data, operations, and how resources are allocated.

What's Included

βœ… Caddy, Postgres, and Redis - Core services for web proxy, database, and caching, which are always included.

The installer also makes the following powerful open-source tools available for you to select and deploy via an interactive wizard during setup:

βœ… Appsmith - An open-source low-code platform for building internal tools, dashboards, and admin panels with a drag-and-drop UI builder.

βœ… n8n - A low-code platform with over 400 integrations and advanced AI components to automate workflows.

βœ… n8n-MCP - A Model Context Protocol server that gives AI coding assistants (Claude Code, Cursor, Windsurf, VS Code Copilot) indexed access to every n8n node's documentation, property schemas and thousands of workflow templates - and, once you add an n8n API key, the ability to create and update workflows in your n8n instance straight from your IDE.

βœ… n8n Assistant sandbox - Code-execution sandbox for n8n's built-in AI Assistant and the Agents preview (n8n's own sandbox service, Docker-in-Docker isolated with Sysbox; internal only, see below).

βœ… ComfyUI - A powerful, node-based UI for Stable Diffusion workflows. Build and run image-generation pipelines visually, with support for custom nodes and extensions.

βœ… Crawl4ai - A flexible web crawler designed for AI, enabling you to extract data from websites for your projects.

βœ… Docling - Universal document converter that transforms PDF, DOCX, PPTX, XLSX, HTML, and images into clean Markdown or JSON. Features advanced PDF parsing, OCR support, and a REST API with optional web UI. Perfect for document processing in n8n workflows.

βœ… Dify - An open-source AI application development platform that provides comprehensive LLMOps capabilities, including workflow management, prompt engineering, RAG pipelines, and AI agent orchestration. Perfect for building production-ready AI applications.

βœ… Flowise - A no-code/low-code AI agent builder that complements n8n perfectly, allowing you to create sophisticated AI applications with ease.

βœ… Gost - Versatile HTTP/HTTPS proxy for routing AI service outbound traffic through a central proxy point

βœ… Gotenberg - A stateless API for converting HTML, Markdown, Word, Excel, and other documents to PDF, PNG, or JPEG. Available only within the Docker network for internal use by n8n workflows and other services.

βœ… Grafana - An open-source platform for visualizing monitoring data, helping you understand system performance at a glance.

βœ… InvokeAI - A professional creative engine for Stable Diffusion with a polished web UI, node-based workflow editor, inpainting/outpainting, and a REST API. Choose NVIDIA, AMD, or CPU hardware during install; models and outputs are stored in ./invokeai on the host.

βœ… Langfuse - An open-source platform to help you observe and understand how your AI agents are performing, making it easier to debug and improve them.

βœ… Letta - An open-source agent server and SDK that can be connected to various LLM API backends (OpenAI, Anthropic, Ollama, etc.), enabling you to build and manage AI agents.

βœ… LightRAG - A simple and fast graph-based Retrieval-Augmented Generation system with automatic knowledge graph extraction, dual-level retrieval mechanisms, and incremental updates. Supports multiple storage backends (PostgreSQL, Neo4j, JSON) and embedding models.

βœ… LibreTranslate - Self-hosted translation API (50+ languages).

βœ… Neo4j - A graph database management system that allows you to model, store, and query data as a network of nodes and relationships.

βœ… NocoDB - An open source Airtable alternative that turns any database into a smart spreadsheet with a no-code interface for building collaborative apps.

βœ… Ollama - Run Llama 3, Mistral, Gemma, and other large language models locally. Optionally expose its API externally through Caddy under OLLAMA_HOSTNAME, protected by a generated Bearer token. On multi-GPU hosts you can run several instances (OLLAMA_INSTANCE_COUNT) to dedicate a GPU per model.

βœ… Open WebUI - A user-friendly, ChatGPT-like interface to interact privately with your AI models and n8n agents.

βœ… Open Terminal - Execution sandbox for Open WebUI agents: a real Linux shell with a filesystem, package installs, local services and Jupyter, a separate Linux account per user (internal only, see below).

βœ… PaddleOCR - A CPU-ready OCR API powered by PaddleX Basic Serving.

βœ… Portainer - A lightweight, secure web UI to manage your Docker environment (containers, images, volumes, networks) with ease.

βœ… Databasus - Database backups & monit

readme truncated β€” read the full docs on github

Frequently asked questions

Is selfhost-ai free to use?

selfhost-ai is open source under the Apache-2.0 licence. There is no licence fee and no seat count β€” you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does selfhost-ai do?

πŸš€ Self-hosted AI automation platform. Deploy n8n, Ollama, Flowise, RAG, Supabase & 30+ tools with one command. Auto HTTPS. Free Zapier/Make alternative.

What is selfhost-ai written in?

selfhost-ai is primarily written in Shell. Its source is publicly available at https://github.com/kossakovsky/selfhost-ai, and it has 933 GitHub stars.