This directory contains automated scripts for deploying plugins in development to a local OpenWebUI instance. They enable quick code pushes without restarting OpenWebUI.
-
OpenWebUI Running: Make sure OpenWebUI is running locally (default
http://localhost:3000) -
API Key: You need a valid OpenWebUI API key
-
Environment File: Create a
.envfile in this directory containing your API key:api_key=sk-xxxxxxxxxxxxx
# Deploy GitHub Copilot SDK Pipe
python deploy_pipe.py# Deploy async_context_compression Filter (default)
python deploy_filter.py
# Deploy a specific Filter plugin
python deploy_filter.py my-filter-name
# List all available Filters
python deploy_filter.py --listUsed to deploy Filter-type plugins (such as message filtering, context compression, etc.).
Key Features:
- ✅ Auto-extracts metadata from Python files (version, author, description, etc.)
- ✅ Attempts to update existing plugins, creates if not found
- ✅ Supports multiple Filter plugin management
- ✅ Detailed error messages and connection diagnostics
Usage:
# Deploy async_context_compression (default)
python deploy_filter.py
# Deploy other Filters
python deploy_filter.py async-context-compression
python deploy_filter.py workflow-guide
# List all available Filters
python deploy_filter.py --list
python deploy_filter.py -lWorkflow:
- Load API key from
.env - Find target Filter plugin directory
- Read Python source file
- Extract metadata from docstring (title, version, author, description, etc.)
- Build API request payload
- Send update request to OpenWebUI
- If update fails, auto-attempt to create new plugin
- Display results and diagnostic info
Used to deploy Pipe-type plugins (such as GitHub Copilot SDK).
Usage:
python deploy_pipe.py- Open OpenWebUI interface
- Click user avatar → Settings
- Find the API Keys section
- Copy your API key (starts with sk-)
- Paste into
.envfile
Create a dedicated long-term API key in OpenWebUI Settings for deployment purposes.
Cause: OpenWebUI is not running or port is different
Solution:
- Make sure OpenWebUI is running
- Check which port OpenWebUI is actually listening on (usually 3000)
- Edit the URL in the script if needed
Cause: .env file was not created
Solution:
echo "api_key=sk-your-api-key-here" > .envCause: Filter directory name is incorrect
Solution:
# List all available Filters
python deploy_filter.py --listCause: API key is invalid or expired
Solution:
- Verify your API key is valid
- Generate a new API key
- Update the
.envfile
# 1. Create new Filter directory in plugins/filters/
mkdir plugins/filters/my-new-filter
# 2. Create my_new_filter.py with required metadata:
# """
# title: My New Filter
# author: Your Name
# version: 1.0.0
# description: Filter description
# """
# 3. Deploy to local OpenWebUI
cd scripts
python deploy_filter.py my-new-filter
# 4. Test the plugin in OpenWebUI UI
# 5. Continue development
# ... modify code ...
# 6. Re-deploy (auto-overwrites)
python deploy_filter.py my-new-filter# 1. Modify the source code
# vim ../plugins/filters/async-context-compression/async_context_compression.py
# 2. Deploy immediately to local
python deploy_filter.py async-context-compression
# 3. Test the fix in OpenWebUI
# (No need to restart OpenWebUI)- ✅ Add
.envfile to.gitignore(avoid committing sensitive info) - ✅ Never commit API keys to version control
- ✅ Use only on trusted networks
- ✅ Rotate API keys periodically
scripts/
├── deploy_filter.py # Filter plugin deployment tool
├── deploy_pipe.py # Pipe plugin deployment tool
├── .env # API key (local, not committed)
├── README.md # This file
└── ...
Last Updated: 2026-03-09
Author: Fu-Jie