Skip to main content
To run Ollama on a VPS, install it with curl -fsSL https://ollama.com/install.sh | sh, then chat with a small model using ollama run llama3.2:3b. Ollama listens only on 127.0.0.1:11434. For a web chat, run Open WebUI in Docker with --network=host and reach it through an SSH tunnel or a reverse proxy. Without a GPU, answers are slow, so use small models.

Before you start

  • Ollama downloads and runs open large language models (LLMs) on your own server. Open WebUI is a web chat interface for it.
  • Expect CPU-only speed. On a VPS without a GPU, Ollama runs the model in system memory on the CPU. Replies arrive word by word, far slower than on a GPU, and long answers can take minutes. Larger models are slower still. This guide assumes a CPU-only server.
  • Pick small models. The model must fit in free RAM with room for the operating system and the conversation (context). Use the table below.
  • Install Docker if you want Open WebUI.

Which model should I use on a CPU-only VPS?

Sizes are from the Ollama library on 4 November 2026. Models of 7B parameters and more work only with plenty of RAM and patience.

How to install Ollama

1

Run the install script

The script installs Ollama and sets it up as the ollama systemd service.
2

Check it is running

3

Download and chat with a model

The first run downloads the model. Type a question and press Enter. Type /bye to leave.

How to check it worked

ollama ps lists the loaded model; 100% CPU in the PROCESSOR column means it runs fully in system memory. The curl call returns a JSON answer.

How to add Open WebUI

1

Create a secret key

Copy the output. Keep it the same every time you recreate the container, or everyone gets logged out.
2

Start Open WebUI

--network=host lets the container reach Ollama on 127.0.0.1, so Ollama never needs to listen publicly. Open WebUI then listens on port 8080 of the server.
3

Open it through an SSH tunnel

On your own PC, run:
Then open http://localhost:8080 in your browser.
4

Create the admin account

The first account you create becomes the administrator, and sign-up closes after it. Create it straight away.
With --network=host, port 8080 is a normal server port, so your firewall controls it. Keep ufw or firewalld active and don’t allow 8080 publicly. To use Open WebUI on a domain instead of a tunnel, put Nginx as a reverse proxy with HTTPS in front of http://127.0.0.1:8080. Don’t set OLLAMA_HOST=0.0.0.0 unless a firewall blocks port 11434; the Ollama API has no login.

How to manage Ollama

Models are stored in /usr/share/ollama/.ollama/models. Check free space with df -h before pulling large models. To store them elsewhere, set OLLAMA_MODELS with sudo systemctl edit ollama and give the ollama user access to that folder.

Frequently asked questions

Can I run Ollama on a VPS without a GPU?

Yes. Ollama runs on the CPU and system memory when there’s no supported GPU. It works well for small models and light use, but it is much slower than a GPU.

Why is Ollama so slow on my VPS?

Without a GPU, every word is computed on the CPU. Use a smaller model, keep questions short, and avoid running other heavy jobs at the same time. Check load with htop.

How long does a model stay in memory?

5 minutes after the last request by default. Set OLLAMA_KEEP_ALIVE with sudo systemctl edit ollama to change it, or 0 to unload straight away.

Why does Ollama get killed or the server freeze?

The model plus context needed more RAM than was free, so Linux ended the process. Use a smaller model, add swap as a buffer, and see fix out-of-memory killed processes.

VPS and dedicated server guides

Every guide in this section.

Install Docker

Needed for Open WebUI.

Check memory usage

See if a model fits in RAM.

Nginx reverse proxy

Serve Open WebUI on your domain.

Benchmark your VPS

Measure CPU and memory speed.

Checked against the official Ollama Linux docs, Ollama FAQ and Open WebUI docs on 4 November 2026. Model names and sizes change as new models are released.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026