2.3 KiB
OpenWebUI Container Management Plugin
This plugin adds container management capabilities to OpenWebUI, allowing you to monitor, update, and restart the container directly from the web interface.
Features
- View container status and version
- Update container to the latest version
- Restart container when needed
- User-friendly interface integrated into OpenWebUI settings
Installation
Installing in Docker-based OpenWebUI
-
If your OpenWebUI is running in Docker, mount the plugin directory into the container by adding this volume to your docker-compose.yml:
services: openwebui: volumes: - ./custom:/app/custom # Mount the plugin directory -
Copy the
customdirectory to your OpenWebUI installation directory (where your docker-compose.yml is located) -
Restart your OpenWebUI container:
docker-compose restart openwebui
The plugin will be automatically detected and loaded by OpenWebUI when it starts.
Dependencies
The plugin requires the following Python packages which are already included in the OpenWebUI Docker image:
- fastapi
- docker-py
Usage
- Navigate to the OpenWebUI settings page
- Look for the "Container Management" section
- You can:
- View the current container status and version
- Click "Update Container" to update to the latest version
- Click "Restart Container" to restart the container
API Endpoints
The plugin exposes the following API endpoints:
GET /api/container/status- Get container status and versionPOST /api/container/update- Update the containerPOST /api/container/restart- Restart the container
Development
To modify or extend the plugin:
- Frontend components are in
custom/components/ - Backend API routes are in
custom/api/ - Container management logic is in
custom/container_manager.py - Plugin registration is handled in
custom/plugin.py
Development Workflow
- Make changes to the plugin code
- The changes will be reflected immediately in the OpenWebUI container due to the volume mount
- If you modify Python files, you'll need to restart the OpenWebUI container:
docker-compose restart openwebui - Frontend changes (Svelte components) will be hot-reloaded automatically
Contributing
Feel free to submit issues and pull requests to improve the plugin.