You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update README with simplified MongoDB setup instructions
Streamlines the setup steps by clarifying that MongoDB configuration is optional for local development, as Chat UI now falls back to an embedded MongoDB if MONGODB_URL is not set. Updates Docker instructions and removes redundant details about MongoDB setup, making the guide easier to follow for new users.
Copy file name to clipboardExpand all lines: README.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,6 @@ Chat UI speaks to OpenAI-compatible APIs only. The fastest way to get running is
26
26
```env
27
27
OPENAI_BASE_URL=https://router.huggingface.co/v1
28
28
OPENAI_API_KEY=hf_************************
29
-
# Fill in once you pick a database option below
30
-
MONGODB_URL=
31
29
```
32
30
33
31
`OPENAI_API_KEY` can come from any OpenAI-compatible endpoint you plan to call. Pick the combo that matches your setup and drop the values into `.env.local`:
@@ -42,9 +40,7 @@ MONGODB_URL=
42
40
43
41
Check the root [`.env` template](./.env) for the full list of optional variables you can override.
44
42
45
-
**Step 2 – Choose where MongoDB lives:** Either provision a managed cluster (for example MongoDB Atlas) or run a local container. Both approaches are described in [Database Options](#database-options). After you have the URI, drop it into `MONGODB_URL` (and, if desired, set `MONGODB_DB_NAME`).
46
-
47
-
**Step 3 – Install and launch the dev server:**
43
+
**Step 2 – Install and launch the dev server:**
48
44
49
45
```bash
50
46
git clone https://github.com/huggingface/chat-ui
@@ -59,6 +55,9 @@ You now have Chat UI running locally. Open the browser and start chatting.
59
55
60
56
Chat history, users, settings, files, and stats all live in MongoDB. You can point Chat UI at any MongoDB 6/7 deployment.
61
57
58
+
> [!TIP]
59
+
> For quick local development, you can skip this section. When `MONGODB_URL` is not set, Chat UI falls back to an embedded MongoDB that persists to `./db`.
60
+
62
61
### MongoDB Atlas (managed)
63
62
64
63
1. Create a free cluster at [mongodb.com](https://www.mongodb.com/pricing).
@@ -70,13 +69,13 @@ Atlas keeps MongoDB off your laptop, which is ideal for teams or cloud deploymen
70
69
71
70
### Local MongoDB (container)
72
71
73
-
If you prefer to run MongoDB locally:
72
+
If you prefer to run MongoDB in a container:
74
73
75
74
```bash
76
75
docker run -d -p 27017:27017 --name mongo-chatui mongo:latest
77
76
```
78
77
79
-
Then set `MONGODB_URL=mongodb://localhost:27017` in `.env.local`. You can also supply `MONGO_STORAGE_PATH` if you want Chat UI’s fallback in-memory server to persist under a specific folder.
78
+
Then set `MONGODB_URL=mongodb://localhost:27017` in `.env.local`.
80
79
81
80
## Launch
82
81
@@ -91,19 +90,18 @@ The dev server listens on `http://localhost:5173` by default. Use `npm run build
91
90
92
91
## Optional Docker Image
93
92
94
-
Prefer containerized setup? You can run everything in one container as long as you supply a MongoDB URI (local or hosted):
93
+
The `chat-ui-db` image bundles MongoDB inside the container:
`host.docker.internal` lets the container reach a MongoDB instance on your host machine; swap it for your Atlas URI if you use the hosted option. All environment variables accepted in `.env.local` can be provided as `-e` flags.
104
+
All environment variables accepted in `.env.local` can be provided as `-e` flags.
0 commit comments