Filipe E.

Local LLMs: How can I run my own?

Following my previous post on how to run n8n locally, the next logical move is to setup a LLM in your own computer that you can leverage for your automations.

Why?

Cost and Privacy.
Whether you want to generate images or you simply want the AI to infer something from a piece of text, it costs money.
While running a local LLM is not comparable to the massive "frontier" models running on cloud like ChatGPT, Claude, or Gemini, the gap has become smaller. You can now get very good results locally, making it a great alternative to keep your costs down.

On top of this, you have maximum privacy.

20 years ago, social networks were blooming, and with them, the age of data capture, tracking, and profiling. I am a firm believer that AI is the new iteration of that. People are uploading all sorts of things into these new agents: financial situations, health records, or sensitive moving plans. Sorry for the tangent :) Long story short: Running your local LLM allows you to share all the data you want without being concerned about what OpenAI or some other company might do with it.

In 2026, this is called Data Sovereignty, and it’s becoming the core standard for anyone serious about digital security.

Setup

Setting this up is actually pretty simple, and you have a few tools you can use for this. Personally, I'm using LMStudio but you can achieve the same with Ollama or jan.ai. I guess as time passes, more options will come up. What is important is that, regardless of which tool you use, if your goal is to integrate the local LLM with something (ex: n8n, an app you're developing, etc.), it must support local (API) server.

Models

Once you got your tool of choice running, you'll have to pick a model. There are a lot of open-source models available, and it can be difficult to pick one. As of 2026, the main players are Meta's Llama 4 (Scout or Maverick versions) and the GPT-OSS 20B—which is fantastic for logic-heavy tasks. One thing to understand is Quantization. You might see files labeled GGUF or EXL2. To keep it simple: You don't actually need 100GB of RAM to run a smart model anymore. Quantization shrinks the model. A 4-bit or 6-bit quantized model gives you 95% of the "smarts" while using only a fraction of the memory.

Head over to the Models catalog to have a look into what is available and have a read on this article to further help you choose which model to download.

Tip: If you're using LM Studio, it tells you when a model is likely to be too large for your hardware, so that's a nice and helpful feature.

Using your local LLM

Now that you have picked the model and it's running, you can start using it.
Tools like LM Studio allow you to use it straight from the tool itself, with an interface similar to ChatGPT, but as I mentioned earlier, there is also an API that you can leverage for more advanced use cases.

n8n has a great blog post explaining how to connect with a local LLM as well as yet another nice overview of LLM Models.

tl;dr: to use the OpenAI Chat Model node and configure it with the API endpoint provided in your LLM tool. All you need to do is to specify your endpoint (LMStudio will tell you that) and, if necessary, create an API key for it (again, LMStudio will show this option).

showcasing the n8n OpenAI Chat node authentication, configured for a local LLM

n8n - OpenAI Chat node

Keep an eye on your Context Window. When setting up the local LLM and integrating it with n8n, make sure the context limit in LM Studio is big enough. If you try to summarize a 50-page document and your local server has a context window set to 2048, it will likely be too small and your model will end up forgetting the beginning of the file.

Cloud vs Local on Corp Level?

I think the question is not raised often (yet). The economic incentive is there, and the guarantee that your data will stay behind closed doors should make it an easy decision and a strategic long-term investment.

Beyond just privacy, there is the Consistency argument. Cloud APIs change their models or go down for maintenance. A local model is a frozen asset: it will perform the exact same way for your business process today as it will in three years.

Yes, you'll need to maintain it, and that also adds to the TCO (Total Cost of Ownership), but the old "data is money" argument is more valid than ever if you want to keep a competitive advantage!