How to Run a ChatGPT Clone UI Locally

Save the Monthly £20+ Subscription to ChatGPT and Run ChatGPT Locally with OpenAI API Tokens

It’s actually really easy to spin up a legit ChatGPT clone which runs from API tokens. There are multiple options and they’re all multi-featured, well supported, and smooth.

This post is a side-quest from the main ProfitSwarm storyline, where I explore dumping my ChatGPT subscription in favour of a locally hosted clone, which can multi-model!

How to Run a ChatGPT Clone Locally

Why Run a Chat GPT Clone?

I’ve been pretty happily paying £20 a month to have access to ChatGPT. The UI is pretty solid at this point and the leverage it gives me is clearly worth more than £20.

A few things struck me recently.

Cloning ChatGPT locally to use with other models

Firstly, I pay £20 a month for ChatGPT, but I pay less than that (usually) for tokens, despite lots of stuff happening on the back end; generating images or scripted AI calls. So the value difference is really just for the easy-access UI & mobile app.

Secondly, my partner is also paying £20/m for the same service. Her token use would be tiny compared.

Thirdly, though I don’t mind supporting the development of better models, I am not sure where I stand with picking which company to back. It’d be nice to be able to easily switch to non OpenAI models to compare outputs.

… these were enough to fire up a little side-quest and see what ChatGPT clones are available.

If you know, you know. Cloning ChatGPT like Mimic!

Current ChatGPT Clone Options

There was less chatter about this online than I expected. A few reddit posts. Not a lot of clear talk.

Here are the repo’s of the main options for running a local GPT clone:

  • open-webui – 100k ⭐ – Docker – Recently updated
  • LibreChat – 27k ⭐ – Docker – Recently updated
  • gpt4all – 73k ⭐ – Focus on Locally run LLMS – Last updated 4m ago
  • text-generation-webui – 44k ⭐ – Local App – Recently updated
  • chatwire – 156 ⭐ – Laravel PHP version – Last updated 5m ago

Depending on what you’re looking for there are several very usable options which are only one or two terminal lines away.

In my dream scenario there’d be a legit PHP/Next JS clone just sitting in a Github repo somewhere. I found ChatWire, but I am not a fan of Laravel, and really, I didn’t need to see under the hood anyway.

I opted to test open-webui and LibreChat.

open-webui vs LibreChat

Both of these ChatGPT clones are easy to install via Docker or pip.

ChatGPT clones running in Docker and absorbing performance
ChatGPT clones running in Docker and absorbing performance

I don’t love the Docker approach, but don’t get me started on that.

Here’s a rough summary of my comparison:

open-webuiLibreChat
Ease of install: Trivial 👍Trivial 👍
Platform: Docker 🐳Docker 🐳
Model Support:Supports OpenAI & other models EasilySupports OpenAI & other models Easily
Technical Performance:Seems a tad more CPU greedy 🥵Runs quite leanly 😎
UI:Very clean clone of ChatGPTVery clean clone of ChatGPT, with added sidebar
Giving GPT Web Access: Worked okay, (1 x API sign up needed)Worked well, slightly more refined (but 3 x API sign ups needed)
Can be set up on public domain:Can be hosted on Linux serversCan be hosted on Linux servers
Bugs seen:2 small bugsNone, yet

In essence they provide very similar outcomes to anyone wanting to clone ChatGPT.

My personal gut-feel was that I preferred LibreChat, it felt snappier and I couldn’t break it if I tried.

If you manage to error out a chat in open webui this happens thereafter killing that thread

That’s not to say open-webui is no good, it’s totally usable.

I mean, look at them side by side:

open-webui homepage
open webui homepage
LibreChat homepage
LibreChat homepage

How to Use LibreChat Locally and Replace ChatGPT

Here’s how I’ve installed LibreChat and am using it as my daily-driver GPT (install Docker first if you haven’t already got it installed):

git clone https://github.com/danny-avila/LibreChat.git
cd LibreChat
cp .env.example .env

Edit your .env file as follows:

- Find and uncomment OPENAI_API_KEY & provide key
- Sign up to Serper (free) & provide key in SERPER_API_KEY
- Sign up to FireCrawl (free) & provide key in FIRECRAWL_API_KEY
- Sign up to Jina (free) & provide key in JINA_API_KEY
Cloning ChatGPT - installing it locally: You'll need a few free or cheap APIs like Firecrawl and Serper
Youll need a few free or cheap APIs like Firecrawl and Serper

Then start it with:

docker compose up -d

… got to http://localhost:3080 and you’re good, your clone can even browse the web from here:

Querying OpenAI AI models via API and tokens instead of ChatGPT (with serper and firecrawl in LibreChat)

That’s the whole thing! Now you’re using OpenAI (or other model) API tokens instead of your monthly sub.

Is LibreChat as Good as the £20+/m Version?

I’m going to test this for the next month or so then report back. From my first tests, I’d say it’s 90% as slick.

  • Usual o3 / 4o quality responses at token price
  • Deals with files well
  • Searches the web well
  • Easily tweak model settings from sidebar

Downsides I’d point out:

  • Not local aliased by default (I’d set up reverse proxy so I can have this at chat.local or similar)
  • Will need router config to be available on other devices
  • Would need a server on if wanted to access from devices

Let’s see if I can truely kill our household monthly subs to OpenAI, given all that.

Will I Keep Using LibreChat over ChatGPT?

For now, yes I will.

I’ll not easily forget the ease of interaction and smoothness of those first months model interactions with ChatGPT – but now it’s years later and I am looking forward to breaking the shackles of single-AI-company buy-in, and testing a bunch more models across tasks.

Does it make sense for everybody to host their own ChatGPT Clone?

I’m not sure it does. £20 a month isn’t going to make a massive deal to a lot of us in the tech space. Unless you have a deep interest in AI progression and building stuff using these models, it’s probably not worth dealing with tunnelling etc. to get this to all of your devices.

Cloning ChatGPT locally: One does not simply clone a web service with good native device support

Have you Tried Self-Hosting GPT?

Have you had any experience self-hosting ChatGPT like UI’s? Please do share in the comments

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *