Education logo

Stop Using External AIs Like ChatGPT, Run A Local AI Server

Why I'm doing it and how you can do it too

By Mil HoornaertPublished 2 years ago • 3 min read
Someone sitting at a campfire ~ Generated with AI by the author

In a world where data has become one of the most valuable currencies, it's hard to keep control of your data.

When I want to use AI, I no longer go to ChatGPT to send my requests; instead, I can access models like GPT-4o, DeepSeek R1, and more, all via my localhost.

There are a couple of good reasons why I'm preferring using AI this way over the traditional (and arguably more convenient) way.

In this piece I'll break down all the benefits of using it like I'm doing and how you can set it up too.

Access the best models, all in one place.

If you're a bit into AI, you probably know that there are a lot of different models. You have awesome models like 'Claude 3.7', 'Gemini 2.5', 'DeepSeek R1', and a lot of GPTs.

The problem is that if you wanted to use all of these, you'd have to either go to 4 different websites and be limited by free plans or pay 4 different subscriptions.

Luckily, there's a cheaper and more convenient alternative.

Ditch over-priced subscriptions for usage-based API plans.

Instead of buying a bunch of subscriptions, you can get an API key for all of these models and access them without the fixed subscription cost.

This is great because you can access a model like 'Claude 3.7' without having to pay $18/mo. Instead, you pay as you go, meaning you pay for the requests you send.

Another advantage is that you can have multiple API keys for different models, allowing you to access GPT models, DeepSeek, Claude and Gemini models in one place.

You can even use an extra service like LiteLLM (free and open source) to set payment limits for models, so you don't go broke chatting with a model.

Another use case of LiteLLM is for controlling a group of users (your kids, for example) access to specific models.

More features, fewer subscriptions

I'm able to access features like image generation, voice calling, web search and a lot more, all for free, with no limitations.

Running your AI with a local copy of Open WebUI allows you to:

  • Access high-end models without subscriptions.
  • Get advanced features without limitations
  • Run local models (no internet connection needed)
  • Host an 'AI server' for your family.

Control your AI providers.

Finally, you can also control where your data goes.

If you don't want to use a Chinese-hosted DeepSeek model, you can simply find an API provider that's US-based, for example, and use that version.

You have control over which AI provider you use, so you can (somewhat) control where your data goes.

Running your own local AI in 5 minutes

In order to get started running a local AI server, we'll need two things:

  • Ollama (for local AI models)
  • Open WebUI

We'll use a single Docker installation prompt to install both within seconds:

docker run -d -p 3000:8080 -v ollama:/root/.ollama -v open-webui:/app/backend/data - name open-webui - restart always ghcr.io/open-webui/open-webui:ollama

If you have Docker installed, you should be able to access your Open WebUI at localhost:3000 now.

When opening it for the first time, you'll be prompted to create an admin account. This account will be able to control other users and advanced features, so make sure to remember the login details.

It's that simple, you now have Open WebUI installed!

Accessing Models

You probably don't want to only use local AI (unless you have super powerful hardware and are able to run them), so let's connect with some API endpoints.

The easiest setup will probably be OpenAI, but there are also free options.

I personally use Akash Chat's API and GitHub Models, which allow me access to great models for free. They're very easy to set up (you can ask AI for help if you're struggling).

Simply go to 'Settings' -> 'Connections' and find the '+' button to add new connections.

Here, you'll need to add the API endpoint and your API key. After that, click 'test connection' to see if it's working.

Now you should be able to find your models in the top left on the new chat window and have your first conversations.

Diving deeper

If you want to dive deeper into the possible use cases and features this setup provides, I highly recommend watching this video.

It explains how to set up LiteLLM to manage your usage rates. For other features like (local) image generation, you can have a look at Open WebUI's documentation.

how to

About the Creator

Mil Hoornaert

Helping young, aspiring entrpreneurs build, launch and promote their startups faster using AI.

Enjoyed the story? Support the Creator.

Subscribe for free to receive all their stories in your feed.

Subscribe For Free

Reader insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment
    Written by Mil Hoornaert