Skip to content

Health check password protected #12805

Closed as not planned
Closed as not planned

Description

@pando85

Description

When running opencode serve with OPENCODE_SERVER_PASSWORD the health check endpoint (/global/health) needs authentication.
That's not expected and doesn't follow standard practices in the industry.

I could help fix the issue if you are interested in it.

Plugins

No response

OpenCode version

No response

Steps to reproduce

  1. Deploy opencode serve with OPENCODE_SERVER_PASSWORD envar value
  2. Check endpoint /global/health, you will require basic auth.

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Feb 9, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    All these issues stem from the same root cause: HTTP Basic Auth middleware is being applied too broadly and blocks endpoints/resources that shouldn't require authentication (health checks, static assets, CORS preflight requests, plugin API calls, etc.)

    Feel free to ignore if this specific case differs from those listed above.

  2. j4ckstraw commented on Mar 16, 2026

    @j4ckstraw

    +1

  3. m2kar commented on Mar 20, 2026

    @m2kar

    +1

  4. levmichael3 commented on Apr 13, 2026

    @levmichael3

    We're deploying OpenCode to EKS with an ALB ingress. The health check (/global/health) being password-protected blocks ALB health checks - the load balancer can't authenticate.

    Workaround suggested: Use nginx sidecar for auth, keeping OpenCode unauthenticated internally. This pattern is common in k8s deployments:

    • Nginx handles external auth + TLS termination
    • OpenCode runs without credentials inside the cluster

    Is there appetite for a PR implementing nginx sidecar auth example in the Helm chart? Or any alternative approaches you'd recommend?

  5. iv0 commented on Apr 19, 2026

    @iv0

    +1

  6. assigned and unassigned on Apr 26, 2026
  7. removed
    bugSomething isn't working
    on May 3, 2026
  8. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions