Ollama Tutorial: Getting Started the Right Way
This Ollama tutorial covers install, your first model, and the local API on macOS, Windows, and Linux, plus the mistakes that waste the most time.
By Galactic News Editorial · Published 2026-11-11T16:29:38+00:00 · Updated 2026-11-11T16:29:38+00:00
Ollama Tutorial: Getting Started the Right Way
This Ollama tutorial takes you from install to your first working model in a few minutes. You will install Ollama, run a model, chat with it, and call it from code. It works on macOS, Windows, and Linux. No account is needed for local use. No cloud setup is needed either. Follow the steps in order, and check the official docs if a command behaves differently on your machine.
What you need before this Ollama tutorial
Ollama runs on macOS, Windows, and Linux. It also runs in Docker through the official ollama/ollama image. The main requirement is memory. Ollama's README suggests at least 8 GB of RAM to run 7B models, 16 GB for 13B models, and 32 GB for 33B models. Start with a small model if your machine is modest. A 3B model runs well on most modern laptops.
You will also need a terminal. On macOS, use Terminal. On Windows, use PowerShell or the command prompt. On Linux, use your usual terminal. You need an internet connection for the install and for downloading your first model. After that, local models work offline. Pick a model before you start. Llama 3.2 is a solid first choice for chat. Gemma 4 is another good option. Both are listed in Ollama's model library.
Ollama tutorial: install and run your first model
Follow these steps in order. Each one builds on the last. Do not skip the check at the end of step one. It saves time later.
- Install Ollama. On macOS or Linux, run this command in your terminal:
curl -fsSL https://ollama.com/install.sh | sh. On Windows, download the installer from ollama.com and run it. The installer adds Ollama to your system and starts it in the background. - Check that it works. Run
ollama --versionin a fresh terminal window. You should see a version number. If the command is not found, close the terminal, open a new one, and try again. On some systems the installer needs a restart to update the path. - Run your first model. Type
ollama run llama3.2and press Enter. Ollama downloads the model on the first run. That can take a few minutes. When the download finishes, you get a chat prompt. Type a question and press Enter to see the answer. - End the chat cleanly. Type
/byeto leave the chat session. The model stays downloaded on your machine. You can run it again later without downloading it again. - Try a second model. Run
ollama run gemma4to compare. Each model has its own strengths. Small models answer fast. Larger models give more detailed answers but need more memory. Try two or three before you settle on one. - List and manage your models. Run
ollama listto see what is installed. Runollama pull <model>to download a model without starting a chat. Runollama rm <model>to free disk space. Models can be tens of gigabytes, so clean up ones you no longer use. - Call the local API. Ollama serves a local API at
http://localhost:11434. It also offers an OpenAI-compatible endpoint athttp://localhost:11434/v1. That means many existing apps and tools work with Ollama after a one-line change to the base URL. Send a test request with curl to confirm the server answers. - Use it from your code. Ollama publishes official Python and JavaScript libraries. They wrap the API in simple calls. The docs link both libraries from the documentation page. Pick the one that matches your project, install it, and point it at the local server.
- Customise a model with a Modelfile. A Modelfile defines a custom model from a base model. It can set a system prompt, parameters, and a template. Create a text file named Modelfile, add a FROM line with your base model, then build it with
ollama create. This is how you give a model a fixed role or tone for your project.
Common mistakes to avoid
The most common mistake is picking a model that is too large. A 70B model needs far more memory than a laptop has. It will run slowly or fail to load. Start small. Move up only when you know your machine can handle it. The model library lists sizes, so check before you download.
Another mistake is treating local models like cloud chatbots. Local models have no internet access by default. They cannot fetch live prices, news, or web pages. They answer from their training. For live data, you need to add tools or retrieval yourself. Do not expect a local model to know today's headlines.
People also forget that Ollama must be running for the API to answer. On most systems it starts with the computer. If a request fails, check that Ollama is running first. On the command line, ollama serve starts the server without the desktop app. Check the port too. The default is 11434, and another app can block it.
Finally, do not download every model you read about. Disk space fills fast. Each model is a separate multi-gigabyte file. Try one, judge it, then remove it or keep it. A tidy model list is easier to manage than a dozen half-tried downloads.
What to build next
Once the basics work, Ollama becomes a building block. Connect it to a coding agent or editor for local code help. Point a note-taking app at the local API for private summaries. Build a small chatbot that answers from your own documents. The official docs list integrations for apps, editors, and agents. Start with one integration, not five. Get it working, then add the next.
If you need a model your hardware cannot run, consider the cloud option. Ollama's cloud service runs larger models on its own infrastructure. It charges per token. Local use stays free and unlimited either way. Your code can talk to both through the same style of API.
Bottom line
Getting started with Ollama is a short job. Install it, run a small model, and test the API. That covers the core of the tool. The rest is practice: trying models, learning their limits, and wiring Ollama into your own projects. Start small, keep your model list tidy, and add complexity one step at a time.