self-hosted-ai-starter-kit README

The project's README from github.com/n8n-io/self-hosted-ai-starter-kit. As one markdown file: README.md.

Self-hosted AI starter kit

Self-hosted AI Starter Kit is an open-source Docker Compose template designed to swiftly initialize a comprehensive local AI and low-code development environment.

n8n.io - Screenshot

Curated by https://github.com/n8n-io, it combines the self-hosted n8n platform with a curated list of compatible AI products and components to quickly get started with building self-hosted AI workflows.

[!TIP] Read the announcement

What’s included

✅ Self-hosted n8n - Low-code platform with over 400 integrations and advanced AI components

✅ Ollama - Cross-platform LLM platform to install and run the latest local LLMs

✅ Qdrant - Open-source, high performance vector store with an comprehensive API

✅ PostgreSQL - Workhorse of the Data Engineering world, handles large amounts of data safely.

What you can build

⭐️ AI Agents for scheduling appointments

⭐️ Summarize Company PDFs securely without data leaks

⭐️ Smarter Slack Bots for enhanced company communications and IT operations

⭐️ Private Financial Document Analysis at minimal cost

Installation

Cloning the Repository

git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit
cp .env.example .env # you should update secrets and passwords inside

Running n8n using Docker Compose

For Nvidia GPU users

git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit
cp .env.example .env # you should update secrets and passwords inside
docker compose --profile gpu-nvidia up

[!NOTE] If you have not used your Nvidia GPU with Docker before, please follow the Ollama Docker instructions.

For AMD GPU users on Linux

git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit
cp .env.example .env # you should update secrets and passwords inside
docker compose --profile gpu-amd up

For Mac / Apple Silicon users

If you’re using a Mac with an M1 or newer processor, you can't expose your GPU to the Docker instance, unfortunately. There are two options in this case:

  1. Run the starter kit fully on CPU, like in the section "For everyone else" below
  2. Run Ollama on your Mac for faster inference, and connect to that from the n8n instance

If you want to run Ollama on your mac, check the Ollama homepage for installation instructions, and run the starter kit as follows:

git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit
cp .env.example .env # you should update secrets and passwords inside
docker compose up
For Mac users running OLLAMA locally

If you're running OLLAMA locally on your Mac (not in Docker), you need to modify the OLLAMA_HOST environment variable

  1. Set OLLAMA_HOST to host.docker.internal:11434 in your .env file.

  2. Additionally, after you see "Editor is now accessible via: http://localhost:5678/":

    1. Head to http://localhost:5678/home/credentials
    2. Click on "Local Ollama service"
    3. Change the base URL to "http://host.docker.internal:11434/"

For everyone else

git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit
cp .env.example .env # you should update secrets and passwords inside
docker compose --profile cpu up

⚡️ Quick start and usage

The core of the Self-hosted AI Starter Kit is a Docker Compose file, pre-configured with network and storage settings, minimizing the need for additional installations. After completing the installation steps above, simply follow the steps below to get started.

  1. Open http://localhost:5678/ in your browser to set up n8n. You’ll only have to do this once.
  2. Open the included workflow: http://localhost:5678/workflow/srOnR8PAY3u4RSwb
  3. Click the Chat button at the bottom of the canvas, to start running the workflow.
  4. If this is the first time you’re running the workflow, you may need to wait until Ollama finishes downloading Llama3.2. You can inspect the docker console logs to check on the progress.

To open n8n at any time, visit http://localhost:5678/ in your browser.

With your n8n instance, you’ll have access to over 400 integrations and a suite of basic and advanced AI nodes such as AI Agent, Text classifier, and Information Extractor nodes. To keep everything local, just remember to use the Ollama node for your language model and Qdrant as your vector store.

[!NOTE] This starter kit is designed to help you get started with self-hosted AI workflows. While it’s not fully optimized for production environments, it combines robust components that work well together for proof-of-concept projects. You can customize it to meet your specific needs

Upgrading

docker compose --profile gpu-nvidia pull
docker compose create && docker compose --profile gpu-nvidia up
docker compose pull
docker compose create && docker compose up
docker compose --profile cpu pull
docker compose create && docker compose --profile cpu up

n8n is full of useful content for getting started quickly with its AI concepts and nodes. If you run into an issue, go to support.

🎥 Video walkthrough

🛍️ More AI templates

For more AI workflow ideas, visit the official n8n AI template gallery. From each workflow, select the Use workflow button to automatically import the workflow into your local n8n instance.

Learn AI key concepts

Local AI templates

Tips & tricks

Accessing local files

The self-hosted AI starter kit will create a shared folder (by default, located in the same directory) which is mounted to the n8n container and allows n8n to access files on disk. This folder within the n8n container is located at /data/shared -- this is the path you’ll need to use in nodes that interact with the local filesystem.

Nodes that interact with the local filesystem

📜 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

💬 Support

Join the conversation in the n8n Forum, where you can:

self-hosted-ai-starter-kit (n8n-io/self-hosted-ai-starter-kit)

Searching Database…

这是什么?这是一个 Docker Compose 模板,可以一键启动完整的本地 AI 与低代码开发环境,集成了 n8n、Ollama、Qdrant 和 PostgreSQL,让你无需把数据发送到外部服务,就能搭建自托管的 AI 工作流。
这是单个应用还是一组工具?它是一个 Docker Compose 堆栈,组合了四个工具:n8n(低代码工作流自动化)、Ollama(本地大语言模型运行器)、Qdrant(向量数据库)和 PostgreSQL(数据库)。
我该怎么把它跑起来?克隆仓库,然后用 Docker Compose 启动即可;运行命令因硬件而异,分别适用于 Nvidia 显卡、Linux 下的 AMD 显卡,以及没有独立显卡的情况。
试用之前需要先安装 Docker 吗?需要。整个堆栈都是通过 compose 文件定义和启动的,因此必须安装 Docker 和 Docker Compose。
我能用 Mac 的显卡来加速推理吗?不能。搭载 Apple Silicon 芯片的 Mac 无法将 GPU 暴露给 Docker 实例,所以你只能选择在 Docker 内用 CPU 运行全部服务,或者在 Mac 上直接原生运行 Ollama,并让 n8n 连接到它。
这个可以直接用于生产环境吗?不可以。它的定位是概念验证项目的起点,并不是经过加固的生产级部署方案。
这个能在哪些平台上运行?只要 Docker Compose 能运行的地方都可以,包括 Linux、macOS 和 Windows,不过不同操作系统下的 GPU 加速细节有所不同。
我的数据会保留在本地吗?会。这套工具的核心目的就是让工作流和数据保持自托管,例如在不泄露数据的前提下总结公司的 PDF 文件。
用这套工具到底能搭建什么?例如:用于安排预约的 AI 代理、安全的公司 PDF 摘要、更智能的 Slack 机器人,以及私密的财务文档分析。
我能在 n8n 工作流中访问自己的文件吗?可以。这套工具会把一个共享文件夹挂载到 n8n 容器的 /data/shared 路径下,可配合 Read/Write Files from Disk、Local File Trigger 和 Execute Command 等节点使用。
有没有现成的工作流模板可以直接用?有。n8n 的 AI 模板库提供了税务代码助手、财务文档助手和 PDF 对话工作流等模板,可以直接导入使用。
Qdrant 在这个堆栈中起什么作用?Qdrant 是开源的向量数据库,用于检索增强生成(RAG),存储文本嵌入向量,支持文档搜索和“与 PDF 对话”之类的工作流。
Creator
n8n-io
Size
4 MB
Stars
15.3K
Updated
CommitJul 23
Age
2y
Commits · 90 Days