Running LLMs Locally: A Complete Guide to Ollama

Large language models no longer require cloud subscriptions. With Ollama, you can run Llama 3, Mistral, Phi-3, and hundreds of other models on your own hardware — with a single command.

In this guide, we'll walk through installing Ollama, pulling your first model, and integrating it with your development workflow using the OpenAI-compatible REST API.

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

# Pull Llama 3
ollama pull llama3

# Start a chat
ollama run llama3