This commit is contained in:
Slaviša Arežina
2025-11-05 14:20:33 +01:00
committed by GitHub
parent b2ee06d8cb
commit fb1a558dc6
3 changed files with 23 additions and 63 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 tteck # Copyright (c) 2021-2025 tteck
# Author: havardthom # Author: tteck | Co-Author: havardthom | Co-Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://openwebui.com/ # Source: https://openwebui.com/
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-8192}" var_ram="${var_ram:-8192}"
var_disk="${var_disk:-25}" var_disk="${var_disk:-25}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-12}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
header_info "$APP" header_info "$APP"
@@ -23,7 +23,7 @@ function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -d /opt/open-webui ]]; then if [[ ! -d /root/.open-webui ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
@@ -50,29 +50,8 @@ function update_script() {
fi fi
fi fi
msg_info "Updating ${APP} (Patience)" msg_info "Restarting Open WebUI to initiate update"
cd /opt/open-webui systemctl restart open-webui
mkdir -p /opt/open-webui-backup
cp -rf /opt/open-webui/backend/data /opt/open-webui-backup
git add -A
$STD git stash
$STD git reset --hard
output=$(git pull --no-rebase)
if echo "$output" | grep -q "Already up to date."; then
msg_ok "$APP is already up to date."
exit
fi
systemctl stop open-webui.service
$STD npm install --force
export NODE_OPTIONS="--max-old-space-size=6000"
$STD npm run build
cd ./backend
$STD pip install -r requirements.txt -U
cp -rf /opt/open-webui-backup/* /opt/open-webui/backend
if git stash list | grep -q 'stash@{'; then
$STD git stash pop
fi
systemctl start open-webui.service
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
exit exit
} }

View File

@@ -12,7 +12,7 @@
"documentation": "https://docs.openwebui.com/", "documentation": "https://docs.openwebui.com/",
"website": "https://openwebui.com/", "website": "https://openwebui.com/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/open-webui.webp", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/open-webui.webp",
"config_path": "/opt/open-webui/.env", "config_path": "/root/.env",
"description": "OpenWebUI is a self-hosted, web-based interface that allows you to run AI models entirely offline. It integrates with various LLM runners, such as OpenAI and Ollama, and supports features like markdown and LaTeX rendering, model management, and voice/video calls. It also offers multilingual support and the ability to generate images using APIs like DALL-E or ComfyUI", "description": "OpenWebUI is a self-hosted, web-based interface that allows you to run AI models entirely offline. It integrates with various LLM runners, such as OpenAI and Ollama, and supports features like markdown and LaTeX rendering, model management, and voice/video calls. It also offers multilingual support and the ability to generate images using APIs like DALL-E or ComfyUI",
"install_methods": [ "install_methods": [
{ {
@@ -23,7 +23,7 @@
"ram": 8192, "ram": 8192,
"hdd": 25, "hdd": 25,
"os": "debian", "os": "debian",
"version": "12" "version": "13"
} }
} }
], ],
@@ -35,6 +35,10 @@
{ {
"text": "Script contains optional installation of Ollama.", "text": "Script contains optional installation of Ollama.",
"type": "info" "type": "info"
},
{
"text": "Initial run of the application/container can take some time, depending on your host speed, as the application is installed/updated at runtime. Please be patient!",
"type": "warning"
} }
] ]
} }

View File

@@ -1,8 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright (c) 2021-2025 tteck # Copyright (c) 2021-2025 tteck
# Author: tteck # Author: tteck | Co-Author: havardthom | Co-Author: Slaviša Arežina (tremor021)
# Co-Author: havardthom
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://openwebui.com/ # Source: https://openwebui.com/
@@ -15,36 +14,10 @@ network_check
update_os update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt install -y \ $STD apt install -y ffmpeg
git \
ffmpeg \
libpq-dev
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Setup Python3" USE_UVX="YES" PYTHON_VERSION="3.12" setup_uv
$STD apt install -y --no-install-recommends \
python3 \
python3-pip
msg_ok "Setup Python3"
NODE_VERSION="22" setup_nodejs
msg_info "Installing Open WebUI (Patience)"
$STD git clone https://github.com/open-webui/open-webui.git /opt/open-webui
cd /opt/open-webui/backend
$STD pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
$STD pip3 install -r requirements.txt -U
cd /opt/open-webui
cp .env.example .env
cat <<EOF >/opt/open-webui/.env
ENV=prod
ENABLE_OLLAMA_API=false
OLLAMA_BASE_URL=http://0.0.0.0:11434
EOF
$STD npm install --force
export NODE_OPTIONS="--max-old-space-size=6000"
$STD npm run build
msg_ok "Installed Open WebUI"
read -r -p "${TAB3}Would you like to add Ollama? <y/N> " prompt read -r -p "${TAB3}Would you like to add Ollama? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
@@ -69,7 +42,7 @@ RestartSec=3
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl enable -q --now ollama systemctl enable -q --now ollama
sed -i 's/ENABLE_OLLAMA_API=false/ENABLE_OLLAMA_API=true/g' /opt/open-webui/.env echo "ENABLE_OLLAMA_API=true" >/root/.env
msg_ok "Installed Ollama" msg_ok "Installed Ollama"
fi fi
@@ -80,10 +53,14 @@ Description=Open WebUI Service
After=network.target After=network.target
[Service] [Service]
Type=exec Type=simple
WorkingDirectory=/opt/open-webui EnvironmentFile=-/root/.env
EnvironmentFile=/opt/open-webui/.env Environment=DATA_DIR=/root/.open-webui
ExecStart=/opt/open-webui/backend/start.sh ExecStart=/usr/local/bin/uvx --python 3.12 open-webui@latest serve
WorkingDirectory=/root
Restart=on-failure
RestartSec=5
User=root
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target