https://github.com/loglux/openwebui-docker-automation
This repository contains automation scripts for managing OpenWebUI and pipeline components using Docker. It simplifies updates, resets, and ensures containers are healthy
https://github.com/loglux/openwebui-docker-automation
ai automation automation-scripts bash containers deployment docker docker-auto-build docker-automated-build docker-automation gpu nas openwebui openwebui-pipe pipelines postgres self-hosting shell shell-script
Last synced: 3 months ago
JSON representation
This repository contains automation scripts for managing OpenWebUI and pipeline components using Docker. It simplifies updates, resets, and ensures containers are healthy
- Host: GitHub
- URL: https://github.com/loglux/openwebui-docker-automation
- Owner: loglux
- Created: 2025-06-10T16:24:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-19T23:28:36.000Z (4 months ago)
- Last Synced: 2026-03-20T14:11:56.219Z (4 months ago)
- Topics: ai, automation, automation-scripts, bash, containers, deployment, docker, docker-auto-build, docker-automated-build, docker-automation, gpu, nas, openwebui, openwebui-pipe, pipelines, postgres, self-hosting, shell, shell-script
- Language: Shell
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenWebUI Docker Automation
## 🚀 Overview
This repository contains automation scripts for managing **OpenWebUI and pipeline components** using Docker. It simplifies updates, resets, and ensures containers are healthy, especially for self-hosted setups like NAS environments.
## 🛠️ What is OpenWebUI Docker Automation?
OpenWebUI Docker Automation is a set of **shell scripts** designed to **simplify self-hosting and container management** for OpenWebUI. If you're running OpenWebUI on a **NAS** and using Ollama on a **separate GPU-powered machine**, this project provides essential automation to keep everything updated and running smoothly.
### 🚀 Why Use These Scripts?
Managing Docker containers manually can be time-consuming. These scripts allow you to:
- **Automatically update OpenWebUI** with the latest image.
- **Effortlessly reset and redeploy pipeline containers** without lingering conflicts.
- **Run health checks** to ensure proper functionality after updates.
- **Optimize container deployment** for NAS-hosted environments.
## 🌐 Deployment Context
This setup assumes **OpenWebUI is running on a NAS**, while **Ollama is hosted separately on a computer with a GPU** for optimized performance.
Users can modify environment variables like `OLLAMA_BASE_URL` to point to their specific setup.
---
## ⚙️ Scripts
### **1️⃣ update_openwebui.sh**
This script **updates and restarts the OpenWebUI container** in Docker. It performs these actions:
1. **Pulls the latest OpenWebUI image** from GitHub Container Registry.
2. **Stops and removes** the existing container.
3. **Starts a new container** with configured environment variables.
4. **Runs a health check** to ensure the service is running.
#### 🔹 Variables in `update_openwebui.sh`
| Variable | Description |
|----------------|-------------|
| `CONTAINER_NAME` | Name of the OpenWebUI container in Docker (`open-webui`). |
| `IMAGE_NAME` | Repository path for OpenWebUI’s latest image (`ghcr.io/open-webui/open-webui:main`). |
| `HOST_PORT` | External port for OpenWebUI (**default is 3000**, but modified in this setup). |
| `CONTAINER_PORT` | Internal container port (**default 8080** in this setup). |
| `OLLAMA_BASE_URL` | API base URL used by OpenWebUI (customizable). |
| `VOLUME_NAME` | Persistent volume for storing backend data. |
| `LOG_FILE` | Log file to track script execution steps. |
---
### **2️⃣ reset_pipelines.sh**
This script **cleans and restarts the pipelines container**. It follows these steps:
1. **Stops and removes** the pipelines container.
2. **Deletes the old image** to avoid conflicts.
3. **Removes old storage volume** for a clean install.
4. **Pulls the latest pipelines image** and deploys a new container.
5. **Performs a verification check** to confirm proper deployment.
---
#### 🔹 Variables in `reset_pipelines.sh`
| Variable | Description |
|----------------|-------------|
| `CONTAINER_NAME` | Name of the pipelines container in Docker (`pipelines`). |
| `IMAGE_NAME` | Repository path for pipelines image (`ghcr.io/open-webui/pipelines:main`). |
| `HOST_PORT` | External port used for pipelines (**default 9099**). |
| `CONTAINER_PORT` | Internal port used by pipelines (**default 9099**). |
| `PIPELINES_VOLUME` | Name of the volume where pipeline data is stored. |
| `CUSTOM_PIPELINES_URL` | Optional URL for custom pipeline scripts (default is empty). |
| `DB_PORT` | PostgreSQL database port (**default 5432**). |
| `PIPELINES_REQUIREMENTS_PATH` | Path to pipeline dependencies in the container (`/app/pipelines/requirements.txt`). |
---
## 🛠️ Installation & Usage
Make scripts executable and run:
sh
```
chmod +x update_openwebui.sh
./update_openwebui.sh
```
sh
```
chmod +x reset_pipelines.sh
./reset_pipelines.sh
```
---
### Shell Compatibility
These scripts are written for **POSIX `sh`** and are intended to run with `#!/bin/sh` on common Unix-like systems, including lightweight NAS environments.