Skip to main content

Python environments

Three ways to keep the Python install isolated. A plain pip install open-webui is on the Quick Start; this page covers uv, Conda and venv, and how to uninstall any of them.

Python version compatibility

Open WebUI supports Python 3.11 and 3.12. Python 3.13 is not supported yet: a handful of our dependencies still need to ship 3.13-compatible releases, and until they do, installs on 3.13 will fail or break at runtime.

  • For production, run the Docker image or use the latest Python 3.11. This is the combination we test against most heavily.
  • Python 3.12 also works, but we have seen very rare reports of odd behaviour on 3.12 that we have not reproduced on 3.11. If something inexplicable happens on 3.12, drop to the latest 3.11 first.

Installation with uv

The uv runtime manager ensures seamless Python environment management for applications like Open WebUI. Follow these steps to get started:

1. Install uv

Pick the appropriate installation command for your operating system:

  • macOS/Linux:

    curl -LsSf https://astral.sh/uv/install.sh | sh
  • Windows:

    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

2. Run Open WebUI

Once uv is installed, running Open WebUI is a breeze. Use the command below, ensuring to set the DATA_DIR environment variable to avoid data loss. Example paths are provided for each platform:

  • macOS/Linux:

    DATA_DIR=~/.open-webui uvx --python 3.11 open-webui@latest serve
  • Windows (PowerShell):

    $env:DATA_DIR="C:\open-webui\data"; uvx --python 3.11 open-webui@latest serve

Open WebUI is now running at http://localhost:8080.

Why set DATA_DIR?

Setting DATA_DIR ensures your chats and settings are saved in a predictable location. If you don't set it, uvx might store it in a temporary folder that gets deleted when the process ends.

Uninstall

To remove Open WebUI when running with uvx:

  1. Stop the Server: Press Ctrl+C in the terminal where it's running.

  2. Uninstall from UV: Enter uv tool uninstall open-webui

  3. Available cleanup commands: The uvx command runs the application ephemerally or from cache. To remove cached components:

    uv cache clean
  4. Remove Data (WARNING: Deletes all data): Delete your data directory (default is ~/.open-webui or the path set in DATA_DIR):

    rm -rf ~/.open-webui

Install with Conda

  1. Create a Conda Environment:

    conda create -n open-webui python=3.11
  2. Activate the Environment:

    conda activate open-webui
  3. Install Open WebUI:

    pip install open-webui
  4. Start the Server:

    open-webui serve
'open-webui: command not found'?

If your terminal says the command doesn't exist:

  1. Ensure your conda environment is activated (conda activate open-webui).
  2. If you want to store your data in a specific place, use (Linux/Mac): DATA_DIR=./data open-webui serve or (Windows): $env:DATA_DIR=".\data"; open-webui serve

Uninstall

  1. Remove the Conda Environment:

    conda remove --name open-webui --all
  2. Remove Data (WARNING: Deletes all data): Delete your data directory (usually ~/.open-webui unless configured otherwise):

    rm -rf ~/.open-webui

Using Virtual Environments

Create isolated Python environments using venv.

Venv Steps

  1. Create a Virtual Environment:

    python3 -m venv venv
  2. Activate the Virtual Environment:

    • On Linux/macOS:

      source venv/bin/activate
    • On Windows:

      venv\Scripts\activate
  3. Install Open WebUI:

    pip install open-webui
  4. Start the Server:

    open-webui serve
'open-webui: command not found'?

If your terminal says the command doesn't exist:

  1. Ensure your virtual environment is activated (Step 2).
  2. If you want to store your data in a specific place, use: DATA_DIR=./data open-webui serve

Uninstall

  1. Delete the Virtual Environment: Simply remove the venv folder:

    rm -rf venv
  2. Remove Data (WARNING: Deletes all data): Delete your data directory (usually ~/.open-webui unless configured otherwise):

    rm -rf ~/.open-webui

Uninstall a plain pip install

  1. Uninstall the package:

    pip uninstall open-webui
  2. Remove data (optional, deletes all data):

    rm -rf ~/.open-webui
This content is for informational purposes only and does not constitute a warranty, guarantee, or contractual commitment. Open WebUI is provided "as is." See your license for applicable terms.