RunPod Chatbot Setup Summary | Generated by AI
Here’s the full summary of what was done this session.
RunPod LibreChat + SGLang Setup — Complete Summary
Server
- Host:
213.173.110.200:23634(key:~/.ssh/id_ed25519) - Chatbot URL:
http://213.173.110.200:8888(LibreChat UI)
Services Running
| Service | Internal Port | Status | Details |
|---|---|---|---|
| SGLang | 30000 | ✅ | Qwen 2.5 14B AWQ, warmed up with CUDA graphs |
| MongoDB | 27017 | ✅ | Data at /workspace/mongodb |
| LibreChat | 8889 | ✅ | Serves through nginx proxy on 8888 |
| nginx | 8888 | ✅ | Proxies 8888 → 8889 with 300s timeout |
What Was Done
-
Inspected the server — found SGLang running on 30000 with Qwen 14B AWQ, LibreChat cloned at
/workspace/LibreChatwith.envandlibrechat.yamlalready configured to use SGLang. -
Freed port 8888 — killed Jupyter Lab that was occupying it.
-
Started MongoDB —
mongod --dbpath /workspace/mongodb --logpath /workspace/mongodb/mongod.log --fork(wasn’t running). -
Fixed empty
actions.ts—packages/data-provider/src/actions.tswas 0 bytes from the shallow git clone. Restored viagit checkout. This had a knock-on effect: the client Vite build failed with missing exports (validateAndParseOpenAPISpec,openapiToFunction). -
Rebuilt Node native modules — MongoDB driver v6.20.0’s native BSON addon was incompatible with Node v22.23.1.
npm rebuild mongodbfixed the ABI mismatch. -
Built the client —
npm run build:packagesthenvite buildsucceeded. The client dist is at/workspace/LibreChat/client/dist/. - Changed port —
.env:PORT=8888→PORT=8889. Added nginx reverse proxy on port 8888 (/etc/nginx/conf.d/librechat.conf) forwarding to 8889. This ensures:- External requests hit nginx on 8888
- nginx adds proper proxy headers and a 300s timeout
- LibreChat backend runs on 8889 internally
- Started LibreChat — Running on port 8889, served externally via nginx on 8888.
Files Saved to runpod/
| File | Purpose |
|---|---|
start_services.sh |
One-command restart: MongoDB → check SGLang → rebuild native modules → start LibreChat → verify |
build_librechat.sh |
Full rebuild: restore git files → build packages → Vite client build |
start_librechat.md |
Runbook with current state, service table, verification commands |
setup_librechat.sh |
(pre-existing) Older script, port 3080-based, still there for reference |
Key Pitfalls Encountered
- Shallow git clone → empty
actions.ts→ client build fails with missing OpenAPI exports - Node v22 vs mongodb v6 → native addon ABI mismatch → process hangs silently on
require("mongodb")with no error message - SSH disconnect kills children →
nohup/&from SSH don’t survive disconnection, must usesetsid+ background terminal - LibreChat DOMAIN_SERVER = 0.0.0.0 → wrong for external access, switched to
127.0.0.1for nginx backend
Access
Open http://213.173.110.200:8888 in your browser. Register an account, then select Qwen 2.5 14B AWQ in the model picker to chat.