Full setup from scratch — for when Docker and Ollama are not yet installed.
- Install Docker
- Install Ollama
- Clone Repository
- Configure Ollama
- Install Stack
- First Run
- Verification
- Uninstall
sudo apt update
sudo apt install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io \
docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
newgrp docker
sudo systemctl enable --now docker.service
docker --version
docker compose versioncurl -fsSL https://ollama.com/install.sh | sh
systemctl is-active ollama
# Expected: active
ollama pull gemma3:3b
ollama run gemma3:3b "Hello!"cd ~
git clone https://github.com/serg-markovich/openwebui-systemd-stack.git
cd openwebui-systemd-stackBy default Ollama listens on 127.0.0.1:11434 — Docker containers cannot reach that address.
This override makes Ollama listen on all interfaces so the container can connect via 172.17.0.1.
sudo mkdir -p /etc/systemd/system/ollama.service.d/
sudo tee /etc/systemd/system/ollama.service.d/override.conf > /dev/null <<EOF
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"
EOF
sudo systemctl daemon-reload
sudo systemctl restart ollama
systemctl cat ollama.service | grep OLLAMA_HOST
# Expected: Environment="OLLAMA_HOST=0.0.0.0:11434"
curl http://172.17.0.1:11434/api/tags
# Expected: JSON with model listcp .env.example .env
make installmake install does the following:
- Generates
~/.config/systemd/user/openwebui.servicefromsystemd/openwebui.service.templatewith%%INSTALL_PATH%%substitution - Generates
~/.local/share/applications/*.desktopfromdesktop/*.desktop.templatewith path substitution - Runs
systemctl --user daemon-reloadandupdate-desktop-database
Optional — enable auto-start on login:
systemctl --user enable openwebuimake start
make status
xdg-open http://localhost:3000First time: click Sign up to create a local admin account. Nothing is sent externally — all data stays on your machine.
sudo systemctl is-active docker # active
systemctl is-active ollama # active
systemctl --user is-active openwebui # active
docker ps | grep open-webui # container listed
curl -s -o /dev/null -w "%{http_code}" http://localhost:3000 # 200All five checks should pass ✅
make stop
systemctl --user disable openwebui 2>/dev/null || true
rm ~/.config/systemd/user/openwebui.service
rm ~/.local/share/applications/openwebui-*.desktop
systemctl --user daemon-reload
update-desktop-database ~/.local/share/applications/
cd ~/openwebui-systemd-stack
docker compose down -v
cd ~
rm -rf openwebui-systemd-stack
# Optional: remove Ollama network override
sudo rm /etc/systemd/system/ollama.service.d/override.conf
sudo systemctl daemon-reload
sudo systemctl restart ollamaNext: Quick Start • Architecture • Troubleshooting