[GH-ISSUE #21912] feat: Download LLM models to a mapped bind mount instead of inside Docker container #90352

Closed
opened 2026-05-15 15:35:54 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @Ratasan64 on GitHub (Feb 27, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21912

Check Existing Issues

  • I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Verify Feature Scope

  • I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.

Problem Description

All downloaded LLMs happen to be inside the Docker container, and is not stored on a bind mount set by YAML file.

Desired Solution you'd like

When pulling via openwebui, it'd be great to have the models stored on a central place so they don't get removed after every docker restart, this would also help to share the models with other dual boot operating systems too.

Alternatives Considered

No response

Additional Context

I'll leave my YAML's here in case that would be helpful.

For OpenwebUI hosted on PopOS NUC:
version: "3.9"

services:
  open-webui:
    container_name: open-webui
    image: ghcr.io/open-webui/open-webui:main
    user: "1000:1000"
    restart: unless-stopped
    ports:
      - "3000:8080"
    environment:
      - TZ=Europe/Amsterdam
      - PUID=1000
      - PGID=1000
      - LOG_LEVEL=WARNING
      - TRANSFORMERS_OFFLINE=1
      - HF_HUB_OFFLINE=0
      - OLLAMA_BASE_URL=http://192.168.1.222:11434 # This points to my 4090 Debian server
      - WEBUI_AUTH=False
      - WEBUI_SECRET_KEY=xxxxxxxxxxxxxxxx
    volumes:
      - /home/jaffa/docker/openwebui:/app/backend/data
    extra_hosts:
      - "host.docker.internal:host-gateway"

For Ollama, hosted on NUC:

version: "3.9"

services:
  ollama:
    container_name: ollama
    image: ollama/ollama
    user: "1000:1000"
    restart: unless-stopped
    ports:
      - "11434:11434"
    environment:
      - TZ=Europe/Amsterdam
      - PUID=1000
      - PGID=1000
      - OLLAMA_HOME=/root/.ollama
    volumes:
      - /mnt/SSD_Mediadisk/docker/ollama:/root/.ollama # Here is where I'd wish the models would appear, but they don't

Some additional findings below, I found the models inside the container itself, and not on the bind mount:

jaffa@jaffa-debian:~$ docker exec -it ollama bash
ubuntu@6fa00848fb8b:/$ cd ~/.ollama
ubuntu@6fa00848fb8b:~/.ollama$ ls -R
.:
id_ed25519  id_ed25519.pub  models

./models:
blobs  manifests

./models/blobs:
sha256-1eee6953530837b2b17d61a4e6f71a5aa31c9714cfcf3cb141aa5c1972b5116b  sha256-9640c2212a51f7df5840f7929448afa17cb33fbb173cf15e1d74883e932a3466
sha256-43070e2d4e532684de521b885f385d0841030efa2b1a20bafb76133a5e1379c1  sha256-9ca2294ee9882e2c810ed17652c6189061909b5425ef3d4af46d350bae3f3ebd
sha256-4b01fbe300dafc6665b27d5c74be8eb63a59bc9043b14ab364d06eebbb15a335  sha256-d8ba2f9a17b3bbdeb5690efaa409b3fcb0b56296a777c7a69c78aa33bbddf182
sha256-5041ba4278429fe475782b889471b5ff065a6cce5c3a539bd61d1e457f1961de  sha256-e507c18e251703516e5c7e71e7b0a2c51abbdd2a294a59681ef4586a3f170b49
sha256-62fbfd9ed093d6e5ac83190c86eec5369317919f4b149598d2dbb38900e9faef  sha256-e7b273f9636059a689e3ddcab3716e4f65abe0143ac978e46673ad0e52d09efb
sha256-64e1b2889b7892e6bbe7a7ed5bfe6ff793c61f9d584345f8f41cf9f5cb30a369  sha256-f02dd72bb2423204352eabc5637b44d79d17f109fdb510a7c51455892aa2d216
sha256-776beb3adb235076157cfea408b8ea2a2d25eae99d7f5da997f607f6b69fa0fa  sha256-f60356777647e927149cbd4c0ec1314a90caba9400ad205ddc4ce47ed001c2d6
sha256-8b586b146d99262cc7bf20f47faa5507dd5c8476967be9e03822262361204637  sha256-fa6710a93d78da62641e192361344be7a8c0a1c3737f139cf89f20ce1626b99c

./models/manifests:
registry.ollama.ai

./models/manifests/registry.ollama.ai:
library

./models/manifests/registry.ollama.ai/library:
dolphin-mixtral  dolphin3  gpt-oss

./models/manifests/registry.ollama.ai/library/dolphin-mixtral:
8x7b

./models/manifests/registry.ollama.ai/library/dolphin3:
8b

./models/manifests/registry.ollama.ai/library/gpt-oss:
20b
ubuntu@6fa00848fb8b:~/.ollama$ cd ..
ubuntu@6fa00848fb8b:~$ ls
ubuntu@6fa00848fb8b:~$ ls -R
.:
ubuntu@6fa00848fb8b:~$ cd ~/.ollama
ubuntu@6fa00848fb8b:~/rm -rf ~/.config/tidal-hifi:~$ rm -rf ~/.config/tidal-hifi

docker exec -it ollama bash -c 'echo $HOME && ls -al $HOME/.ollama | head -n 20'
/home/ubuntu
total 20
drwxr-xr-x 3 ubuntu ubuntu 4096 Feb 26 23:53 .
drwxr-x--- 1 ubuntu ubuntu 4096 Feb 26 23:53 ..
-rw------- 1 ubuntu ubuntu  387 Feb 26 23:53 id_ed25519
-rw-r--r-- 1 ubuntu ubuntu   81 Feb 26 23:53 id_ed25519.pub
drwxr-xr-x 4 ubuntu ubuntu 4096 Feb 27 00:52 models
Originally created by @Ratasan64 on GitHub (Feb 27, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/21912 ### Check Existing Issues - [x] I have searched for all existing **open AND closed** issues and discussions for similar requests. I have found none that is comparable to my request. ### Verify Feature Scope - [x] I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions. ### Problem Description All downloaded LLMs happen to be inside the Docker container, and is not stored on a bind mount set by YAML file. ### Desired Solution you'd like When pulling via openwebui, it'd be great to have the models stored on a central place so they don't get removed after every docker restart, this would also help to share the models with other dual boot operating systems too. ### Alternatives Considered _No response_ ### Additional Context I'll leave my YAML's here in case that would be helpful. For OpenwebUI hosted on PopOS NUC: version: "3.9" ``` services: open-webui: container_name: open-webui image: ghcr.io/open-webui/open-webui:main user: "1000:1000" restart: unless-stopped ports: - "3000:8080" environment: - TZ=Europe/Amsterdam - PUID=1000 - PGID=1000 - LOG_LEVEL=WARNING - TRANSFORMERS_OFFLINE=1 - HF_HUB_OFFLINE=0 - OLLAMA_BASE_URL=http://192.168.1.222:11434 # This points to my 4090 Debian server - WEBUI_AUTH=False - WEBUI_SECRET_KEY=xxxxxxxxxxxxxxxx volumes: - /home/jaffa/docker/openwebui:/app/backend/data extra_hosts: - "host.docker.internal:host-gateway" ``` For Ollama, hosted on NUC: ``` version: "3.9" services: ollama: container_name: ollama image: ollama/ollama user: "1000:1000" restart: unless-stopped ports: - "11434:11434" environment: - TZ=Europe/Amsterdam - PUID=1000 - PGID=1000 - OLLAMA_HOME=/root/.ollama volumes: - /mnt/SSD_Mediadisk/docker/ollama:/root/.ollama # Here is where I'd wish the models would appear, but they don't ``` Some additional findings below, I found the models inside the container itself, and not on the bind mount: ``` jaffa@jaffa-debian:~$ docker exec -it ollama bash ubuntu@6fa00848fb8b:/$ cd ~/.ollama ubuntu@6fa00848fb8b:~/.ollama$ ls -R .: id_ed25519 id_ed25519.pub models ./models: blobs manifests ./models/blobs: sha256-1eee6953530837b2b17d61a4e6f71a5aa31c9714cfcf3cb141aa5c1972b5116b sha256-9640c2212a51f7df5840f7929448afa17cb33fbb173cf15e1d74883e932a3466 sha256-43070e2d4e532684de521b885f385d0841030efa2b1a20bafb76133a5e1379c1 sha256-9ca2294ee9882e2c810ed17652c6189061909b5425ef3d4af46d350bae3f3ebd sha256-4b01fbe300dafc6665b27d5c74be8eb63a59bc9043b14ab364d06eebbb15a335 sha256-d8ba2f9a17b3bbdeb5690efaa409b3fcb0b56296a777c7a69c78aa33bbddf182 sha256-5041ba4278429fe475782b889471b5ff065a6cce5c3a539bd61d1e457f1961de sha256-e507c18e251703516e5c7e71e7b0a2c51abbdd2a294a59681ef4586a3f170b49 sha256-62fbfd9ed093d6e5ac83190c86eec5369317919f4b149598d2dbb38900e9faef sha256-e7b273f9636059a689e3ddcab3716e4f65abe0143ac978e46673ad0e52d09efb sha256-64e1b2889b7892e6bbe7a7ed5bfe6ff793c61f9d584345f8f41cf9f5cb30a369 sha256-f02dd72bb2423204352eabc5637b44d79d17f109fdb510a7c51455892aa2d216 sha256-776beb3adb235076157cfea408b8ea2a2d25eae99d7f5da997f607f6b69fa0fa sha256-f60356777647e927149cbd4c0ec1314a90caba9400ad205ddc4ce47ed001c2d6 sha256-8b586b146d99262cc7bf20f47faa5507dd5c8476967be9e03822262361204637 sha256-fa6710a93d78da62641e192361344be7a8c0a1c3737f139cf89f20ce1626b99c ./models/manifests: registry.ollama.ai ./models/manifests/registry.ollama.ai: library ./models/manifests/registry.ollama.ai/library: dolphin-mixtral dolphin3 gpt-oss ./models/manifests/registry.ollama.ai/library/dolphin-mixtral: 8x7b ./models/manifests/registry.ollama.ai/library/dolphin3: 8b ./models/manifests/registry.ollama.ai/library/gpt-oss: 20b ubuntu@6fa00848fb8b:~/.ollama$ cd .. ubuntu@6fa00848fb8b:~$ ls ubuntu@6fa00848fb8b:~$ ls -R .: ubuntu@6fa00848fb8b:~$ cd ~/.ollama ubuntu@6fa00848fb8b:~/rm -rf ~/.config/tidal-hifi:~$ rm -rf ~/.config/tidal-hifi docker exec -it ollama bash -c 'echo $HOME && ls -al $HOME/.ollama | head -n 20' /home/ubuntu total 20 drwxr-xr-x 3 ubuntu ubuntu 4096 Feb 26 23:53 . drwxr-x--- 1 ubuntu ubuntu 4096 Feb 26 23:53 .. -rw------- 1 ubuntu ubuntu 387 Feb 26 23:53 id_ed25519 -rw-r--r-- 1 ubuntu ubuntu 81 Feb 26 23:53 id_ed25519.pub drwxr-xr-x 4 ubuntu ubuntu 4096 Feb 27 00:52 models ```
Author
Owner

@rozatoo commented on GitHub (Feb 27, 2026):

Hi!

You're using user: "1000:1000" on your ollama container which means it runs with a non-root user.

Also, OLLAMA_HOME isn’t a real Ollama env var (it’s not in Ollama’s env config):
https://github.com/ollama/ollama/blob/main/envconfig/config.go

This works for me:

services:
  ollama:
    container_name: ollama
    image: ollama/ollama
    user: "1000:1000"
    restart: unless-stopped
    ports:
      - "11434:11434"
    environment:
      - TZ=Europe/Amsterdam
      - PUID=1000
      - PGID=1000
     # - OLLAMA_MODELS=/home/ubuntu/.ollama/models (optional, since its the default)
    volumes:
      - ./ollama:/home/ubuntu/.ollama

Hope that helps, don't think this is a open-webui feature request though 😅

<!-- gh-comment-id:3973790781 --> @rozatoo commented on GitHub (Feb 27, 2026): Hi! You're using `user: "1000:1000"` on your ollama container which means it runs with a non-root user. Also, `OLLAMA_HOME` isn’t a real Ollama env var (it’s not in Ollama’s env config): https://github.com/ollama/ollama/blob/main/envconfig/config.go This works for me: ```yaml services: ollama: container_name: ollama image: ollama/ollama user: "1000:1000" restart: unless-stopped ports: - "11434:11434" environment: - TZ=Europe/Amsterdam - PUID=1000 - PGID=1000 # - OLLAMA_MODELS=/home/ubuntu/.ollama/models (optional, since its the default) volumes: - ./ollama:/home/ubuntu/.ollama ``` Hope that helps, don't think this is a open-webui feature request though 😅
Author
Owner

@Ratasan64 commented on GitHub (Feb 28, 2026):

Hi!

You're using user: "1000:1000" on your ollama container which means it runs with a non-root user.

Also, OLLAMA_HOME isn’t a real Ollama env var (it’s not in Ollama’s env config): https://github.com/ollama/ollama/blob/main/envconfig/config.go

This works for me:

services:
ollama:
container_name: ollama
image: ollama/ollama
user: "1000:1000"
restart: unless-stopped
ports:
- "11434:11434"
environment:
- TZ=Europe/Amsterdam
- PUID=1000
- PGID=1000
# - OLLAMA_MODELS=/home/ubuntu/.ollama/models (optional, since its the default)
volumes:
- ./ollama:/home/ubuntu/.ollama

Hope that helps, don't think this is a open-webui feature request though 😅

Hey that worked!
I would never have round that. I'm not good with programming codes or figuring out env vars that aren't documented. You're probably right, this was more of a bad ollama documentation on this matter. Thanks!

<!-- gh-comment-id:3975983660 --> @Ratasan64 commented on GitHub (Feb 28, 2026): > Hi! > > You're using `user: "1000:1000"` on your ollama container which means it runs with a non-root user. > > Also, `OLLAMA_HOME` isn’t a real Ollama env var (it’s not in Ollama’s env config): https://github.com/ollama/ollama/blob/main/envconfig/config.go > > This works for me: > > services: > ollama: > container_name: ollama > image: ollama/ollama > user: "1000:1000" > restart: unless-stopped > ports: > - "11434:11434" > environment: > - TZ=Europe/Amsterdam > - PUID=1000 > - PGID=1000 > # - OLLAMA_MODELS=/home/ubuntu/.ollama/models (optional, since its the default) > volumes: > - ./ollama:/home/ubuntu/.ollama > > Hope that helps, don't think this is a open-webui feature request though 😅 Hey that worked! I would never have round that. I'm not good with programming codes or figuring out env vars that aren't documented. You're probably right, this was more of a bad ollama documentation on this matter. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#90352