← All posts
July 25, 2026·3 min read·Guides

n8n + Ollama: A Private AI Automation Stack You Actually Own

Combine n8n's workflow automation with a self-hosted model to build AI automations that never send your data to a third-party API.

Sarah Chen · Senior DevOps Engineer

n8n is already one of the most-deployed self-hosted tools out there - it's the open-source alternative to Zapier/Make, and it's usually the first thing people put on a fresh VPS. What's changed recently is what people are wiring it up to: instead of "when a form is submitted, send a Slack message," a lot of n8n workflows now have an LLM call sitting in the middle of them - summarize this ticket, draft this reply, classify this lead.

The problem is that the moment you add an "OpenAI node" to a workflow that's processing customer data, you've sent that data to a third party, on every run, forever. Pointing the same workflow at a model you run yourself removes that entirely.

The stack

  • n8n - the workflow engine: triggers, HTTP requests, conditionals, the automation logic.
  • Ollama - the model n8n calls instead of an external API.

n8n has a built-in "Ollama" node (and a generic HTTP Request node works too, since Ollama exposes a normal REST API) so swapping an OpenAI-node workflow over to a self-hosted model is usually a five-minute change, not a rebuild.

Deploying it

  1. From Templates, deploy n8n and Ollama on the same server - either individually or, if you also want a chat interface for testing prompts outside of a workflow, deploy the AI Workbench stack (Ollama + Open WebUI + Flowise) alongside n8n.
  2. Both containers land on the same private Docker network, so n8n reaches Ollama at http://ollama:11434 with no manual networking - the same wiring DeployOS uses to connect Open WebUI to Ollama.
  3. In n8n, add an Ollama node (or an HTTP Request node pointed at that address) anywhere you'd have used an OpenAI node.

Why this is also a Coolify-migration story

If you're already running n8n on Coolify or a hand-rolled Docker Compose setup, moving it doesn't mean rebuilding your workflows - DeployOS's discovery flow scans a server for running Compose projects and can adopt an existing n8n instance as a managed app without tearing it down first. You get automatic HTTPS renewal, health-checked deploys, and backups on top of a workflow library you already built, plus a place to add Ollama next to it without standing up a second server.

What this actually buys you

Not a smarter model than GPT-4 - a private one. The workflows that make sense to automate this way are the ones where the input is something you wouldn't want an OpenAI usage log for: internal documents, customer PII, anything under an NDA. For everything else, keep using whatever API node is fastest. The point of self-hosting the model isn't ideology, it's having the option to route the sensitive third of your workflows somewhere that isn't someone else's server.

Your own deploy platform, on a $5 server.

Deploy from GitHub to your own server in one click free download, no account needed.

Download DeployOS