-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Context Chat Backend is unreachable from Nextcloud when using Nextcloud AIO. The backend container binds to 127.0.0.1:23000 (localhost only) via the APP_HOST environment variable, but when deployed on host network mode, the Nextcloud container (running on Docker bridge network) cannot reach localhost of the host machine.
The Context Chat settings page shows: "The Context Chat Backend app is not installed or not responding" and "CC Backend unavailable (0 sent)".
Root cause identified:
Context Chat Backend runs on host network (--network host)
The backend binds to 127.0.0.1:23000 due to APP_HOST=127.0.0.1 env var
Nextcloud container runs on bridge network (nextcloud-aio)
Nextcloud tries to reach the backend but cannot access 127.0.0.1 from a different network namespace
Attempted workarounds:
Tried app_api:app:register --env "APP_HOST=0.0.0.0" - registration failed
Tried manually running container with -e APP_HOST=0.0.0.0 - failed due to missing other required AppAPI env vars
Cannot connect container to bridge network due to host network mode
Context Chat Backend logs: INFO: Uvicorn running on http://127.0.0.1/:23000 (Press CTRL+C to quit) Exiting embedding server as it is not configured to run locally.
Setup Details:
Nextcloud Version: 32.0.4.1
AppAPI Version: 32.0.0
Context Chat PHP Version: 5.2.0
Context Chat Backend Version: 5.2.0
Nextcloud deployment method: Nextcloud AIO (All-in-One Docker)
Context Chat Backend deployment method: One-click from External Apps
Suggested fix: Change default APP_HOST to 0.0.0.0 when deploying on host network, or allow AppAPI to specify environment variables during deployment.