mirror of
https://github.com/ownpilot/OwnPilot.git
synced 2026-04-25 15:25:52 +03:00
[GH-ISSUE #4] API Error: ServiceRegistry not initialized after installation #1
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OwnPilot#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @saflisgit on GitHub (Feb 24, 2026).
Original GitHub issue: https://github.com/ownpilot/OwnPilot/issues/4
Started with docker compose, configured an api key but cannot use chat or dashboard due to error like :
"API Error ServiceRegistry not initialized. Call initServiceRegistry() during startup."
@UX1907 commented on GitHub (Feb 24, 2026):
Hi @saflisgit — I ran into the same issue and tracked it down. There are three bugs causing this:
1.
ServiceRegistry not initialized(the main error)The Docker entrypoint uses the CLI
startcommand (node packages/cli/dist/index.js start) which has a lightweight startup path that skips the full ServiceRegistry initialization (all 23 services). The proper server entry point (packages/gateway/dist/server.js) registers everything correctly.Fix — in
Dockerfile, change:2. Docker health check shows "unhealthy"
Alpine Linux resolves
localhostto IPv6::1, but the server binds to IPv40.0.0.0. The health check silently fails.Fix — in
Dockerfile:And in
docker-compose.yml(gateway service healthcheck):3. Demo mode with non-standard providers (e.g. MiniMax)
If you configure a provider that isn't in the hardcoded list inside
isDemoMode()(like MiniMax), the system still thinks it's in demo mode and returns canned responses instead of real AI output.Fix — in
packages/gateway/src/routes/agent-service.ts, replace the provider list check:After all fixes
All 23 services register correctly, health checks pass, and chat/dashboard work as expected.
@ersinkoc commented on GitHub (Feb 24, 2026):
Hey @saflisgit — thanks for reporting this! All three root causes have been fixed on
main:ServiceRegistry not initialized— Docker CMD now usespackages/gateway/dist/server.jsdirectly (full 23-service initialization) instead of the CLIstartcommand.localhost→127.0.0.1(Alpine resolves localhost to IPv6::1but the server binds IPv4).isDemoMode()now checksconfigured.size > 0instead of a hardcoded 11-provider list.These will be included in the next release. In the meantime you can build from
main:Closing this — feel free to reopen if you still hit issues!