selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GPTPortal logo

Self-host GPTPortal

v1.1.2

Unified chat interface for all major LLM providers

ReleaseOpen SourceMIT
Updated10 months ago
LanguageJavaScript
Setup difficultyModerate
MobileResponsive
ThemeDark mode
Stars
396
Port
3000 (HTTP server)
Docker
ghcr.io/zaki-1052/gptportal
Install with Docker

What is GPTPortal?

GPTPortal is a locally-run web app that lets you chat with many different AI models through one interface. It connects to major providers like OpenAI, Anthropic, Google, and others, plus local models via Ollama or similar tools. You provide your own API keys. The app streams responses in real time, handles images and files, supports voice input and output, can generate images, and lets you compare multiple models side by side. It tracks token usage and cost as you chat. The interface has light and dark modes that follow your system setting. Built with plain Node.js and vanilla JavaScript — no build step, no database, no frontend framework. You can run it directly with Node, or use Docker or Docker Compose. Login uses HTTP Basic Auth. The code is MIT licensed.

Should you self-host GPTPortal?

GPTPortal scores 50/100 on selfhost.directory (how scoring works) and ranks #28 of 69 in AI Chat. It has 396 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in JavaScript.

Its closest alternative on selfhost.directory is LibreChat (85/100, 46 430 stars). It scores higher overall, so compare the two before you pick. See GPTPortal vs LibreChat side by side.

GPTPortal README

How to install GPTPortal

Install GPTPortal with Docker

Docker

docker build -t gptportal . docker run -p 3000:3000 --env-file ./.env --name gptportal gptportal

Multi-stage Dockerfile with non-root user and dumb-init

GPTPortal releases & version history

FAQ

Can I run models that never touch the internet?

Yes — configure a local endpoint (Ollama, LM Studio, vLLM) as described. Those models run on your hardware and your prompts don't leave the machine.

How do I update to a newer version?

From the project folder, git pull origin main, then npm install if dependencies changed, then restart. Your .env is preserved because it's git-ignored.

Is my data safe?

Your keys and conversations stay on your machine; the only outbound traffic is the API calls you make to the providers you chose (and none, for local endpoints).

Where do I add my key — I can't see the .env file?

On macOS, dotfiles are hidden in Finder; press Cmd + Shift + . to reveal them, or use the in-app .env editor, or edit the file from your terminal. On Windows it should be visible.

Voice doesn't work

You're probably in Safari. WebKit lacks the codecs the recorder uses; switch to a Chromium browser or Firefox.

Streaming doesn't show; the answer appears all at once

Some models and providers don't support streaming and fall back to a single response. If nothing streams, check that a proxy isn't buffering text/event-stream responses.

Cannot find module on startup

Run npm install again. This happens after an update that added a dependency, or if the first install was interrupted.

A whole provider's models are missing or won't respond

That provider's key isn't configured. Each provider only initializes when its key is present; the startup logs list which ones came up.

A model returns an error or a 400

Usually the provider's key isn't set, the key is out of credit, or you selected a model your key doesn't have access to. Check the server logs for the provider and underlying error.

The browser keeps asking me to log in, or rejects my credentials

The username and password come from USER_USERNAME and USER_PASSWORD in .env. Make sure both are set and that you restarted the server after editing .env.

The server won't start: EADDRINUSE

Port 3000 is already in use. Either stop whatever is using it, or set a different PORT_SERVER in .env.

More in AI Chat

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…