Introduction & Docker Installation
Hello everyone, this is Professor Patterns here, and in this video, we're going to be installing Open WebUI from scratch. Now I'm going to be assuming that you're a complete beginner, you don't know what a Docker container is or why we need one, and you've never used the command line before. So let's go ahead and get started.
First, I'm going to go to the Open WebUI website. Now here, if you scroll down, it says quick start with Docker. So what is Docker? Well, Docker is simply an application. So I'm going to search the web for Docker, click the first link that I see here. Now to use Docker, I'm going to have to download Docker Desktop. So I'm going to select the one for Windows because I'm on a Windows, but if you're on a Mac, you would just select the one for Mac. There's no difference. So we start off by just unpacking some files.
And now that the installation is complete, it says to close and log out, so I'm simply going to do that. Now after I restart my computer, this is the first thing that I saw: Docker subscription service agreement. I'm going to hit accept. And then here it says welcome to Docker, so I'm going to just skip this first step and the second step here. So now it is starting to start the Docker engine, so I'm just going to let it do its thing here. And there we go. So it says containers, view all of your running containers, images, volumes... everything is empty right now. So what should I do?
Running the Open WebUI Docker Container
Well, I need to download the container for Open WebUI. So what I'm going to do is go to my browser and then search for Open WebUI. Now here, I will scroll down to this step: if Ollama is on your computer. So I'm going to simply copy this entire command. I can just click this, and there we go.
Now to actually run this, what I'm going to do is open up my command prompt window. Now if you were in a Mac, this would be your terminal. So now that this is open, I'm simply going to paste that command and leave all of the settings default. I'm not going to change anything in this code here. After this runs, I'm going to hit enter. So it says unable to find this image, and it started downloading this image to the Docker container.
So now that the Docker container has been downloaded, if I go to Docker Desktop, you'll see that Open WebUI is going to show up here. This green state means that it's currently running. And then if I click this, it's going to open up Open WebUI on localhost:3000. So it's only using the resources of my computer, it's only running locally, it's not available online or on the internet. This is only on my computer. So here, I'm going to select Get Started. So now that I've put in some credentials, I'm going to create an admin account and here I'm going to say, okay, let's go. So there we go, this is the Open WebUI interface, and I am currently on my admin account.
Installing Ollama to Serve Models
Now if I click this, you'll see that there are no models that are currently available, and that is because we don't have Ollama installed yet. So let's go ahead and do that. So to do that, I'm going to go to Ollama, o-l-l-a-m-a, and here I'm going to just simply hit download. I'm going to download the one for Windows. So here I'm going to hit install. And now that it's installed, it's going to simply say Ollama is currently running. So there's no interface, right? It's not an application like Docker containers. All you would see is if you click this, you should see that it is currently running.
Downloading a Model via Open WebUI
Now even though Ollama is currently running, it doesn't mean that I have a model. So if I go to my localhost:3000 and select a model, you'll still see that there's no results found. Now to actually install a model, I'm going to first go over to my admin panel, and then here I'm going to select Settings, Connections, and then here I'm going to select this icon here for manage. Now over here it says pull a model from ama.com. So to do that, I'm going to go here, and I'm going to search for models. So I can click models here, and there are so many different models that are currently available. There's the Llama 3.
Now notice that if I click this, there are different versions. So for this one, it's only the 70 billion, which is a huge model. I don't want to have something that large. So let me scroll down. Let me get the Llama 3.2. I'm going to select the 3 billion. And to download this, I'm going to highlight the text 'Llama 3.2 3B' and copy that. Then I'm going to go to the admin panel, and here I'm going to simply paste this, and then if I hit download, you'll see that it's going to start downloading this model.
And now that the model has been downloaded, I can go here, and then you can see that this model has popped up. So now I can ask this model to do anything, like give me some ideas. And there we go. So this is how we can install Open WebUI through the use of a Docker container.
Manual Setup: Installing Anaconda
Now we'll see the other way of installing Open WebUI, and that's through pip. So if you go to the Open WebUI homepage, it says that you can have a manual installation, and to do this you're going to need to have a runtime manager like UV or Conda. Let's say that you choose Conda. So to download Conda, I'm going to go to Google and just type in 'download Anaconda'. Here I'm going to select the first link that I see here, and then I'm going to skip the registration and download the one for Windows. If you were on a Mac, you would download the one for your Mac.
So it says setup is loading. I'm going to hit next, I agree, just me, next. I'm going to add this to the path, even though it says it's not recommended. Install. And there we go, the installation is now complete. I'm going to hit next, next, and don't need to launch the Navigator or anything like that, so I'm just going to simply hit finish.
Creating and Activating a Conda Environment
So now that it's downloaded, I'm going to open up my command prompt window, and I'm going to type in conda info --envs. So that will tell me if there are any virtual environments that are currently on my system. So there are none, so that's great. And what I'm going to do is create a new virtual environment so that I can install Open WebUI on there. So to do that, I'm going to say conda create --name open-webui and then here I'm also going to say that I wanted to run python=3.11. And then I'm going to hit enter. So it's going to start installing Python 3.11. Here I'm going to type in 'y' and then hit enter.
And while this is happening, I can turn off the one that's running on my Docker container. So just to verify that it's currently not running on localhost:3000, if I go to that, it shouldn't show up with anything on there. There we go, fine, an internal error. So let's see if this installed. It looks like it did. If I hit conda info --envs, we can see that this environment should be now present. So conda activate open-webui. And there we go. Because it says 'open-webui' here, that means that it's running on an isolated environment. So it doesn't matter whatever we do here, if for example we install like a bunch of different packages and we start messing things up, we can always just simply delete this virtual environment and call it a day.
Installing and Running Open WebUI via Pip
So here, let's go to Open WebUI, and it says that we want to open up the terminal and run this command. So I'm going to copy this and type it in here and then hit enter. So pip install open-webui. And now that it's installed, all I would do is just simply type in open-webui serve. I should now be able to go to my localhost, and I think it's on 8000 if I'm not wrong. Let me check it again. Nope, it looks like it's 8080. So 8080. And there we go, Open WebUI.
So to have this running, I'm going to have to leave this window open, because if I close this window and then refresh this page, you'll see that it's going to be gone. So I have to open up command prompt again, and then here again, I have to load my Conda environment. So conda activate open-webui, and then here I have to run open-webui serve. So this is something that you're going to have to do every single time if you're running it through Python.
Conclusion: Docker vs. Manual Installation
And that is why Docker is going to be the preferred or recommended way of running Open WebUI. So here again, if I load this, there we go, Open WebUI is currently working. And that's pretty much it, two ways in which we can install Open WebUI from scratch. That's it for this video. Thank you all for tuning in. I'll see you in the next one. Goodbye.