OpenWebUI is a user-friendly, open-source AI interface designed to simplify interaction with web services and Large Language Models (LLM), making it easier for administrators to manage server applications and AI-driven services. Installing OpenWebUI manually on Ubuntu 24.04 provides greater control over the setup process, allowing for advanced configuration, customisation, and a deeper understanding of its components.
Before proceeding with this guide, make sure you have Ollama installed on your system – you can follow my guide to installing Ollama and Llama 3.3 on Ubuntu 24.04
This guide will walk you through the steps required to get OpenWebUI up and running on your Ubuntu machine.
Prerequisites
Before we begin, ensure you have:
- A cloud server running Ubuntu 24.04 (LTS)
- Minimum 4GB RAM (8GB recommended for better performance)
- At least 20GB of storage space
- 2 vCPUs or more
Step 1: Update Your System
Before starting the installation process, it is recommended to update your system to ensure all packages are up to date. Run the following command in the terminal:
sudo apt update && sudo apt upgrade -y
This command updates the package list and installs the latest software updates on your system.
Step 2: Install Required Dependencies
Run the following command to install the necessary dependencies:
sudo apt install -y npm python3-pip python3-venv
Step 3: Clone the OpenWebUI Repository
Run the following commands to clone the OpenWebUI repository from GitHub to your machine and change the current working directory to the newly cloned open-webui
folder:
git clone https://github.com/open-webui/open-webui.git
cd open-webui
Step 4: Configure Environment Variables
Run the below command to a new .env
file by copying .env.example
. Copying with the -RPp
options ensures the structure, links, and permissions of the original file are retained.
cp -RPp .env.example .env
- If Ollama is installed on the same server, no changes are needed.
- If Ollama is on a different server, edit the
.env
file to set theOLLAMA_BASE_URL
variable to the appropriate IP address and port.
Step 5: Install Node.js Dependencies and Build
Run the below command to install all the necessary Node.js packages (dependencies) and runs the script named build
to setup the project.
npm i && npm run build
Step 6: Install Python Packages
In this step, we will set up a Python virtual environment and install all necessary dependencies listed in the requirements.txt
.
1. Navigate to the Backend Directory
cd backend
Before we proceed, we need to make sure we are in the backend
directory where the Python project files are located, including requirements.txt
(which contains a list of required Python packages).
2. Create a Virtual Environment and Activate the Virtual Environment
python3 -m venv venv && source venv/bin/activate
This command creates a virtual environment named venv
and activates the virtual environment, ensuring that any subsequent Python commands (such as pip install
) will use the isolated environment instead of the global Python installation.
4. Install the Required Packages
pip install -r requirements.txt -U
This command installs all the dependencies listed in the requirements.txt
file.
Step 7: Start the OpenWebUI Application
Before we proceed, we need to make sure we are in the backend
directory where the Python project files are located. Run the command to start the application by running the start.sh
script.
bash start.sh
In start.sh
, the port is configured to 8080, meaning you can access OpenWebUI at http://<ip-address>:8080
.
Conclusion
You now have OpenWebUI running on your Ubuntu 24.04 system. You can start exploring its features and connecting it with various AI models. Remember to regularly check for updates and maintain proper security practices.
For additional configuration options and advanced features, refer to the official OpenWebUI documentation.