Skip to content

bug: /admin returns 404 Not Found even on fresh gbrain init + gbrain serve --http #1090

@dkmasterson-re

Description

@dkmasterson-re

Description

After a clean install (git clone + bun install + gbrain init --pglite), running gbrain serve --http --port 8787 --bind 0.0.0.0 results in /admin returning Cannot GET /admin (404).

This happens even when accessing directly via localhost (no reverse proxy involved).

Steps to Reproduce

  1. Fresh clone of gbrain on Raspberry Pi 5 (Debian)
  2. bun install
  3. bunx gbrain init --pglite (chose conservative mode)
  4. Start with: gbrain serve --http --port 8787 --bind 0.0.0.0
  5. Access http://localhost:8787/admin or http://127.0.0.1:8787/admin

Expected Behavior

The admin dashboard should be accessible (as advertised in the startup banner: Admin: http://localhost:8787/admin).

Actual Behavior

Returns:
Cannot GET /admin
text(HTTP 404 from Express)

Environment

  • GBrain version: 0.35.1.0
  • Engine: PGLite (fresh database)
  • OS: Debian (Raspberry Pi 5)
  • Run method: systemd service + manual start both tested
  • Also tested via Caddy reverse proxy on public subdomain (same result)

Additional Context

  • gbrain doctor reports healthy (95/100).
  • /health endpoint works correctly.
  • The startup banner always prints the admin URL and a token, but the route does not respond.
  • This behavior started appearing after PGLite locking issues in a previous install. A full reinstall + fresh gbrain init did not resolve it.

Questions for Maintainers

  • Is the web admin dashboard expected to work out-of-the-box after gbrain init + serve --http?
  • Does it require additional initialization steps (e.g. OAuth client creation, bootstrap token usage, or specific environment variables)?
  • Is the admin SPA only served under certain conditions?

Happy to provide more logs or reproduction steps if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions