When should you use it?
- A client's policy says their files may not be sent to an outside AI provider
- The client already runs, or is willing to run, a model on hardware they control
- Your workflow uses n8n's OpenAI chat model node and you would rather not rebuild it
Not for: Tasks that need the strongest hosted models, such as complex reasoning over long documents; Clients with no one able to keep the model server patched and running; Treating a local model as automatically secure; network access and logging still need their own review
What do you need, and what do you get?
You need
- The address of the client's model server and which API style it offers
- The context size their model build is configured for, confirmed by their IT contact
- A small set of real questions to compare hosted and local answers
- A channel where failures should be reported
You get
- A separate n8n credential pointing at the client's server, with endpoint options set to match it
- A side-by-side comparison of answer quality and response time on the same questions
- An error branch that alerts you and the client when the model server stops answering
How does it work, step by step?
- Ask what the server speaksFind out whether the client's server offers only classic chat completions or newer endpoints as well.
- Point the credential at itCreate a new OpenAI-type credential with the client's base address, and switch off the newer Responses API option if their server lacks it.
- Get the real context sizeAsk the client what context length their model build supports and enter that, rather than guessing a number.
- Compare before switchingRun the same handful of questions through hosted and local setups and let the client judge whether the answers are good enough.
- Alert on outagesAdd an error branch to the model call that messages you, so you hear about downtime before the client does.
The prompt
Our own prompt, inspired by kartike and written to work in n8n and Custom agent. Values in lime are placeholders.
Fill in the blanks (optional; the copied prompt uses your values)
Help me move an n8n agent from a hosted model to a client's own model server. Client rule: {data_rule}. Server: {server_address}, offering {api_style}. Workflow: {workflow}. 1. Tell me how to set up a separate OpenAI-type credential for this server and which endpoint options must match what it offers. 2. If the context size is not given, mark it unknown and write the question I should ask their IT contact. Do not guess a number. 3. Propose a short side-by-side test of hosted and local answers on the same real questions, with what to record. 4. Add an error branch that alerts {alert_channel} when the server does not answer. 5. List anything that could still send data outside, such as an old hosted credential left in the workflow.
Inspired by kartike: n8n Community: running client agents on a local Qwen server with n8n's OpenAI node. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Leaving the newer API option switched on. In his case every call failed before a single prompt got through.
- Guessing the context window. Too large and long requests fail; too small and the agent loses history it needs.
- Keeping the hosted credential attached to the same workflow, where a fallback could send files outside by mistake.
- Assuming local always means slower. In his test the office server answered faster because there was no long network trip.
Our take
Plenty of small firms, especially in accounting, legal and healthcare, would use AI agents tomorrow if their files never left the office. This post is a practical answer from someone who did the work for a real client: if their model server mimics OpenAI's API, the standard n8n chat node will talk to it once the credential points at the right address. The detail worth copying is the single setting that broke the first calls, an option that assumes a newer API style the client's server did not offer. That kind of gotcha costs an afternoon if you do not know about it. We also like two habits: asking the client for the real context size instead of guessing, and comparing answers on the same questions before declaring the local model good enough. Remember that local is not the same as secure; the server, its network access and its logs still need managing, and someone must keep it running. In our dry run on an invented accounting firm, the checklist produced a separate credential plan, marked the context size as unknown until IT confirmed it, proposed a ten-question comparison, and added a Teams alert for outages.
Where the time goes back: Instead of turning down AI work for privacy-strict clients or rebuilding workflows around a new node, you reuse what you have and change one credential, with a short comparison to prove it is good enough.
FAQ
Is a dedicated node required for a self-hosted model?
Was the local model good enough?
Is this an MSP or IT task?
Source and credit
Inspired by kartike. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- n8n Community: running client agents on a local Qwen server with n8n's OpenAI node
- Creator
- kartike
- Published on
- n8n Community
- Original date
- Nov 25, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- n8n
- AI dry run
- Nov 26, 2026: passed. Dry-run tested by our AI test agent on sample input. No invented context size, endpoint mismatch handled, comparison and outage alert included. Invented client only; no real server contacted.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Nov 26, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.