In the past year, large language models (LLMs) have exploded in popularity. From writing code to summarizing meetings, they are reshaping how we interact with information. While most people rely on cloud-hosted options like ChatGPT, there is a growing interest in running LLMs locally.
I’m part of that shift, and here’s why.
The Growing Case for Local LLMs
Using cloud-based LLMs comes with real trade-offs:
- Your data may be stored, logged, or analyzed by a third party
- API usage can get expensive very quickly
- You are dependent on external infrastructure and uptime
For anyone dealing with sensitive data or proprietary workflows, these risks are hard to justify. Running LLMs locally gives you complete control. You do not need to send any data to an external service, and you are free to modify or fine-tune models however you want.
That level of control is appealing to developers, researchers, and security-conscious professionals alike.
Local Doesn’t Mean Secure
It is easy to assume that running something locally means it is safe. But that is not always true. Local LLMs come with their own set of security risks:
- Model tampering if you use weights from unverified sources
- Prompt injection if the model’s output is used by other systems
- Open ports or APIs that could expose attack surfaces
- Lack of isolation if the model runs directly on your host OS
- Data leaks if logs are stored insecurely or unencrypted
Going local removes some risks, but it introduces others. You are now fully responsible for securing both the model and the environment it runs in.
My Setup Plan
My goal is to run a private LLM setup that works entirely offline. I want to use my own hardware to process data without ever sending it out to a third party.
Here is my plan:
- Tooling: Ollama for model downloads and execution
- Models: Starting with Mistral 7B, Phi-2, or LLaMA 3 Instruct 8B (quantized)
- Environment: Ubuntu VM, separated from my main system
- Use cases: Text summarization, lightweight coding assistance, documentation support
Ollama simplifies a lot of the setup, but I do not want convenience to come at the cost of security. That is why I am building protections around the deployment.
Security Measures I Am Taking
To keep my local LLM setup secure, I am taking the following steps:
- Verifying checksums for all downloaded model files to ensure they have not been tampered with
- Disabling internet access to the VM once setup is complete to eliminate remote access and data exfiltration
- Creating strict firewall rules with
iptables
to block all inbound and outbound traffic - Using a minimal OS install and enforcing AppArmor to restrict what the model process can do
- Storing any logs in an encrypted location, and only if necessary
- Avoiding unnecessary local web interfaces or exposed APIs
- Treating the model as untrusted, like I would with any third-party binary
This setup is not perfectly secure, but it reflects a cautious and responsible approach. I am assuming the model could be compromised and building layers of defense around it.
Why This Matters
LLMs are quickly becoming part of everyday tools and workflows. Whether in business or personal use, they are influencing how decisions are made and how data is processed. That also means they are becoming a potential target or weak point.
Most people are not thinking about what it means to trust a language model. I am, because I want to understand the risks and learn how to build safer systems. Running an LLM locally is part of that process. It is not about convenience. It is about ownership and security.