LM Studio & Ollama: Local LLM Setup Guide

LM Studio & Ollama: Local LLM Setup Guide

LM Studio is a desktop app for downloading and chatting with local models through a graphical interface. Ollama is a lightweight command-line tool and background server built for developers who want to call models from code. Both are free, both run models fully offline, and many people install both.

This guide covers installing each one on macOS, Windows and Linux, running your first model, and using each as a local API. Not sure which to pick? Our Ollama vs LM Studio comparison goes deeper. Checking whether your machine is powerful enough? See Ollama hardware requirements.


LM Studio vs Ollama at a Glance

LM Studio Ollama
Interface Desktop app with chat UI and model browser CLI plus a small desktop app
Local API OpenAI-compatible server on localhost:1234 Native and OpenAI-compatible API on localhost:11434
Model engines llama.cpp (GGUF) and MLX on Apple Silicon Its own engine plus MLX on Apple Silicon
Headless / server use llmster daemon and lms CLI Built for it: runs as a background service
Cost Free for local use Free for local use
Best for Browsing and testing models visually Scripting, apps and integrations

Requirements

  • RAM: 16 GB recommended. 8 GB works for small models (1B–4B parameters) with short contexts.
  • macOS: Apple Silicon (M1 or newer). LM Studio needs macOS 14 or later and does not support Intel Macs; Ollama also requires macOS 14 Sonoma or later.
  • Windows: Windows 10 or later. LM Studio needs a CPU with AVX2 on x64, and also runs on ARM (Snapdragon X).
  • Linux: x64 or ARM64. A GPU with at least 4 GB of VRAM helps a lot but is optional.

Installing LM Studio

macOS and Windows

Download the installer from lmstudio.ai/download. On macOS, drag LM Studio to Applications; on Windows, run the installer. Open the app and it will walk you through downloading a first model.

Linux

LM Studio for Linux ships as an AppImage from the same download page:

chmod +x LM-Studio-*.AppImage
./LM-Studio-*.AppImage

Headless install (servers and CI)

For a machine without a desktop, install llmster, LM Studio’s headless daemon:

# macOS / Linux
curl -fsSL https://lmstudio.ai/install.sh | bash

# Windows (PowerShell)
irm https://lmstudio.ai/install.ps1 | iex

Installing Ollama

macOS

Download the app from ollama.com/download and move it to Applications, or use Homebrew:

brew install ollama

Windows

Run the installer from ollama.com, or paste this into PowerShell:

irm https://ollama.com/install.ps1 | iex

Linux

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

On Linux the script sets Ollama up as a systemd service, so it starts on boot. On every platform, check it worked with:

ollama --version

Run Your First Model

In LM Studio

  • Open the Discover (search) tab.
  • Search for a small model such as Qwen3 4B, Gemma 4 or Llama 3.2 3B. LM Studio marks which quantizations fit your hardware.
  • Click Download, then load it and start chatting.

In Ollama

ollama run qwen3:4b

# other good starting points
ollama run llama3.2:3b
ollama run gemma4:12b   # needs ~16 GB RAM

ollama run downloads the model the first time, then opens an interactive chat. Type /bye to exit. Use ollama ls to list downloaded models and ollama ps to see what is loaded in memory.


Use Them as a Local API

Both tools expose an OpenAI-compatible endpoint, so most SDKs and tools that accept a custom base URL work with either one.

Ollama (port 11434)

curl http://localhost:11434/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen3:4b", "messages": [{"role": "user", "content": "Hello"}]}'

LM Studio (port 1234)

Start the server from the Developer tab in the app, or from the terminal:

lms server start
lms load qwen3-4b

curl http://localhost:1234/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen3-4b", "messages": [{"role": "user", "content": "Hello"}]}'

Use lms ls to see the exact model names on your machine. For more request patterns (streaming, embeddings, tool calling), see our Ollama API guide.


Troubleshooting

Problem Fix
Model is very slow It is probably running on CPU or spilling out of VRAM. Try a smaller model or a lower quantization (Q4 instead of Q8).
Model will not load / out of memory Close other apps, pick a smaller model, or reduce the context length.
address already in use on port 11434 Ollama is already running in the background. Use it, or stop it before running ollama serve yourself. On Linux or macOS, lsof -i :11434 shows which process holds the port; see our guide to finding what’s using a port on Linux.
could not connect to ollama server The background service is not running. Open the Ollama app, or run ollama serve.
LM Studio will not start on an Intel Mac Intel Macs are not supported. Use Ollama instead.

Next Steps


Frequently Asked Questions

What is the difference between LM Studio and Ollama?

LM Studio is a desktop app with a graphical chat and model browser; Ollama is a command-line tool and local API server. Many people run both.

Are LM Studio and Ollama free?

Yes. Both are free to download and run models locally. You only pay if you connect a paid cloud model through them.

How much RAM do I need to run a local LLM?

Plan for roughly the model file size plus a few GB: about 8 GB for a 7B model at 4-bit, 16 GB to be comfortable, and more for larger models.

Can I use Ollama models in other apps?

Yes. Ollama exposes an OpenAI-compatible API on localhost port 11434, so most tools that accept a custom base URL can talk to it.

Install steps checked against ollama.com and lmstudio.ai on September 25, 2026 (LM Studio 0.4.25).


Related guides