Tutorials 11 min read

Installing Ollama with Docker on a Mini-PC in 2026: Models, API and Limits

Install Ollama in Docker on a Linux mini-PC, download a first model, query the API on port 11434, secure it, and know what an Intel N100 with 16 GB of RAM can run without a GPU.

S By Selfhostr · no sponsored content
Installing Ollama with Docker on a Mini-PC in 2026: Models, API and Limits
This article may contain affiliate links (no extra cost to you, it funds the site). As an Amazon Associate, Selfhostr earns from qualifying purchases. See the disclosure.

👍 What we like

  • Prompts and answers stay on your network: no cloud service, no API costs.
  • One docker run command is enough, and the volume keeps your models when you recreate the container for an update.
  • The REST API also serves Open WebUI or Home Assistant from another machine on the network.

👎 What to watch

  • Without a dedicated GPU, everything runs on the CPU: a 7B or 8B model answers more slowly than a 3B one.
  • Memory is the hard limit: a Mini S12 Pro tops out at 16 GB, in a single slot.
  • The API has no authentication: opening it to the network requires filtering or a reverse proxy.
📑 Contents ▾

An Intel N100 mini-PC with 16 GB of RAM can run Ollama, but without a dedicated GPU everything is computed on the processor: a small 3-billion-parameter model such as llama3.2:3b is the right starting point, and a 7B or 8B model is possible but slower. Installation takes one Docker command, models are kept in a volume and the REST API answers on port 11434. The one real trap: this API has no authentication, so decide who can reach it before you open it to the network.

This tutorial follows an installation on Linux (Ubuntu 20.04 or later, or Debian, using apt), the most common setup for a mini-PC that stays on in a corner. The mini-PC specifications quoted come from manufacturer datasheets and hardware databases: Selfhostr has not measured them.

What a mini-PC can run

Four characteristics decide what you will get out of Ollama on a small machine.

RAM. The model has to fit in memory to answer. Count at least 8 GB for a model with 7 or 8 billion parameters (7B-8B), on top of what the system and your other containers use. This is the hardest limit on a mini-PC: the Beelink Mini S12 Pro accepts 16 GB at most, as DDR4 3200 in a single slot, according to the datasheet.

The processor. Without a dedicated graphics card, inference runs on the CPU. The Intel N100 has 4 cores and 4 threads with a 6 W TDP according to its datasheet: enough for a 3B model, but every answer keeps all cores busy while it is being written.

Storage. Plan for 5 to 10 GB of free space per model. Models pile up quickly once you try several; on the S12 Pro, the M.2 2280 slot (PCIe 3.0 x1) and the 2.5-inch SATA bay let you dedicate a second drive to them.

Heat. A long generation pushes the processor to full load. In a compact case, keep an eye on the temperature (see troubleshooting below) and leave some air around the machine.

Model sizeExample from the Ollama libraryOn an N100 with 16 GB
1Bllama3.2:1bthe lightest, a fallback when memory runs short
3Bllama3.2:3bgood starting point
7B-8B7B or 8B models from ollama.com/librarypossible but slower, 8 GB of RAM minimum

Within these limits, a mini-PC running Ollama does real work: generating and summarizing text, answering questions, helping with code. Above all it becomes a server for the rest of the network: Open WebUI, installed on another machine, provides a chat interface connected to its API, and Home Assistant can rely on the same API; to install Home Assistant on this kind of machine, see our tutorial on Home Assistant on a mini-PC. A script can also query it directly with curl, as in step 5.

Which mini-PC for Ollama

Beelink Mini S12 Pro. Intel N100 (Alder Lake-N architecture, 4 cores, 4 threads, 6 W TDP), up to 16 GB of DDR4 3200 in a single slot, one M.2 2280 PCIe 3.0 x1 slot and a 2.5-inch SATA bay, with a 36 W external power adapter. This is the machine this tutorial targets: it handles 1B to 3B models and, with 16 GB, leaves room for a 7B or 8B model if you are willing to wait for the answer. It is often used for Home Assistant or Proxmox, and Ollama can share the machine with them as long as memory allows.

Beelink ME mini. Intel N150 processor, 64 GB of eMMC for the system and five M.2 2280 PCIe 3.0 x1 slots (up to 4 TB each), with a built-in power supply. Beelink’s datasheet states that it does not accept SATA SSDs: NVMe only. It is designed as a small all-SSD NAS (Beelink lists TrueNAS and Proxmox among compatible systems). For Ollama, its appeal is keeping many models on the machine that already stores your files. The amount of RAM does not appear in the datasheet we recorded: check it before buying, because it sets the size of the models you can use.

Beelink SER8. For everyday use of 7B-8B models, it offers more headroom: a Ryzen 7 8845HS with 8 cores and 16 threads (3.8 to 5.1 GHz), DDR5 5600 memory (Beelink’s datasheet lists up to 256 GB), two M.2 2280 PCIe 4.0 x4 slots and a Radeon 780M. The trade-off is a stated TDP of 65 W, versus 6 W for the N100, worth weighing for a machine that is always on. Note that the command in this tutorial gives the container access to no GPU at all, so computation runs on the CPU, SER8 included.

To compare other AI-oriented mini-PCs, with or without an NPU, see mini-PCs for local AI. For larger models, the question becomes one of a graphics card: see building a local AI server with a GPU and Ollama.

Installing Ollama with Docker

1. Prepare the system and Docker

Update the system, then check whether Docker is already installed:

sudo apt update && sudo apt upgrade -y
docker --version

If it is not, install it from the distribution’s packages (or follow Docker’s official instructions), enable the service and add your user to the docker group so you no longer need sudo for every command:

sudo apt install docker.io docker-compose -y
sudo systemctl enable docker --now
sudo usermod -aG docker $USER

The group change only applies to a new session: log out or run newgrp docker, then test:

docker run hello-world

2. Create the model volume

Ollama stores its models in /root/.ollama inside the container. A named Docker volume keeps them when the container is removed, which happens at every update:

docker volume create ollama
docker volume ls

The named volume needs no permission tweaks: the container runs as root. If you prefer a host folder, for example on the second drive set aside for models, create it (sudo mkdir -p /opt/ollama) and replace -v ollama:/root/.ollama with -v /opt/ollama:/root/.ollama in the commands that follow; no change of ownership is needed.

3. Launch the container

docker run -d \
  -v ollama:/root/.ollama \
  -p 11434:11434 \
  --name ollama \
  --restart unless-stopped \
  -e OLLAMA_HOST=0.0.0.0 \
  ollama/ollama
  • -d runs the container in the background;
  • -v ollama:/root/.ollama mounts the volume from step 2;
  • -p 11434:11434 publishes the API port on all of the mini-PC’s interfaces. If only the machine itself needs access, write -p 127.0.0.1:11434:11434 (see the security section);
  • --restart unless-stopped restarts Ollama at boot, unless you stopped it yourself;
  • -e OLLAMA_HOST=0.0.0.0 makes Ollama listen on all of the container’s interfaces, which the published port needs in order to answer.

Check that the container is running and that Ollama responds. Ollama lives inside the container, so go through docker exec:

docker ps
docker exec ollama ollama --version

If no version is shown, the container logs will tell you why:

docker logs ollama

4. Download and run a first model

The ollama.com/library catalog offers pre-quantized models. On an N100 with 16 GB and no dedicated GPU, start with a 3B model:

docker exec ollama ollama pull llama3.2:3b
docker exec ollama ollama list

Ask it a first question from the command line:

docker exec -it ollama ollama run llama3.2:3b "What is the capital of France?"

A correct answer with no error message confirms that the model fits in memory. If loading fails for lack of RAM, switch to llama3.2:1b.

5. Query the REST API

This is the API that Open WebUI, Home Assistant or your scripts will use:

curl -X POST http://localhost:11434/api/generate -d '{
  "model": "llama3.2:3b",
  "prompt": "What is the capital of France?",
  "stream": false
}'

The response is a JSON object whose response field holds the generated text; with "stream": false, it arrives in a single block instead of a stream of chunks. From another machine on the network, replace localhost with the mini-PC’s IP address (for example 192.168.1.50), provided the port is published on all interfaces.

6. Switch to Docker Compose and cap memory

A Compose file keeps the configuration in one place and lets you cap the container’s memory, so that an oversized model does not starve the rest of the mini-PC. Create a ~/ollama folder and put this docker-compose.yml file in it:

version: "2.4"

services:
  ollama:
    image: ollama/ollama
    container_name: ollama
    restart: unless-stopped
    volumes:
      - ollama:/root/.ollama
    ports:
      - "11434:11434"
    environment:
      - OLLAMA_HOST=0.0.0.0
    mem_limit: 12G

volumes:
  ollama:
    external: true

On a 16 GB machine, mem_limit: 12G leaves room for the system and other services; a 16G limit would limit nothing. There is no CPU limit either: the N100 only has 4 cores, and a cap of 4 would take nothing away. external: true tells Compose to use the volume created in step 2, with the models you already downloaded. If you chose a host folder in step 2, write - /opt/ollama:/root/.ollama in the service’s volumes section and remove the final volumes: block; that folder is then what you need to back up, rather than /var/lib/docker/volumes/ollama/_data. The version: "2.4" line is there for the older docker-compose releases shipped by Linux distributions, some of which only accept mem_limit with this file format; the newer Compose plugin ignores it with a mere warning. The earlier version of this tutorial put the limits in a deploy.resources section, which the docker-compose installed in step 1 ignores: with it the limit was not applied, and its 16G value limited nothing on a 16 GB machine anyway.

Remove the container from step 3 (otherwise the name ollama is already taken), then relaunch with Compose and check the limit:

mkdir -p ~/ollama && cd ~/ollama
# place the docker-compose.yml file here
docker stop ollama && docker rm ollama
docker-compose up -d
docker stats --no-stream ollama

The MEM USAGE / LIMIT column of docker stats should show the 12 GiB limit. With the newer Compose plugin, the command is written docker compose up -d, without the hyphen.

Securing access to the API

The Ollama server has no authentication: any machine that can reach port 11434 can use the API, and therefore your models and your processor. Three cases:

  • Use from the mini-PC only: publish the port locally, -p 127.0.0.1:11434:11434 with docker run, or "127.0.0.1:11434:11434" in the ports section of the Compose file.
  • Use from a few machines on the network: restrict access to trusted addresses only. Beware, ports published by Docker bypass ufw: filtering has to happen in the iptables DOCKER-USER chain.
  • Wider access: put Ollama behind a reverse proxy with authentication, as in our tutorial on an HTTPS reverse proxy with Caddy and Docker.

The OLLAMA_ORIGINS variable only controls CORS, that is, requests made from a web page in a browser: it is not access control, and it should never be set to *. If a web interface needs to call the API from the browser, allow its single origin by adding the -e OLLAMA_ORIGINS=http://<interface-address> option to the docker run command (or OLLAMA_ORIGINS=... in the environment section of the Compose file). Write the interface’s exact origin: scheme, address, and port if it is not the default one.

Updating and backing up

Models live in the volume, not in the container: you can recreate the container with a newer image without downloading anything again. With docker run, reuse exactly the options from your first launch: if you published the port on 127.0.0.1 or added OLLAMA_ORIGINS, put them back in this command:

docker stop ollama
docker rm ollama
docker pull ollama/ollama
docker run -d \
  -v ollama:/root/.ollama \
  -p 11434:11434 \
  --name ollama \
  --restart unless-stopped \
  -e OLLAMA_HOST=0.0.0.0 \
  ollama/ollama

If you switched to Compose, stay with it, otherwise the memory limit disappears: from ~/ollama, run docker-compose pull then docker-compose up -d.

As for backups, nothing here is irreplaceable: a lost model can be downloaded again with ollama pull. Backing up the volume only saves you from fetching everything again, which matters once you have collected several models of 5 to 10 GB. Locate the volume, then copy its contents:

docker volume inspect ollama
sudo rsync -av /var/lib/docker/volumes/ollama/_data/ /path/to/backup/ollama/

Troubleshooting

The API does not respond. Check that the container is running (docker ps) and that the port is published (docker inspect ollama). If you overrode OLLAMA_HOST, it must be 0.0.0.0. If the port is published on 127.0.0.1, it only answers from the mini-PC itself: that is intended.

The model does not load or stops midway. The mini-PC, or the mem_limit cap, does not have enough memory for this model. Switch to a smaller model (llama3.2:1b), stop other services, or raise the limit if the machine has headroom.

Ollama takes all the CPU or all the memory. Full CPU load during a generation is normal on an N100. For memory, switch to the Compose file from step 6 and its mem_limit, then relaunch with docker-compose up -d.

Answers slow down or stop after a while. Memory is saturated or the mini-PC has reached its thermal limit. Check the temperature:

sudo apt install lm-sensors && sensors

Clear the vents, keep the machine away from heat sources and, if needed, switch to a smaller model or space out your requests.

Key facts

11434
REST API port
ollama/ollama
Official Docker image
llama3.2:3b
First model for an N100
8 GB minimum
RAM for a 7B-8B model

Our picks

Affiliate links · same price for you
Intel N100, 16 GB of RAM maximum
Beelink Mini S12 Pro

Beelink Mini S12 Pro

View on Amazon

Amazon · price and availability on the listing

Intel N150, five M.2 slots for your models
Beelink ME mini

Beelink ME mini

View on Amazon

Amazon · price and availability on the listing

Ryzen 7 8845HS and DDR5 for 7B-8B models
Beelink SER8

Beelink SER8

View on Amazon

Amazon · price and availability on the listing

See all our recommended gear in the shop.

Tags: ollamallmlocalminipcself-hosting

Related

Tutorials

Automate the opening of a connected garage with Home Assistant in 2026

Connect a motorized garage door to Home Assistant: a Zigbee contact sensor to know its state, a relay module to operate it, and careful automations (alert when it stays open, light at night).

Read
Tutorials

Configure Dockge to manage your Docker containers in 2026

Learn how to install and configure Dockge, a lightweight and self-hosted Docker Compose stack manager, perfect for homelabs and self-hosting.

Read
Tutorials

Setting Up a Local AI Server in 2026: GPU Selection and Ollama

Learn how to set up a local AI server in 2026 with the right GPU choice, required hardware configuration, and full installation of Ollama. A step-by-step guide for self-hosting enthusiasts.

Read