# openchat
**Repository Path**: workingbird/openchat
## Basic Information
- **Project Name**: openchat
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: AGPL-3.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-04-23
- **Last Updated**: 2026-04-23
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README





[](https://discord.gg/fVz7N5Nduj)


OpenChat
**OpenChat is an open source, self-hosted, AI User Interface** with the goal of developing the most **feature rich, free, AI User Interface.**

### Get Started
#### Local
1) Clone and install dependencies
```bash
git clone https://github.com/openchatui/openchat.git
cd openchat
npm install
```
2) Create your environment file
```bash
cp .env.example .env
```
3) Initialize database and run
#### Dev mode (hot reload):
```bash
npm run db:push
npm run dev
```
#### Production-like run:
```bash
npm run serve # runs migrations, builds, and starts Next.js
```
Now open [http://localhost:3000](http://localhost:3000).
> [!NOTE]
> - DB selection is controlled by `DB` (`sqlite` or `postgres`).
> - For PostgreSQL set `DB=postgres` and `DATABASE_URL` (or `POSTGRES_URL` / `POSTGRES_DIRECT_URL`) in `.env`.
#### Docker (single container)
Pull and run with defaults (port 3000 inside the container):
```bash
docker pull ghcr.io/openchatui/openchatui:latest
docker run --name openchat \
-p 3000:3000 \
-e PORT=3000 \
-e AUTH_URL="http://localhost:3000" \
-e AUTH_SECRET="$(openssl rand -base64 32)" \
-v "$(pwd)/data:/app/data" \
--restart unless-stopped \
ghcr.io/openchatui/openchatui:latest
```
> [!TIP]
> - Change the host port by editing the `-p` flag (e.g., `-p 3001:3001` together with `-e PORT=3001`).
> - If you prefer PostgreSQL, add `-e DB=postgres -e DATABASE_URL=postgresql://user:pass@host:5432/dbname`.
> - Optional (persist SQLite outside the image): mount a host folder at `/app/data` and set `SQLITE_URL=file:/app/data/openchat.db` (DB defaults to sqlite in the image). Avoid mounting `/prisma` to prevent overriding bundled migrations.
> - The container will generate an `AUTH_SECRET` if not provided; set it for persistence across restarts.
##### Optional: Public landing (disable auth)
Set `AUTH=false` to allow unauthenticated users to access the public landing page while keeping the `/admin` area protected and requiring admin login.
#### Docker Compose
A ready-to-use `docker-compose.yml` is included. It maps port `3000` and persists SQLite data to `./data` mounted at `/app/data`.
Minimal compose file:
```yaml
services:
openchat:
image: ghcr.io/openchatui/openchatui:latest
ports:
- "3000:3000"
environment:
PORT: "3000"
AUTH_URL: "http://localhost:3000"
AUTH_SECRET: ""
volumes:
- ./data:/app/data
restart: unless-stopped
```
Start in the background:
```bash
docker compose up -d
```
Stop and remove the container:
```bash
docker compose down
```
> [!TIP]
> - Change the external port by editing `ports` and the internal app port by `environment: PORT` and `AUTH_URL`.
> - Optional (persist SQLite outside the image): mount `./data:/app/data` and set `SQLITE_URL=file:/app/data/openchat.db` (DB defaults to sqlite in the image). Avoid mounting `/prisma` to prevent overriding bundled migrations.
> - Switch to PostgreSQL: set `DB=postgres` and provide `DATABASE_URL` in `environment`. You can add a separate Postgres service if needed.
# Features
- ๐ค Multiโprovider AI: OpenAI, OpenRouter, Ollama (via AI SDK)
- ๐ผ๏ธ Image generation (OpenAI)
- ๐ฌ Video generation (Sora 2)
- ๐๏ธ Voice chat and TTS (e.g., ElevenLabs)
- ๐ Browserless/headless web tools (automation via Browserbase)
- ๐ Drive and Docs: Google Drive/Google Docs integration or local documents
- ๐ฌ Rich chat management: folders, tags, pinning, sharing
- ๐ Markdown with math (KaTeX) and code highlighting (Shiki)
- ๐ File and PDF reading
- ๐ Builtโin REST API docs (Swagger UI)
- ๐ Authentication with sessions and roles
- ๐๏ธ SQLite or PostgreSQL via Prisma
- ๐ณ Docker and Docker Compose support
### Wishlist
- Documents: Tika, Docling, OCR (for drive)
- Image Gen: Midjourney, Auto1111, ComfyUI, Gemini, other providers
- Vision models and UI
- TTS/Voice: Deepgram
- AWS Bedrock, Azure OpenAI, Google Cloud integrations
- Code: Jupyeter, Pyodide
- Web: Playwright/Puppeteer, Google PSE, serpapi, firecrawl, bing, searchapi, etc.


