diff --git a/.icons/openwebui.svg b/.icons/openwebui.svg new file mode 100644 index 00000000..06f67645 --- /dev/null +++ b/.icons/openwebui.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/registry/coder-labs/modules/open-webui/README.md b/registry/coder-labs/modules/open-webui/README.md index 6281560f..4f1e8b44 100644 --- a/registry/coder-labs/modules/open-webui/README.md +++ b/registry/coder-labs/modules/open-webui/README.md @@ -1,8 +1,8 @@ --- display_name: Open WebUI description: A self-hosted AI chat interface supporting various LLM providers -icon: ../../../../.icons/openai.svg -verified: false +icon: ../../../../.icons/openwebui.svg +verified: true tags: [ai, llm, chat, web-ui, python] --- @@ -14,10 +14,10 @@ This module installs and runs Open WebUI using Python and pip within your Coder ## Prerequisites -- **Python 3.11 or higher** (automatically installed from deadsnakes PPA if not present) +- **Python 3.11 or higher** (automatically installed from [deadsnakes PPA](https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa) if not present) - `pip` package manager - `sudo` access (for automatic Python installation if needed) -- Port 8080 (default) or your custom port must be available +- Port 7800 (default) or your custom port must be available **Note:** If Python 3.11+ is not found, the module will automatically: 1. Add the deadsnakes PPA repository @@ -33,77 +33,4 @@ module "open-webui" { version = "1.0.0" agent_id = coder_agent.main.id } -``` - -## Examples - -### Custom Port - -Run Open WebUI on a custom port: - -```tf -module "open-webui" { - count = data.coder_workspace.me.start_count - source = "registry.coder.com/coder-labs/open-webui/coder" - version = "1.0.0" - agent_id = coder_agent.main.id - port = 3000 -} -``` - -### Public Sharing - -Make Open WebUI accessible to authenticated Coder users: - -```tf -module "open-webui" { - count = data.coder_workspace.me.start_count - source = "registry.coder.com/coder-labs/open-webui/coder" - version = "1.0.0" - agent_id = coder_agent.main.id - share = "authenticated" -} -``` - -### Custom Log Path and Grouping - -```tf -module "open-webui" { - count = data.coder_workspace.me.start_count - source = "registry.coder.com/coder-labs/open-webui/coder" - version = "1.0.0" - agent_id = coder_agent.main.id - log_path = "/var/log/open-webui.log" - group = "AI Tools" - order = 1 -} -``` - -## Features - -- 🐍 Pure Python installation (no Docker required) -- 🔄 Automatic Python 3.11+ installation from deadsnakes PPA -- 💾 Data stored in `~/.open-webui` directory -- 🚀 Runs in background as a Python process -- 📝 Configurable logging -- 🌐 Subdomain support for clean URLs -- 🔧 Compatible with various LLM providers (OpenAI, Ollama, etc.) - -## Data Persistence - -Open WebUI data is stored in `~/.open-webui` directory in your workspace, which includes: -- User accounts -- Chat history -- Settings and configurations -- Model configurations - -## Installation Process - -The module automatically handles the installation: - -1. **Check Python Version**: Looks for Python 3.11+ (checks python3.13, python3.12, python3.11, python3, python) -2. **Install Python if Needed**: If not found, installs Python 3.11 from deadsnakes PPA -3. **Install pip**: Ensures pip is available -4. **Install Open WebUI**: Installs open-webui package via pip -5. **Start Server**: Launches Open WebUI on the specified port - +``` \ No newline at end of file diff --git a/registry/coder-labs/modules/open-webui/main.tf b/registry/coder-labs/modules/open-webui/main.tf index 3276dc64..087d788b 100644 --- a/registry/coder-labs/modules/open-webui/main.tf +++ b/registry/coder-labs/modules/open-webui/main.tf @@ -24,7 +24,7 @@ variable "log_path" { variable "port" { type = number description = "The port to run Open WebUI on." - default = 8080 + default = 7800 } variable "share" { diff --git a/registry/coder-labs/modules/open-webui/run.sh b/registry/coder-labs/modules/open-webui/run.sh index 3a472ec2..62784b0f 100755 --- a/registry/coder-labs/modules/open-webui/run.sh +++ b/registry/coder-labs/modules/open-webui/run.sh @@ -1,11 +1,5 @@ #!/usr/bin/env sh -# Convert templated variables to shell variables -# shellcheck disable=SC2269 -LOG_PATH=${LOG_PATH} -# shellcheck disable=SC2269 -PORT=${PORT} - # shellcheck disable=SC2059 printf '\033[0;1mInstalling Open WebUI...\n\n'