perplexity-cli
π§ A simple command-line client for the Perplexity API. Ask questions and receive answers directly from the terminal! πππ
π Self-hosted AI automation platform. Deploy n8n, Ollama, Flowise, RAG, Supabase & 30+ tools with one command. Auto HTβ¦
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!
This installer helps you create your own powerful, private AI workshop. Imagine having a suite of tools at your fingertips to:
This setup provides a comprehensive suite of cutting-edge services, all pre-configured to work together. Key advantages include:
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.β 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.
β 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.
β Open WebUI - A user-friendly, ChatGPT-like interface to interact privately with your AI models and n8n agents.
β 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 & monitoring with a self-hosted UI.
β Postiz - An open-source social media scheduling and publishing platform.
β Prometheus - An open-source monitoring and alerting toolkit to keep an eye on system health.
β Qdrant - A high-performance open-source vector store, specialized for AI. While Supabase also offers vector capabilities, Qdrant is included for its speed, making it ideal for demanding AI tasks.
β RAGApp - Open-source application to build Retrieval-Augmented Generation (RAG) assistants over your data. Provides a web UI for chat and an HTTP API for integration with your workflows.
β RAGFlow - An open-source RAG engine based on deep document understanding with Elasticsearch backend, providing truthful question-answering capabilities with well-founded citations from complex formatted data.
β SearXNG - A free, open-source internet metasearch engine. It aggregates results from numerous search services without tracking or profiling you, ensuring your privacy.
β Supabase - An open-source alternative to Firebase, providing database storage, user authentication, and more. It's a popular choice for AI applications.
β Uptime Kuma - Self-hosted uptime monitoring tool with notifications
β WAHA - WhatsApp HTTP API (REST API) that you can configure in a click! 3 engines: WEBJS (browser based), NOWEB (websocket nodejs), GOWS (websocket go).
β Weaviate - An open-source AI-native vector database with a focus on scalability and ease of use. It can be used for RAG, hybrid search, and more.
Get started quickly with a vast library of pre-built automations (optional import during setup)! This collection includes over 300 workflows covering a wide range of use cases:
π¦ What's inside?
yourdomain.com).yourdomain.com with your actual domain:
A *.yourdomain.com -> YOUR_SERVER_IPThe recommended way to install is using the provided main installation script.
Connect to your server via SSH.
Run the following command:
git clone https://github.com/kossakovsky/selfhost-ai && cd selfhost-ai && sudo bash ./scripts/install.sh
This single command automates the entire setup process, including:
.env) with necessary secrets and your domain settings.During the installation, the script will prompt you for:
yourdomain.com). This is the domain for which you've configured the wildcard DNS record.Upon successful completion, the script will display a summary report. This report contains the access URLs and credentials for the deployed services. Save this information in a safe place!
After successful installation, your services are up and running! Here's how to get started:
Access Your Services:
The installation script provided a summary report with all access URLs and credentials. Please refer to that report. The main services will be available at the following addresses (replace yourdomain.com with your actual domain):
n8n.yourdomain.com (Log in with the email address you provided during installation and the initial password from the summary report. You may be prompted to change this password on first login.)appsmith.yourdomain.com (Low-code app builder)comfyui.yourdomain.com (Node-based Stable Diffusion UI)databasus.yourdomain.comdify.yourdomain.com (AI application development platform with comprehensive LLMOps capabilities)docling.yourdomain.com (Universal document converter with REST API; web UI available at /ui)flowise.yourdomain.com (Log in with the email address you provided during installation and the initial password from the summary report.)grafana.yourdomain.cominvokeai.yourdomain.com (Stable Diffusion studio; download a model via the Model Manager on first visit)langfuse.yourdomain.comletta.yourdomain.comtranslate.yourdomain.comlightrag.yourdomain.comneo4j.yourdomain.comnocodb.yourdomain.comollama.yourdomain.com (Optional local-LLM API; every request must send Authorization: Bearer <OLLAMA_CADDY_API_TOKEN>. A leaked token grants full control β including pulling/deleting models β not just inference.)webui.yourdomain.compaddleocr.yourdomain.comportainer.yourdomain.com (Protected by Caddy basic auth; on first login, complete Portainer admin setup)postiz.yourdomain.comprometheus.yourdomain.com (Typically used as a data source for Grafana)qdrant.yourdomain.comragapp.yourdomain.comragflow.yourdomain.comsearxng.yourdomain.comsupabase.yourdomain.comuptime-kuma.yourdomain.com (Uptime monitoring dashboard)waha.yourdomain.com (WhatsApp HTTP API; engines: WEBJS, NOWEB, GOWS)weaviate.yourdomain.comCOMPOSE_PROFILES=...,python-runner.python-runner/. The default entry point is python-runner/main.py.python-runner/requirements.txt; they will be installed automatically on container start.Explore n8n:
Utilize Integrated AI Tools:
qdrant.yourdomain.com), Supabase, or Weaviate (weaviate.yourdomain.com) to store and retrieve information for your AI tasks like Retrieval Augmented Generation (RAG).flowise.yourdomain.com to create AI agents and applications. You can trigger Flowise agents from n8n or vice-versa.webui.yourdomain.com as a chat interface for your local AI models or n8n agents (e.g., using the n8n_pipe integration if configured).Check Monitoring (Optional):
grafana.yourdomain.com) to see dashboards monitoring your system's performance (data sourced from Prometheus).Cloudflare Tunnel provides zero-trust access to your services without exposing any ports on your server. All traffic is routed through Cloudflare's secure network, providing DDoS protection and hiding your server's IP address.
See the Cloudflare Tunnel guide: cloudflare-instructions.md
n8n v2.0 uses external task runners to execute JavaScript and Python code in Code nodes. This setup pre-configures the following libraries via n8n/Dockerfile.runner and n8n/n8n-task-runners.json:
JavaScript libraries:
cheerio: For parsing and manipulating HTML/XML (e.g., web scraping).axios: A promise-based HTTP client for making requests to external APIs.moment: For parsing, validating, manipulating, and displaying dates/times.lodash: A utility library for common programming tasks (arrays, objects, strings, etc.).The custom n8n Docker image (n8n/Dockerfile.n8n) includes the following system-level tools:
ffmpeg: A powerful multimedia framework for converting, recording, and streaming audio and video. Use it via the Execute Command node in n8n workflows for tasks like:
To update all components (n8n, Open WebUI, etc.) to their latest versions and incorporate the newest changes from this installer project:
make update
For forks: If you maintain a fork with custom changes and want to merge updates from upstream instead of resetting:
make git-pull
This script will:
make update resets tracked files (like Caddyfile and docker-compose.yml) to the latest version, so never edit them directly. Instead, use the dedicated extension points β the files you create there are gitignored, so they are preserved across updates:
site-*.conf file into caddy-addon/. It is imported automatically by the main Caddyfile. See caddy-addon/README.md for examples.docker-compose.override.yml in the project root. It is picked up automatically with the highest precedence..env are preserved by the updater (except GOST_NO_PROXY, which is regenerated so it always covers newly added services).If you need to free up disk space, you can run the Docker cleanup command. This removes all unused Docker containers, images, and volumes.
make clean
This can be useful for removing old images and freeing up space, but be aware that it will remove all unused data.
The project includes a Makefile for simplified command execution:
| Command | Description |
|---|---|
make install |
Full installation |
make update |
Update system and services (resets to origin) |
make update-preview |
Preview available updates without applying (dry-run) |
make git-pull |
Update for forks (merges from upstream/main) |
make clean |
Remove unused Docker resources |
| Command | Description |
|---|---|
make logs |
View logs (all services) |
make logs s=<service> |
View logs for specific service (e.g., make logs s=n8n) |
make status |
Show container status |
make monitor |
Live CPU/memory monitoring |
make restart |
Restart all services |
make stop |
Stop all services |
make start |
Start all services |
make show-restarts |
Show restart count per container |
make import |
Import n8n workflows from backup |
make import n=10 |
Import first N workflows only |
| Command | Description |
|---|---|
make doctor |
Run system diagnostics (checks DNS, SSL, containers, disk, memory) |
make setup-tls |
Configure custom TLS certificates for corporate/internal use |
Run make help for the full list of available commands.
Here are solutions to common issues you might encounter:
top/htop, free -h, and docker stats). If resources are saturated, upgrade the server or reduce the number of running services.n8n and verify it comes up. If it works in this minimal setup, enable other services gradually while monitoring the load.Symptom: The make update command fails, shows errors, or doesn't apply the latest changes.
Cause: This can happen if your local repository has diverged from the upstream, has uncommitted changes, or is in an inconsistent state.
Solution: Run the following command to force-sync your local installation with the latest version:
git config pull.rebase true && git fetch origin && git checkout main && git reset --hard "origin/main" && make update
Warning: This will discard any local changes you've made to the installer files. If you've customized any scripts or configurations, back them up first.
n8n offers excellent resources for getting started with its AI capabilities:
For more AI workflow ideas, visit the official n8n AI template gallery. From each workflow, select the Use workflow button to automatically import it into your n8n instance.
The installer creates a shared folder (by default, located in the same directory where you ran the installation script). This folder is accessible by the n8n application.
When you build automations in n8n that need to read or write files on your server, use the path /data/shared inside your n8n workflows. This path in n8n points to the shared folder on your server.
n8n components that interact with the server's filesystem:
Want to see who has contributed to this project? Check out the GitHub Contributors Page!
This installer collects anonymous usage statistics via Scarf to help improve the project. No personal data is collected.
Data collected:
To opt out, add to your .env file after installation:
SCARF_ANALYTICS=false
This project (originally created by the n8n team, with further development by contributors - see "Important Links") is licensed under the Apache License 2.0. See the LICENSE file for details.
more like this
π§ A simple command-line client for the Perplexity API. Ask questions and receive answers directly from the terminal! πππ
A to-do list that runs your Claude Code agents β capture anywhere, dispatch in parallel, review from your phone.
search projects, people, and tags