10 Sentinels Active
SENTINEL 01: [AEGIS] AUDITING POCKETBASE INFRASTRUCTURE...
Back to Intel
AI

How to Set Up LM Studio and Ollama for Local AI in 2026

AS
The AltStack
February 27, 2026

How to Set Up LM Studio and Ollama for Local AI in 2026

Running large language models on your own hardware has gone from a niche experiment to a legitimate production strategy. Whether you want to eliminate per-token API costs, keep sensitive data off third-party servers, or just experiment with open-weight models, two tools dominate the local AI runner space: Ollama and LM Studio.

This guide walks you through setting up both, compares their strengths, and helps you decide which fits your workflow.

Why Run AI Models Locally?

Before diving into setup, here is why local inference matters:

  • Zero marginal cost -- once your hardware is provisioned, every query is free
  • Complete data privacy -- prompts and outputs never leave your network
  • No rate limits -- run as many requests as your hardware can handle
  • Offline capability -- works without internet after the initial model download

The tradeoff is hardware investment. Most capable models need at least 8GB of RAM, and larger models benefit from a dedicated GPU.

Setting Up Ollama

Ollama is the most popular open-source AI runner with over 60,000 GitHub stars. It takes a CLI-first approach: one command to install, one command to run any model.

Installation

macOS / Linux:

bash
curl -fsSL https://ollama.com/install.sh | sh

Docker (recommended for servers):

bash
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

Windows: Download the installer from ollama.com.

Running Your First Model

bash
ollama run llama3.2

That is it. Ollama downloads the model, quantizes it for your hardware, and starts an interactive chat. Want a different model? Just swap the name:

bash
ollama run deepseek-r1:8b
ollama run mistral
ollama run gemma2:9b

Using the API

Ollama exposes an OpenAI-compatible API on port 11434:

bash
curl http://localhost:11434/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "llama3.2",
    "messages": [{"role": "user", "content": "Explain Docker in one paragraph"}]
  }'

This means any application built for the OpenAI API can switch to Ollama by changing the base URL. No code rewrite needed.

Setting Up LM Studio

LM Studio takes a different approach -- it provides a polished desktop GUI for downloading, managing, and chatting with models. It is free for personal use but is not open source.

Installation

Download the installer from lmstudio.ai for macOS, Windows, or Linux. The app handles everything through a visual interface.

Key Features

  • Model discovery -- browse and download models from Hugging Face directly in the app
  • Chat interface -- a ChatGPT-like UI for interacting with models
  • Local server mode -- exposes an OpenAI-compatible API (same as Ollama)
  • Hardware profiling -- automatically selects the best quantization for your system

Ollama vs LM Studio: Which Should You Choose?

FeatureOllamaLM Studio
InterfaceCLI + APIDesktop GUI + API
Open SourceYes (MIT)No (free for personal use)
Model Library100+ modelsHugging Face catalog
Docker SupportOfficial imageNo
Server DeploymentExcellentDesktop only
GPU SupportNVIDIA, AMD, Apple SiliconNVIDIA, Apple Silicon
Resource UsageLightweightHeavier (Electron app)

Choose Ollama if you want a lightweight, scriptable tool for servers or development. It is the better choice for production deployments, CI/CD pipelines, and headless servers.

Choose LM Studio if you prefer a visual interface for exploring models and want a plug-and-play experience on your desktop.

Adding a Chat UI with Open WebUI

Ollama's CLI is powerful, but for a browser-based chat experience, pair it with Open WebUI:

bash
docker run -d -p 3000:8080 \
  --add-host=host.docker.internal:host-gateway \
  -e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
  --name open-webui \
  ghcr.io/open-webui/open-webui:main

Open WebUI gives you a ChatGPT-like interface with multi-model chat, conversation history, RAG document upload, and user management -- all running on your infrastructure.

Hardware Recommendations

Model SizeRAM RequiredGPU VRAMExample Models
3B-7B8GB+4-6GBLlama 3.2 3B, Gemma 2 9B
13B-14B16GB+8-10GBLlama 3.2, DeepSeek-R1 14B
30B-70B32GB+24-48GBLlama 3.1 70B, Qwen 72B
100B+64GB+80GB+DeepSeek-V3 671B (MoE)

For most use cases, a 7B-14B model running on a machine with 16GB RAM delivers excellent results for coding assistance, writing, and general Q&A.

Next Steps

  1. Start with Ollama and a small model like llama3.2 to verify your setup
  2. Try Open WebUI or Jan for a graphical interface
  3. Experiment with specialized models: DeepSeek-R1 for reasoning, CodeLlama for coding
  4. Consider self-hosting on a VPS for always-on access from any device

The local AI ecosystem is mature enough that there is no reason to send every prompt to a cloud API. Start local, and scale from there.

Sovereign Tools Mentioned