Self-hosted service
mythrantic/ollama-docker avatar
mythrantic/ollama-docker

ollama-docker ships WEBUI_AUTH=False and a secret key written in the compose file

Welcome to the Ollama Docker Compose Setup! This project simplifies the deployment of Ollama using Docker Compose, making it easy to run Ollama with all its dependencies in a containerized environment

1,426 stars254 forksHTMLNOASSERTION

At a glance

What is it?
A three container Compose setup for Ollama and an Open WebUI front end. It is a good starting point, and its defaults leave an unauthenticated model API and an unauthenticated web console published on the host.
Who is it for?
Treat this as a local development arrangement rather than something to expose. Three defaults have to change before it faces a network: enable authentication on the web console, replace the committed secret key, and stop publishing the Ollama API on the host, or put an authenticating proxy in front of it.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 131 days ago.
What is it written in?
Mainly HTML, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 3, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The console has authentication switched off and a placeholder key

The web console service carries its configuration in the compose file, in plain text, and three of those values are defaults you would want to change before anyone else can reach the machine:

yaml
      - ENV=dev
      - WEBUI_AUTH=False
      - WEBUI_NAME=valiantlynx AI
      - WEBUI_SECRET_KEY=t0p-s3cr3t

`WEBUI_AUTH=False` disables the login system, so the console at the published port has no user accounts at all. `WEBUI_SECRET_KEY` is a literal placeholder committed to the repository, which is the key used to sign sessions and tokens. `ENV=dev` is a third signal pointing the same way, since it is a development setting on a file meant to be copied and run.

None of this is hidden. It is in the file you clone, which is the right place for it to be visible, and the README never mentions any of the three. So the security posture is entirely whatever a reader infers, and a reader in a hurry infers nothing.

The model API is published on 7869 and bound to every interface

The Ollama service is the one that matters most, because it is the model endpoint itself:

yaml
    image: docker.io/ollama/ollama:latest
    ports:
      - 7869:11434
    environment:
      - OLLAMA_KEEP_ALIVE=24h
      - OLLAMA_HOST=0.0.0.0

Two decisions combine here. The container listens on all interfaces, and the service is mapped out to the host on port 7869. Ollama's HTTP API is unauthenticated by default, and nothing in this repository adds a key, a proxy or a network policy in front of it. So anything that can reach port 7869 on that machine can generate with your models.

`OLLAMA_KEEP_ALIVE=24h` is the other setting in that block. It holds a model in memory for a day, which is right for a laptop you are iterating on and wrong for a small server whose memory is finite.

A debugger port and the auto-reloader are both switched on

The third service is the one the README calls app, built from the Dockerfile in the same repository. It publishes two ports:

yaml
    ports:
      - 8000:8000
      - 5678:5678
    command: uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload

Port 5678 is the debugpy port, and debugpy is in the requirements file, so the published port is deliberate rather than accidental. The command also runs uvicorn with the reload flag and bound to all interfaces, and the Dockerfile's own CMD does the same. Reload is convenient in a devcontainer and wrong in anything you intend to keep running.

Two smaller things sit in the same file. The service mounts the whole repository at /code, so host edits overwrite container files. And the image is built from python:3.12-slim with gcc, g++, make, cmake, pkg-config, git and curl installed into the running layer, so the shipped image carries a complete build toolchain it never uses at runtime.

Two compose files and no explanation of what differs

The repository holds docker-compose.yml and docker-compose-ollama-gpu.yaml, and the usage section chooses between them with one sentence:

bash
docker compose -f docker-compose-ollama-gpu.yaml up -d

otherwise

bash
docker compose up -d

That is the whole instruction. No diff between the two files is shown, no line explains which setting the GPU variant changes, and the strings if gpu is configured and else sit outside any code block or list. A reader with an NVIDIA card is told which file to run and nothing about what they are getting.

The GPU prerequisite is handled earlier, with a block that installs the NVIDIA Container Toolkit. Its last line is the one to read before pasting anything:

bash
sudo nvidia-ctk runtime configure --runtime=

The flag is written with an equals sign and nothing after it, so the runtime is never named.

Both upstream images float and one re-pulls on every start

Three images are involved and none is pinned to a version. Ollama runs from docker.io/ollama/ollama:latest, the console runs from ghcr.io/open-webui/open-webui:main, and the app service is built from the Dockerfile in the repository.

One of them is worse than floating, because it re-pulls on every start:

yaml
    pull_policy: always

So the stack you validated last week is not the stack you start today, and the difference arrives without any change on your side. For a development environment that is a reasonable trade. For anything you intend to run for weeks it means an upstream release lands in your stack unattended.

The same block also sets `tty: true` and `restart: always` on the Ollama service, and `restart: unless-stopped` on the console, so the whole thing comes back by itself after a reboot.

The badges point at a different owner than the repository

The clone URL, the repository and the badges do not agree. The clone command targets github.com/mythrantic/ollama-docker.git, and the project page is ollama-docker.valiantlynx.com. The star history badge in the README, however, tracks star-history.com/#valiantlynx/ollama-docker, a different owner path on the same platform.

The same split shows up inside the configuration. The console is renamed valiantlynx AI in the compose file, and the contact address given in the README is vantlynxz at gmail.com, which spells the handle differently again from every other appearance.

For a reader this only matters in one practical way: the badge is not tracking this repository's history, so the star chart at the top of the page describes somebody else's project. The repository itself is not archived and its last push was on 2026-05-26.

The contribution guide is linked and the file is not there

The README closes with a Contributing section that invites changes and points at CONTRIBUTING.md. No such file exists in the repository root, whose entries are .devcontainer/, .dockerignore, .github/, .gitignore, .vscode/, Dockerfile, LICENCE.md, Modelfile, README.md, the two compose files, fly.toml, requirements.txt, run.bat, run.sh, setup.sh and src/.

Licensing has its own gap. The platform record reports no licence for this repository, while the README states it is licensed under the RSOSL and links LICENCE.md, with the note that you should give a mention and some credit. The file is spelled with a British LICENCE, and no LICENSE file exists beside it, so which text governs is a question for the author.

fly.toml is also in the root with no mention in the README, which suggests a deployment path to a Fly.io account that is undocumented, and the Python dependencies carry no version constraints at all.

Editorial conclusion

Treat this as a local development arrangement rather than something to expose. Three defaults have to change before it faces a network: enable authentication on the web console, replace the committed secret key, and stop publishing the Ollama API on the host, or put an authenticating proxy in front of it. On the GPU path, install the NVIDIA Container Toolkit yourself rather than pasting the block from the README, because its final command is missing the value after the flag. And decide whether you want a moving target at all, since two of the three images are floating tags and one of them re-pulls on every start. What you get for that is a working three container stack in two commands, which is still a reasonable starting point.

Frequently asked questions

how to install ollama docker compose

Clone the repository, change into the directory, then run docker compose up -d. If the NVIDIA Container Toolkit is configured, run docker compose -f docker-compose-ollama-gpu.yaml up -d instead. That brings up three services: an app container built from the Dockerfile, an Ollama container, and an Open WebUI container reachable on port 8080.

how to install ollama docker and open webui

That is what the compose file does for you, with the web console on host port 8080 pointing at the Ollama service. Models are then installed from the console's settings page, with llava-phi3 given as the example, and the README notes the download takes a couple of minutes.

Does the ollama-docker web console need a login?

Not as configured. The compose file sets WEBUI_AUTH=False, which disables authentication, and its WEBUI_SECRET_KEY is the literal placeholder t0p-s3cr3t. Both need changing before the console is reachable by anyone but you.

Can I reach the Ollama API from outside the container?

Yes, and that is the configuration rather than an accident. The service is published to host port 7869 and sets OLLAMA_HOST=0.0.0.0 inside the container, and nothing in the repository adds authentication in front of it, so anything that can reach that port on the host can use your models.

How do I enable GPU support in ollama-docker?

Install the NVIDIA Container Toolkit first, then start the stack with docker compose -f docker-compose-ollama-gpu.yaml up -d. Be careful with the configure line in the README, which ends with nvidia-ctk runtime configure --runtime= and leaves the runtime name empty, so name it yourself.

Official sources

  1. Issues
  2. mythrantic/ollama-docker on GitHub
  3. Project website
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/mythrantic-ollama-docker.svg)](https://hysenlabs.com/projects/mythrantic-ollama-docker)