Nextcloud Talk Bot Troubleshooting | Generated by AI
Review: How We Troubleshot the Nextcloud Talk Bot
π Root Causes Found (in order of discovery)
| # | Issue | Error Seen | Why It Happened |
|---|---|---|---|
| 1 | baseUrl mismatch |
401 Invalid backend |
Nextcloud sends X-Nextcloud-Talk-Backend: http://localhost, but OpenClaw expected http://172.17.0.1:8080 |
| 2 | allowPrivateNetwork missing |
blocked URL fetch... reason=Blocked: private IP |
OpenClawβs security blocked outbound calls to Dockerβs 172.17.0.1 |
| 3 | Missing webhookPublicUrl |
Nextcloud couldnβt find webhook URL | Bot registered with wrong/unreachable URL |
| 4 | Replay dedupe blocking | replayed webhook ignored |
Old message IDs cached for 24 hours |
| 5 | βInvalid payload formatβ (400) | "type":"Activity" not accepted |
OpenClaw only accepted Create/Update/Delete, but Nextcloud sends Activity |
| 6 | http://localhost goes to nginx, not Nextcloud |
404 on API calls, room not found |
Host port 80 (nginx) β Nextcloud port 8080 |
π οΈ Fixes Applied
# 1. OpenClaw config
baseUrl: "http://localhost:8080" # Matches Nextcloud's overwrite.cli.url
webhookPublicUrl: "http://172.17.0.1:8788" # Where Nextcloud reaches OpenClaw
allowPrivateNetwork: true # Allow Docker IP calls
# 2. Nextcloud config
overwrite.cli.url = "http://localhost:8080" # Include port!
# 3. OpenClaw source patch (for "Activity" type)
# File: dist/channel-W1Ul32NW.js
# Before: type: z.enum(["Create", "Update", "Delete"])
# After: type: z.enum(["Create", "Update", "Delete", "Activity"])
# And: if (payload.type !== "Create" && payload.type !== "Activity")
# 4. Reinstalled bot fresh (ID 8 β ID 9)
# 5. Cleared replay dedupe files
π The βlocalhostβ Trap (Key Lesson)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β http://localhost = PORT 80 (nginx on HOST) β WRONG β
β http://localhost:8080 = Nextcloud Apache inside Docker β
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
OpenClaw was sending replies to http://localhost/ocs/v2.php/... which hit nginx (port 80) β 404, not Nextcloud!
π€ Why This Was So Confusing
- Two separate problems masked each other:
- Signature rejection (401) hid the localhost issue
- After fixing signature, payload format error hid the localhost API issue
- No single log showed everything:
- Nextcloud saw:
401 Invalid backendβ400 Invalid payloadβ (fixed) β404 room not found - OpenClaw saw: webhook requests coming in, but reply API calls going to wrong host
- Nextcloud saw:
- Multiple config files involved:
config.phpin Nextcloud Dockeropenclaw.jsonlocally- Bot registration in Nextcloud database
- Signature verification passed but API call failed silently
β Current Status
| Component | Value | Status |
|---|---|---|
Nextcloud overwrite.cli.url |
http://localhost:8080 |
β |
OpenClaw baseUrl |
http://localhost:8080 |
β |
OpenClaw webhookPublicUrl |
http://172.17.0.1:8788 |
β |
OpenClaw allowPrivateNetwork |
true |
β |
| Bot ID | 9 (fresh install) | β |
| Payload type patch | "Activity" accepted |
β |
Please test NOW β the last error (room not found) should be resolved by the localhost:8080 fix. π¦