Installation steps /script snippets for Open Web-UI on Debian

This is just a quick info dump for my own future reference, an anyone else who might benefit. Many parts are uncertain and should be investigated for clean up. But it works, and I have other priorities. Apologies at the mess and hard to read order, but there are plenty of other nice walkthroughs that I followed for this. I recommend one of them instead as your base, and this just as a reference.


Now, how to do code blocks in this interface...? Alas, not in the base offering of Blogger... Yuck.


  • System: Debian trixie/sid mixed with many stable packages, as of 2025-06-14.
  • Desireable: A remote access method, such as tailscale or easily opened and secured ports.
  • Option selected: A more native python based, rather than the docker container option.

Install pipx and dependencies via package manager of choice.

Configure some settings files in the directory, especially environment variables.

Here is a dump of my files / scripts used. Adjustments are needed.

First section includes multiple files, which should be configured per your system needs.


::::::::::::::
open-webui.env
::::::::::::::

# ==========================
# Open WebUI Environment (.env)
# ==========================
# refer https://docs.openwebui.com/getting-started/env-configuration/#overview

# - Non-PersistentConfig variables can be changed at any time and will take effect on restart.

# Bind to 0.0.0.0 for LAN access (default port 8080)
WEBUI_HOST=0.0.0.0
WEBUI_PORT=8081
# FIXME: used?
HOST=0.0.0.0
PORT=8081

# disable telemetry
# Telemetry/analytics controls (not PersistentConfig)
SCARF_NO_ANALYTICS=true
DO_NOT_TRACK=true
ANONYMIZED_TELEMETRY=false


# ==========================
# Unknown if PersistentConfig

# Enable audio in / out features
## Speech-to-Text (STT) configuration for DeepInfra
AUDIO_STT_ENGINE=openai
AUDIO_STT_MODEL=whisper-large-v3-turbo
# FIXME: or is it?
# AUDIO_STT_ENGINE=openai
# AUDIO_STT_MODEL=openai/whisper-large-v3-turbo
## Text-to-Speech (TTS) configuration for DeepInfra
AUDIO_TTS_ENGINE=hexgrad
AUDIO_TTS_MODEL=Kokoro-82M
# FIXME: or is it?
# AUDIO_TTS_ENGINE=openai
# AUDIO_TTS_MODEL=hexgrad/Kokoro-82M
# Many voice choices: https://deepinfra.com/hexgrad/Kokoro-82M/api?example=http
AUDIO_TTS_VOICE=af_bella


ENABLE_ONEDRIVE_INTEGRATION=True
# UNKNOWN: ONEDRIVE_CLIENT_ID


# Description: Specifies the base directory for data storage, including uploads, cache, vector database, etc.
# FIXME: Use XDG instead.
DATA_DIR=/home/USERID/Projects/Open-webui/OpenWebUI_Data

# ==========================
::::::::::::::
open-webui.env.first_run_lan
::::::::::::::
# ==========================
# Open WebUI Environment (.env.first_run_lan)
# only first run
# ==========================
# Allow open access
# Disable user authentication (WARNING: insecure, use only in trusted LAN)
# Disable user accounts and authentication
# User/account/authentication controls
ENABLE_SIGNUP=False
WEBUI_AUTH=False


::::::::::::::
open-webui.envish.first_run
::::::::::::::

# To be sourced.

# ==========================
# Open WebUI Environment (open-webui.envish.first_run)
# only first run
# refer https://docs.openwebui.com/getting-started/env-configuration/#overview
# ==========================
mkdir -p "${HOME}"/Documents/OpenWebUI

# DeepInfra API configuration
OPENAI_API_BASE_URL=https://api.deepinfra.com/v1      # PersistentConfig: Yes
# OPENAI_API_KEY=your_deepinfra_api_key_here            # PersistentConfig: Yes
export DEEPINFRA_TOKEN=$(pass show Passwords/api.deepinfra.com)
OPENAI_API_KEY=$DEEPINFRA_TOKEN

# Default language/locale
# DEFAULT already, but for good measure.
DEFAULT_LOCALE=en-US                                     # PersistentConfig: Yes

# Enable image generation (set to True since DeepInfra supports it)
ENABLE_IMAGE_GENERATION=True                          # PersistentConfig: Yes

# include OLLAMA_BASE_URL since using Ollama locally.
OLLAMA_BASE_URL=http://NAME_OF_LOCAL_HOST_IN_REMOTELY_ACCESSIBLE_FORM:11434  # PersistentConfig: Yes

# ==========================
# Notes:
# - PersistentConfig variables are only read from this file on FIRST LAUNCH.
#   To change them later, use the Open WebUI interface or clear the internal config.
Now ready to try an installation. At a regular bash prompt:

mkdir -p ${HOME}/Tmp/Pip_Cache # outside of tmpfs (which is too small)
TMPDIR="${HOME}"/Tmp/Pip_Cache pipx install open-webui   # Alternatively "--no-cache-dir"
sudo ufw allow 8081

Next, first run including configuration

:::::::::::::: open-webui.init.sh ::::::::::::::

# preload password-repo

# safer, but not support pass calling : Export variables: export $(grep -v '^#' ~/.open-webui/.env | xargs)
source ./open-webui.envish.first_run
export $(grep -v '^#' ./open-webui.env.first_run_lan | xargs)
export $(grep -v '^#' ./open-webui.env | xargs)
echo is DATA_DIR correct?  : $DATA_DIR
open-webui serve --host $WEBUI_HOST --port $WEBUI_PORT
:::::::::::::: open-webui.run.sh ::::::::::::::

# safer, but not support pass calling : Export variables: export $(grep -v '^#' ~/.open-webui/.env | xargs)
export $(grep -v '^#' ./open-webui.env | xargs)
open-webui serve --host $WEBUI_HOST --port $WEBUI_PORT
:::::::::::::: open-webui.upgrade.sh ::::::::::::::

TMPDIR="${HOME}"/Tmp/Pip_Cache pipx upgrade open-webui   # Alternatively "--no-cache-dir"

That is what I did.