VPS Provider

Ollama on your own server: Docker, RAM and cost without a GPU

Published

Ollama runs on a server without a GPU: the model sits in RAM and the CPU does the work, so the first thing to size is memory, at least the model's download size plus room for the context. An 8B model such as Llama 3.1 8B (4.9 GB) fits on a dedicated server with 16 GB, which costs $39 a month on our price list, and a 27B to 32B model needs a 64 GB server at $149 a month.

The facts about Ollama, its models and Open WebUI come from their documentation and GitHub pages as we read them on 2 December 2026. Our prices are from our price list on the same day, per month and without tax. We sell servers without GPUs, and this article says where that is a problem.

What a CPU-only Ollama server is good for

Without a GPU, answers come out more slowly, so a CPU server suits work where a person is not waiting on every word, or where few people use it at once:

We have not measured token speeds on our servers, so we will not quote any of our own. One published test, from LearnWithHasan in August 2026 on DigitalOcean, ran llama3.1:8b at 2.8 tokens a second on 4 shared vCPUs with 8 GB, 5.4 on 8 shared vCPUs with 16 GB, 6.8 on 8 dedicated vCPUs, and 63.2 on an RTX 4000 Ada GPU. The same guide notes that CPU inference is limited by memory bandwidth more than by the number of cores. If you need fast answers from large models for many users at once, rent a GPU: that is where a GPU wins, and we do not offer one.

How much RAM each model needs

The download size on the Ollama library is the floor: the whole model has to fit in memory. The context window and parallel requests add more on top. Ollama's FAQ says the default context is 4,096 tokens, that you raise it with OLLAMA_CONTEXT_LENGTH, and that serving parallel requests multiplies the context and needs more memory. The system and your other services need a few GB too. These server sizes are our suggestion, with that headroom included.

Models (download size)Server we would usePer month
Llama 3.2 3B (2.0 GB), Gemma 3 4B (3.4 GB)VPS, 4 vCPU, 8 GB, 80 GB NVMe$23.48
Llama 3.1 8B (4.9 GB), Qwen3 8B (5.2 GB)Dedicated Core i3-1315U, 8 threads, 16 GB DDR5, 256 GB NVMe$39
Gemma 3 12B (8.2 GB), Qwen3 14B (9.3 GB), gpt-oss 20B (14 GB)Dedicated Ryzen 7 6800H, 16 threads, 32 GB DDR5, 256 GB NVMe$79
Gemma 3 27B (17 GB), Qwen3 30B (19 GB), Qwen3 32B (20 GB)Dedicated Ryzen 9 7945HX, 32 threads, 64 GB DDR5, 512 GB NVMe$149
Llama 3.1 70B (43 GB), gpt-oss 120B (65 GB)Dedicated Xeon Gold 6731P, 128 GB DDR5, 1 TB NVMe$659

A VPS with 4 vCPU and 16 GB costs $33.64 a month, less than the $39 dedicated server, but the vCPUs of our VPS are shared. A language model keeps every core busy for as long as it writes, so for anything above the smallest models we would take dedicated cores.

Ollama's FAQ also says a model stays in memory for 5 minutes after the last request and is then unloaded, so the next request waits while it loads again from disk. If the server only runs Ollama and the model fits, set OLLAMA_KEEP_ALIVE to -1 to keep it loaded. On CPU, Ollama keeps up to 3 models loaded at once, which only works if all of them fit in RAM.

Install Ollama with Docker

The command in Ollama's Docker documentation for a CPU-only machine is:

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

Then download and start a model inside the container:

docker exec -it ollama ollama run llama3.2

The latest Ollama release on GitHub was v0.40.19, from 26 November 2026. The models live in the volume named ollama, so they survive when you update the container.

Port 11434 and the firewall

This is the part most guides skip. Ollama's FAQ says the server listens on 127.0.0.1, port 11434, by default, and its documentation describes no login for the API: anyone who can reach that port can run your models and download new ones.

Installed directly on Linux, Ollama stays on 127.0.0.1 unless you change OLLAMA_HOST, so it is private by default. The Docker command above is not. We deliver every server with the firewall on and only SSH open, but Docker's documentation says traffic to a published container port is routed before ufw's rules apply. With -p 11434:11434, the API answers anyone on the internet, whatever ufw says.

Publish the port on the loopback address instead:

-p 127.0.0.1:11434:11434

Apps on the same server can still reach it. From your own computer, open an SSH tunnel and use http://localhost:11434 as if Ollama ran locally:

ssh -L 11434:127.0.0.1:11434 root@YOUR-SERVER-IP

If other machines must call the API, put a reverse proxy with authentication in front of it. Ollama's FAQ has an Nginx example that passes requests to localhost:11434.

Ollama and Open WebUI with Docker Compose

Open WebUI is the usual chat interface for Ollama. Its quick start maps port 3000 on the server to 8080 in the container and keeps its data in /app/backend/data. This Compose file runs both, with neither port reachable from outside:

services:
  ollama:
    image: ollama/ollama
    volumes:
      - ollama:/root/.ollama
    ports:
      - "127.0.0.1:11434:11434"
    environment:
      - OLLAMA_KEEP_ALIVE=-1
    restart: unless-stopped
  open-webui:
    image: ghcr.io/open-webui/open-webui:v0.13.5
    depends_on:
      - ollama
    environment:
      - OLLAMA_BASE_URL=http://ollama:11434
      - WEBUI_SECRET_KEY=replace-with-a-long-random-string
    volumes:
      - open-webui:/app/backend/data
    ports:
      - "127.0.0.1:3000:8080"
    restart: unless-stopped
volumes:
  ollama:
  open-webui:

Start it with docker compose up -d, open a tunnel with ssh -L 3000:127.0.0.1:3000 root@YOUR-SERVER-IP, and visit http://localhost:3000. Version 0.13.5 was the latest Open WebUI release on GitHub when we wrote this; its documentation recommends pinning a version in production rather than using the main tag.

Check the licence before you rebrand it. Open WebUI's licence page says code up to v0.6.5 is BSD-3-Clause, and that from v0.6.6 you may not remove or change the Open WebUI branding unless you have 50 or fewer users in 30 days, written permission, or an enterprise licence. The same page says it is not an OSI-approved open source licence.

Managed Ollama hosting or your own server

Some hosts sell Ollama ready to use. On 2 December 2026 Hivelocity's Ollama page listed CPU-only plans from $65 a month for a virtual server with 24 GB, and dedicated servers from $249 to $880 a month with 64 to 512 GB of RAM, with Ollama, Open WebUI and Llama 3.1 8B already installed. Our 64 GB dedicated server is $149 a month, but you get a clean Linux server and run the two commands above yourself. If you would rather not touch Docker or the firewall, a pre-installed plan is the simpler choice.

Questions

Can Ollama run without a GPU?

Yes. Ollama's Docker documentation has a CPU-only command, and the model runs from system RAM. It is slower than on a GPU, so it suits small models, a few users and batch jobs better than a busy public chatbot.

How much RAM do I need for Ollama?

At least the model's download size plus room for the context and the system. Llama 3.1 8B is 4.9 GB, so we would use 16 GB; a 27B to 32B model is 17 to 20 GB, so we would use 64 GB; Llama 3.1 70B is 43 GB and needs a 128 GB server.

What port does Ollama use?

11434. By default Ollama listens only on 127.0.0.1. With Docker, publish it as 127.0.0.1:11434:11434, because a port published by Docker gets past ufw.

Does the Ollama API have authentication?

Ollama's documentation describes no login for the API. Keep it on 127.0.0.1 and reach it through an SSH tunnel, or put a reverse proxy with authentication in front of it.

Sources, read on 2 December 2026: Ollama Docker image, Ollama FAQ, Ollama on Linux, Ollama releases, Ollama model library, Open WebUI quick start, Open WebUI licence, Open WebUI releases, Docker and ufw, LearnWithHasan Ollama benchmark, Hivelocity Ollama hosting.

Written and checked by the VPS Provider team.