Update Self-Hosting: add bot and webhook instructions, update env vars

2026-06-28 17:19:03 -04:00
parent 8f3c088674
commit e1b1c385b5
+54 -10
@@ -21,28 +21,33 @@ This starts:
Copy `.env.example` to `.env` and set:
```env
# App
DUMPSTER_HOST=chat.your.domain
DUMPSTER_PORT=8080
DUMPSTER_SECRET=change-me
DUMPSTER_SECRET=<random-secret>
# Database
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_USER=dumpster
POSTGRES_PASSWORD=change-me
POSTGRES_PASSWORD=<random-password>
POSTGRES_DB=dumpster
# Cache
VALKEY_URL=redis://valkey:6379
# File storage (optional)
MINIO_ENDPOINT=minio:9000
MINIO_ACCESS_KEY=dumpster
MINIO_SECRET_KEY=change-me
MINIO_ACCESS_KEY=<random>
MINIO_SECRET_KEY=<random>
MINIO_BUCKET=dumpster-files
LIVEKIT_API_KEY=devkey
LIVEKIT_API_SECRET=change-me
# Voice/video (optional)
LIVEKIT_API_KEY=<random>
LIVEKIT_API_SECRET=<random>
VAPID_PUBLIC_KEY=...
VAPID_PRIVATE_KEY=...
VAPID_SUBJECT=mailto:admin@your.domain
# Giphy (optional)
GIPHY_API_KEY=<your-key>
```
## Ports required
@@ -56,6 +61,22 @@ VAPID_SUBJECT=mailto:admin@your.domain
| 50000-50100/udp | LiveKit relay |
| 10000-20000/udp | coturn media relay |
## First run
```bash
# Start services
docker compose -f docker/compose.yml up -d
# Run migrations (creates tables)
go run ./cmd/migrate up
# Start the server
go run ./cmd/server
# In dev, start the web frontend separately
cd web && npm install && npm run dev
```
## Production TLS
For production, update `docker/Caddyfile`:
@@ -64,10 +85,33 @@ For production, update `docker/Caddyfile`:
chat.your.domain {
reverse_proxy /api/* app:8080
reverse_proxy /ws app:8080
reverse_proxy /livekit/* livekit:7880
reverse_proxy /ws/bot app:8080
reverse_proxy /webhooks/* app:8080
reverse_proxy /files/* app:8080
root * /srv/web
file_server
}
```
Remove `auto_https off` and Caddy will fetch Let's Encrypt certificates.
## Adding bots
1. Create a bot via the web UI (`/bots` page)
2. Copy the bot token (shown once)
3. Add the bot to a server
4. Run the bot:
```bash
BOT_TOKEN=<token> go run ./examples/modbot/main.go
```
## Webhooks
1. Create a webhook via the API or web UI
2. Copy the webhook URL (includes token)
3. POST to the URL:
```bash
curl -X POST https://chat.your.domain/webhooks/<id>/<token> \
-H "Content-Type: application/json" \
-d '{"content": "Hello from webhook!", "username": "GitHub"}'
```