How To Install Ollama on Ubuntu 26.04 LTS

Install Ollama on Ubuntu 26.04

You want a private assistant on your own machine, not a tab that sends every prompt to someone else’s cloud. Just a local LLM you can ask questions and draft code with, without wondering where the text goes. If you have been wondering how to install Ollama on Ubuntu 26.04, the short answer is one script and one small model. Ubuntu 26.04 LTS is stable, supported for years, and the official installer works on it without much fiddling. No GPU needed.

What is Ollama?

Ollama is a free, open-source tool for running a large language model on your own hardware. Think of it as the engine, not the model. You install Ollama once, then download open-source AI models from its model library, like llama3.2 or qwen3. They are GGUF files, and Ollama loads them into memory and serves them through a local API.

That makes Ollama a practical way to run an LLM locally: a private AI assistant for notes and code, an AI chatbot for testing ideas, or a self-hosted AI setup where prompts never leave your network. Use the cloud for the biggest models, and Ollama when privacy and offline work matter more. This article shows how to install Ollama on Ubuntu 26.04 LTS step by step, from the first apt command to your first chat.

What you will end up with

Ollama running as a service on your machine, listening on 127.0.0.1:11434. You will have pulled llama3.2:1b, chatted with it in your terminal, and sent it a prompt through its OpenAI-compatible API. Nothing leaves your machine unless you change the remote access settings near the end.

Prerequisites

  • Ubuntu 26.04 LTS on a desktop, server, or VPS, with a 64-bit CPU
  • A user account with sudo privileges
  • A working internet connection
  • At least 8 GB of RAM and 10 GB of free disk space
  • About 10 to 15 minutes, most of it waiting for the model to download

Eight gigabytes is the floor, not the sweet spot: a 7B model wants 16 GB, and RAM requirements are the part people underestimate. Models live in /usr/share/ollama/.ollama/models, so check space first:

df -h / && free -h

Step 1: Get Ubuntu ready with curl and zstd

Two small tools do the work: curl downloads the installer, and zstd extracts the binary. The second one is the trap: without it, the installer fails and Ollama looks broken.

sudo apt update && sudo apt install -y curl zstd ca-certificates
curl --version | head -1
zstd --version

Step 2: Install Ollama on Ubuntu 26.04 with the official script

One command does the install. It downloads the current release, puts the binary in /usr/local/bin, creates an ollama system user, and sets up a systemd service that only listens on 127.0.0.1:11434. The result is an Ollama Ubuntu install with systemd service, so the daemon starts on boot.

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

It will ask for sudo when it needs to write to system folders, so there is no need to put sudo in front of the whole pipe. Running ollama serve by hand starts the same daemon in the foreground, but the service is the one you want day to day.

Step 3: Check the Ollama service is actually running

Run these five checks together:

ollama --version
systemctl is-active ollama
systemctl is-enabled ollama
curl http://127.0.0.1:11434/api/version
curl http://127.0.0.1:11434/api/tags

ollama --version should print a version in the 0.40.x line or newer, because the script always pulls the current release. Recent tested guides reported 0.40.15 and 0.40.16 on 16 November 2026, and 0.40.19 on 29 November 2026. is-active should print active, is-enabled should print enabled, and the tags call should return an empty list on a fresh install.

Step 4: Run your first model on CPU

Here is how to run llama3.2 on Ubuntu 26.04 with the smallest model that still gives sensible answers: llama3.2:1b is only 1.3 GB, needs about 4 GB of RAM, and answers fast enough on CPU that you can tell in a minute whether everything works.

ollama pull llama3.2:1b

Wait for the download to finish, then start a chat:

ollama run llama3.2:1b

Try a short prompt:

Explain what a Linux kernel does in two sentences.

You should get a short answer and a fresh prompt. The first reply can feel slow on CPU. Type /bye when you are done.

Which model should you choose?

Pick by RAM, not by hype. A model that does not fit in memory will crawl:

Model Size RAM needed Best for
qwen3:0.6b 523 MB 2 to 4 GB Quick smoke test
llama3.2:1b 1.3 GB 4 GB First CPU test
llama3.2:3b About 2 GB 8 GB Normal VPS
llama3.1:8b About 4.7 GB 16 GB More capable chat

On 4 GB of RAM, stick with qwen3:0.6b or llama3.2:1b. On 8 GB, llama3.2:3b is the best balance, and on 16 GB, llama3.1:8b gives noticeably better answers. With a graphics card, GPU acceleration kicks in on its own: NVIDIA cards use CUDA, AMD ROCm is supported on Linux too, and VRAM decides how large a model fits. Without a card, CPU inference still works.

ollama list shows your models, ollama rm <model> deletes one, and ollama ps shows which are loaded. For another local model, see our guide to install DeepSeek on Ubuntu 24.04, and for a web interface, see our guide to install Open WebUI on Ubuntu 24.04.

Step 5: Try the Ollama API on Ubuntu 26.04 with curl

Chatting in the terminal is fun for a day. The API is what makes Ollama useful:

curl http://127.0.0.1:11434/api/generate -d '{
  "model": "llama3.2:1b",
  "prompt": "Write a one-line summary of Ubuntu 26.04 LTS.",
  "stream": false
}'

You should get back a JSON object, with the answer in its response field. A connection error means the service is not listening on 127.0.0.1:11434, so go back to Step 3. The same localhost API also speaks the OpenAI-compatible API at /v1, so OpenAI scripts need only a base URL change.

Install Methods Compared

Method When to choose it Downsides
Official script (recommended): curl -fsSL https://ollama.com/install.sh | sh Most Ubuntu 26.04 installs, VPS and desktop Version is whatever is current
Manual tarball: extract to /usr/local, create the service by hand Specific version, offline install, or full control More steps, done by hand
Docker: official image, volume for models, port 11434 mapped You already run Docker and want isolation Extra overhead, GPU setup is harder

To install Ollama with Docker on Ubuntu 26.04, run the official image with a volume for your models and port 11434 mapped:

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

That keeps Ollama separate from the rest of the system. Add --gpus=all only with an NVIDIA card and the container toolkit installed.

Letting another computer reach Ollama, safely

Out of the box, Ollama only listens on 127.0.0.1, so only your own machine can reach it. Leave it that way unless another trusted machine needs it, and use a systemd override, which a future update will not overwrite:

sudo systemctl edit ollama

Add this, then reload and restart:

[Service]
Environment="OLLAMA_HOST=0.0.0.0"
sudo systemctl daemon-reload
sudo systemctl restart ollama

Now Ollama listens on every interface, and that changes the risk: Ollama has no built-in login, so anyone who can reach port 11434 can use your models and your CPU. Never put that port on the open internet. Allow only trusted IPs, or use a reverse proxy with authentication or a VPN.

Fix Ollama on Ubuntu 26.04 when something goes wrong

1. The installer fails, or it complains about zstd

What you see: the script stops early, often with a message about zstd. Why it happens: current installers need zstd to extract the binary. Fix:

sudo apt update && sudo apt install -y curl zstd ca-certificates
curl -fsSL https://ollama.com/install.sh | sh

2. ollama: command not found, or the service is not running

What you see: the shell cannot find ollama, or the service is not active. Why it happens: the binary is in /usr/local/bin, and either the install never finished, or your shell has not picked up the new path. Check it with ls -l /usr/local/bin/ollama and /usr/local/bin/ollama --version. If the binary is there but the plain command fails, open a new terminal or run hash -r. If it is missing, run the installer again. If the service is down, check the logs:

systemctl status ollama --no-pager
sudo journalctl -u ollama --no-pager | tail -50
sudo systemctl start ollama

3. Connection refused on 127.0.0.1:11434

What you see: curl says connection refused. Why it happens: the service is not running, or it listens on a different address. Check whether it is active:

systemctl is-active ollama
curl http://127.0.0.1:11434/api/version

If nothing answers, restart it with sudo systemctl restart ollama, and run sudo systemctl daemon-reload first if you changed OLLAMA_HOST.

4. A model pull is slow, or it fails with a disk error

What you see: the pull crawls, stops, or complains about disk space. Why it happens: a slow network makes a big download feel broken, and a full disk stops it cold. Let a slow pull finish, and run it again if it stops early. For disk trouble, check df -h /, delete a model with ollama rm <model>, or clean up with sudo apt autoremove.

5. A warning about no NVIDIA or AMD GPU

What you see: Ollama warns that no NVIDIA or AMD GPU was found. Why it happens: there is no GPU in the machine, so Ollama falls back to CPU inference. That is not an error. CPU inference is slower than GPU acceleration, and that gap is normal.

FAQ

Can I install Ollama on Ubuntu 26.04 without a GPU?

Yes. Ollama runs in CPU-only mode, and the small models here were picked for CPU.

How much RAM do I need to run AI locally with Ollama?

At least 8 GB of RAM and 10 GB of free disk: llama3.2:1b needs about 4 GB, a 3B model about 8 GB, and an 8B model about 16 GB.

Where are Ollama models stored?

In /usr/share/ollama/.ollama/models. Use ollama list to see what you have and ollama rm <model> to delete one. Do not delete files in that folder by hand.

Can I use Ollama from another computer?

Yes, if you change the listen address on purpose. Set OLLAMA_HOST=0.0.0.0 in a systemd override, reload systemd, and restart Ollama, then protect port 11434 with a firewall, a VPN, or a reverse proxy. Never expose it directly to the internet.

How to update Ollama on Ubuntu?

Run the official install script again. It downloads the current release and replaces the binary in /usr/local/bin, while keeping your models, then run ollama --version to confirm.

How to uninstall Ollama on Ubuntu 26.04

Removing Ollama is the reverse of installing it: stop and disable the service, then delete the binary and the service file:

sudo systemctl stop ollama
sudo systemctl disable ollama
sudo rm /usr/local/bin/ollama
sudo rm /etc/systemd/system/ollama.service
sudo systemctl daemon-reload

That leaves your downloaded models behind, in /usr/share/ollama/.ollama/models. Delete that folder too only if you will not reinstall:

sudo rm -rf /usr/share/ollama

The ollama system user can stay. It does nothing once the service file is gone.

Conclusion

That is how to install Ollama on Ubuntu 26.04 and get a local LLM answering in your terminal. You have the Ollama service running, a small model pulled, and the API tested, all without sending a prompt to the cloud. From here, try a larger model that fits your RAM, or give it a front end: see our guide to install Open WebUI on Ubuntu 24.04, and for another local model, see our guide to install DeepSeek on Ubuntu 24.04.

Last tested: 4 December 2026, on Ubuntu 26.04 LTS, Ollama 0.40.x line. The installer downloads the current release, so the version you get may be newer than the versions in recent tested guides: 0.40.15 and 0.40.16 tested on 16 November 2026 on Ubuntu 26.04.1, and 0.40.19 tested on 29 November 2026. Commands here follow the official installer and those recent tested guides. Run ollama --version after install to confirm the version on your own machine.

Natasha is a server sysadmin with 6+ years of experience in servers, operating systems, and coding. They focus on infrastructure stability, security, and automation, and enjoy sharing practical tips on Linux and server administration.

Related Posts