DEV Community

AIRabbit
AIRabbit

Posted on • Edited on

Break free from ChatGPT with OpenWebUI - The Open Source Way

Are you a frequent ChatGPT user? You might be wondering why bother with alternatives when ChatGPT already seems to do it all. Well, if you haven't tried OpenWebUI, you're missing out. I felt the same way about seven months ago, but taking 15 minutes to explore this new tool was a decision I haven't regretted.

I always make it a point to explore new tools, even when I'm satisfied with my current setup, just out of curiosity. Sometimes, that curiosity really pays off!

In this post, I'll introduce you to OpenWebUI and explain why it's worth your attention, even if you're a dedicated GPT user.

Why OpenWebUI?

There are many excellent open-source LLM chat interfaces out there, like JAN, GPT4All, and more. I've experimented with most of them, and OpenWebUI stood out for its simplicity and extensibility. However, I always encourage you to try things out for yourself and make your own judgments. I'm simply pointing out alternatives without pushing any particular tool over another.

So, what exactly is OpenWebUI, and why should you care?

In short, OpenWebUI is a chatbot interface like ChatGPT, but with three key differences:

  • It's open-source and free.
  • It's not locked to a single vendor like OpenAI's ChatGPT. You can run Claude, OpenAI models, Llama, and virtually any other model with just a few clicks.
  • It's highly customizable, with a rich library of open-source tools, extensions, and even prompts.

And one more reason, which might not be immediately obvious, is cost savings.

If you're paying for a ChatGPT subscription, you might be underutilizing it compared to using the OpenAI API directly. If you're unfamiliar with this option, I highly recommend reading my previous article on the topic.

If any of these reasons resonate with you, I strongly suggest taking just 10 minutes to get OpenWebUI up and running.

Let's dive into the installation process.

Step #1: Install Docker

https://docs.docker.com/engine/install/

If you're new to Docker, here's a simple explanation: Docker is essentially an engine that runs "containers." These containers are typically self-contained applications that operate in isolated environments on your device. One of Docker's biggest advantages is portability – the same app can run on any device with the Docker engine installed. It's available for all major operating systems, including macOS, Windows, and Linux.

Step #2 : install OpenWebUI

2. Open your terminal and install OpenWebUI with the following command:

docker run  --pull=always -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main
Enter fullscreen mode Exit fullscreen mode

Note: The --pull=always flag ensures you always get the latest version when updates are available.

You'll only need this flag when a newer version is released. In that case, you'll have to delete the older container and then re-run this command.

Step #3: Add OpenAI Models

Once the container has started, you're ready to proceed.

Now, open your browser and navigate to localhost:3000. You should see the OpenWebUI chat interface.

Next, let's add some models. In this tutorial, we'll add all OpenAI models at once by simply providing your API key. Go to:

http://localhost:3000/admin/settings

This will take you to the admin panel.

Now, enter your OpenAI API key. If you don't have one, you can get it here:

https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key

That's it for setup! You're now ready to start chatting.

Start Chatting

Return to the main chat page, select your desired model, and start interacting with OpenAI just like you would with ChatGPT. However, now you have much more flexibility to use any model, any tool, any setting (like temperature), and access a vast prompt library.

http://localhost:3000/

Okay, here's just the "Next Steps" section, formatted with improved structure and without the conversational introduction:

Read more in my Blog Post

Top comments (0)