n8n with Ollama: connect local AI models without the cloud
How to connect n8n to local AI models via the Ollama credential, including a Docker pitfall and tool-calling limits.
The Self-hosted AI Starter Kit from n8n starts n8n, Ollama, Qdrant and PostgreSQL via Docker Compose for local AI workflows without cloud APIs.
Anyone who wants to build local AI workflows without sending data to cloud providers will find a ready-made Docker Compose template in n8n's Self-hosted AI Starter Kit. It starts n8n as workflow orchestration, Ollama for local language models, Qdrant as a vector database and PostgreSQL as data storage with a single command. In the official n8n documentation the kit is described as a curated collection of AI elements that let you build AI workflows quickly, and the complete setup is available in the GitHub repository n8n-io/self-hosted-ai-starter-kit. There it says the kit is explicitly intended as a starting point and not as a production-ready solution. As of: July 2026.
The stack combines four containers, each of which takes on a clearly defined task. According to the repository's README, these are:
The stack can be adapted to the available hardware via Docker Compose profiles. For Nvidia graphics cards, the command docker compose --profile gpu-nvidia up starts the stack with GPU acceleration, on Linux this works the same way for AMD cards via the gpu-amd profile. Without a dedicated GPU, the stack also runs in the CPU profile, in which case the processor handles the model computation, which takes noticeably longer with larger models. On a Mac, the GPU cannot be passed through to Docker directly, here the documentation recommends running Ollama locally on the host system and starting n8n normally via docker compose up.
Getting started follows the usual Docker Compose pattern: clone the repository from GitHub, copy the .env.example file to .env and adjust the secrets and passwords in it, then run the appropriate profile command. After starting, n8n is available at http://localhost:5678/, where a user account is set up once. The kit comes with a bundled example workflow that can be tested directly via the chat button. For data exchange between workflows and the local file system, a shared folder under /data/shared is also mounted into the containers. Anyone keeping the stack up to date uses the corresponding pull and create commands for upgrades before restarting with the respective profile.
As example workflows, the repository names, among others, AI agents for scheduling, the summarization of PDF documents, the extension of Slack bots as well as the analysis of financial documents, plus templates for tax topics and document evaluation with Qdrant and a Mistral model. The common denominator: sensitive documents such as invoices, contracts or customer data do not leave your own infrastructure. That is the key advantage over cloud APIs. Honestly, local models that run on off-the-shelf hardware are currently still noticeably behind large cloud models in response speed and reasoning quality, especially for complex multi-step tasks. For clearly defined tasks such as classification, summarization or simple extraction, the performance is often sufficient, especially when data protection and control over the infrastructure are more important than maximum model quality. For companies that want to use such an architecture in production and securely, it is usually worth assessing which use cases are suitable for AI agents on their own infrastructure and where a hybrid solution makes more sense. NordFlux supports the selection and setup of such stacks as part of automation projects.
According to the official n8n documentation, explicitly not without further work: The kit is "not fully optimized for production environments" and should be adapted, secured and hardened before productive use.
No. There is a dedicated CPU profile that lets the stack run even without a GPU, although model computation then takes longer. Nvidia and AMD graphics cards accelerate Ollama via the respective GPU profiles, on a Mac Ollama is instead run directly on the host.
The repository is under the Apache License 2.0, the full terms can be found in the LICENSE file of the GitHub repository.
Yes. The Docker Compose setup serves as a basic framework on which your own workflows, additional integrations and adapted models can be built, the included example workflow only shows the basic structure.
Founder of NordFlux. Spent four years automating processes at enterprise scale at Dräger, and now brings that depth to the mid-market — pragmatic and with full data sovereignty.
Certifications
How to connect n8n to local AI models via the Ollama credential, including a Docker pitfall and tool-calling limits.
How to install n8n with Docker Compose: Postgres instead of SQLite, .env, volumes and updates step by step.
n8n Cloud limits parallel executions: Starter 5, Pro 20, Enterprise 200+. How this affects bulk processing and how batching helps.
The starter kit is up quickly, but production means resource management, updates for four services and backups for Qdrant and PostgreSQL. NordFlux operates local AI stacks built on n8n, Ollama and Qdrant so they stay reliable under load and after updates. Together we assess what your stack still needs to be production-ready.