AI Assistant on self-hosted n8n: early setup instructions

Hey community! :waving_hand:

Alongside the AI Assistant launch on n8n Cloud, we’re also sharing early instructions for running the AI Assistant on self-hosted n8n.

A heads-up before you dive in.

This is very much a pre-release preview and a work in progress. We’ve been running it internally and it works, but the setup is manual and has a fair number of moving parts. We’re actively working on making it much simpler. We know many of you want to get your hands on this as soon as possible, though, so rather than make you wait, here’s how to set it up today.

What you’ll need

  • n8n version 2.29.7 or later
  • An API key from an LLM provider (Anthropic, OpenAI, or OpenRouter).
    You bring your own key, so LLM usage is billed to you by your provider.
  • A search provider (Brave Search or SearXNG) if you want the assistant to be able to search the web. Optional, but highly recommended.
  • A sandbox provider.
    The AI Assistant runs its work in an isolated sandbox, so this is required. We recommend Daytona as this is what we use on n8n cloud, you just need an account and API key. If you’d rather keep everything on your own infrastructure, there’s also an option to self-host n8n’s sandbox service, but that setup is more involved.

:light_bulb: If “sandbox” is a new concept for you: it’s an isolated, disposable environment (essentially a locked-down container) where the AI Assistant runs code and builds workflows, kept fully separate from your n8n instance and your data. This protects your instance from anything the AI-generated code might do, which is why the AI Assistant can’t run without one.

Configuration is done through environment variables on your n8n instance. The full step-by-step instructions, including a Docker Compose example, are in the docs:

:backhand_index_pointing_right: Set up the AI Assistant (Preview) on self-hosted n8n

Where to post questions

  • Questions or feedback about self-hosted setup: post them in this thread.
    We’re watching it and it will directly shape how we simplify the setup.
  • Questions about the AI Assistant itself (what it can do, how it builds workflows, feedback on results): head over to the main announcement thread so everything stays in one place.

Happy automating!

10 Likes

Hi, I know it’s only been 12 hours since this announcement, but there seems to be more providers supported than just the 3 mentioned in the docs. (Using Nvidia NIM myself). Had to dig through errors and logs to find this out. Would be neat if we just enabled the Ai Assistant in the docker compose, but everything else (sandbox provider, llm provider, search provider) would be configurable through the Ui. This would negate the need to constantly update the docs or inform the users soon.

Still test running the Ai Assistant, It has been erroring out for me a lot, managed to create a workflow though. Unsure if the errors are because of the llm provider used or n8n itself. Will report back further.

1 Like

This looks really promising, thank you!

I think I may have found an issue with custom OpenAI-compatible endpoints, unless I’m missing a configuration step.

My setup:

  • N8N_INSTANCE_AI_MODEL_URL=https://my-endpoint/v1
  • N8N_INSTANCE_AI_MODEL_API_KEY=...

Initially I tried:

N8N_INSTANCE_AI_MODEL=glm-5.2

but got:

So I switched to:

N8N_INSTANCE_AI_MODEL=openai/glm-5.2

but got:

When the AI Assistant makes a request, it doesn’t appear to use N8N_INSTANCE_AI_MODEL_URL. Instead, it sends the request to openai, the logs show:

url: 'https://api.openai.com/v1/responses'
model: 'glm-5.2'

From the documentation, I expected N8N_INSTANCE_AI_MODEL_URL to override the endpoint for an OpenAI-compatible API, but it looks like the request is still being sent to the default OpenAI endpoint.

Is this a known limitation/bug in the current preview, or is there another configuration step required to make custom OpenAI-compatible endpoints work?

2 Likes

Hey, were you able to resolve this issue? I’m having the same situation with DeepSeek.

We’re working on this and should have a fix for you soon — probably tomorrow

1 Like

Hey everyone, the fix for custom N8N_INSTANCE_AI_MODEL_URL just went out in 2.31.0.

4 Likes

Is AWS Bedrock supported as an LLM provider for the AI Assistant? If yes, what env vars are needed? Could you share them? I couldn’t find them in the doc.

To add, I have this working with OpenRouter just fine.

Hi, I’m learning about n8n and I found something that might be a bug, or maybe I’m doing something wrong. I wanted to share it in case it’s useful.

What I noticed: when I configure a model with the openai/ prefix to use my own API (e.g., DeepSeek), the AI Assistant stops responding. After digging a bit, I saw that n8n sends reasoningEffort: ‘high’ in the requests. I tested with a direct curl to DeepSeek and Mistral: without that parameter, they respond perfectly. With that parameter, they fail.

I understand this happens because the code detects the openai/ prefix and automatically applies reasoning, without distinguishing whether I’m pointing to OpenAI or another provider via a custom endpoint.

My question: is there a way to disable that behavior that I’m not seeing? If it doesn’t exist, would it make sense to expose a variable like N8N_INSTANCE_AI_THINKING_ENABLED so you can choose?

For now I solved it using OpenRouter, which works great. But I’d like to be able to use my own API keys directly.

What also catches my attention is the token consumption — could it be because of this thinking configuration?

any info on this AWS Bedrock as a LLM provider?

I came across an image above that suggests it is supported?