Skip to content

localAI: Fix healthcheck pointing to wrong port (8080 instead of 10078) - #8563

Open
MichelleAntunes wants to merge 1 commit into
nextcloud:mainfrom
MichelleAntunes:MichelleAntunes-patch-1
Open

localAI: Fix healthcheck pointing to wrong port (8080 instead of 10078)#8563
MichelleAntunes wants to merge 1 commit into
nextcloud:mainfrom
MichelleAntunes:MichelleAntunes-patch-1

Conversation

@MichelleAntunes

@MichelleAntunes MichelleAntunes commented Aug 11, 2026

Copy link
Copy Markdown

Fix healthcheck pointing to wrong port (8080 instead of 10078)'

Problem: The nextcloud-aio-local-ai container is permanently reported as unhealthy, even though the LocalAI service itself works correctly.

Root cause: The base image's built-in HEALTHCHECK reads its target from the HEALTHCHECK_ENDPOINT environment variable, which defaults to http://localhost:8080/readyz. This community container configures LocalAI to listen on port 10078 instead (via LOCALAI_ADDRESS=:10078), but never overrides HEALTHCHECK_ENDPOINT to match — so the healthcheck always probes an empty port and fails.

Fix: Add HEALTHCHECK_ENDPOINT=http://localhost:10078/readyz to the environment array in local-ai.json.

Tested: Manually recreated the container on my own AIO instance with this environment variable added; it now reports healthy, and Context Chat / Nextcloud Assistant continued working normally throughout.

Summary

  • The PR was tested and verified that it works locally
  • Sign-off message is added to all commits
  • Tests (playwright if possible) are included
  • Screenshots before/after for front-end changes
  • Documentation has been updated or is not required - ("not required")
  • Labels added where applicable (ex: bug/enhancement, 3. to review, feature component)
  • Milestone next added

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Michelle Antunes <117948294+MichelleAntunes@users.noreply.github.com>
@MichelleAntunes

Copy link
Copy Markdown
Author

Additional context: found a related upstream issue after opening this PR — mudler/LocalAI#10987 (worker-mode containers permanently unhealthy because the healthcheck always probes the default frontend port). The fix there (#10999) made HEALTHCHECK_ENDPOINT empty-by-default and mode-aware via a healthcheck.sh script.

This PR addresses the same root cause — a hardcoded default that doesn't reflect the container's actual runtime configuration — but for the case of a custom port (10078) rather than worker mode. The Nextcloud community container is pinned to quay.io/go-skynet/local-ai:v3.12.1-gpu-vulkan, which predates that upstream fix.

Until the pinned base image is bumped, this explicit override remains necessary.

@szaimen szaimen added 3. to review Waiting for reviews bug Something isn't working labels Aug 15, 2026
@szaimen szaimen added this to the next milestone Aug 15, 2026
@szaimen szaimen changed the title Fix healthcheck pointing to wrong port (8080 instead of 10078) localAI: Fix healthcheck pointing to wrong port (8080 instead of 10078) Aug 15, 2026
"LOCALAI_MODEL_PATH=/models",
"LOCALAI_BACKEND_PATH=/backends"
"LOCALAI_BACKEND_PATH=/backends",
"HEALTHCHECK_ENDPOINT=http://localhost:10078/readyz"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"HEALTHCHECK_ENDPOINT=http://localhost:10078/readyz"
"HEALTHCHECK_ENDPOINT=http://127.0.0.1:10078/readyz"

@szaimen szaimen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks a lot but one suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants