Skip to content

OPENCODE_SERVER_PASSWORD breaks TUI startup with --mdns or --hostname #29847

Closed

Description

@blairhudson

Setting OPENCODE_SERVER_PASSWORD breaks normal TUI startup when using --mdns or --hostname.

Repro

export OPENCODE_SERVER_PASSWORD=changeme123
opencode --mdns

Also fails with:

export OPENCODE_SERVER_PASSWORD=changeme123
opencode --hostname 0.0.0.0

Error

Error: 4 of 6 requests failed:
config.providers: opencode server GET http://0.0.0.0:4096/config/providers?... → 401 Unauthorized
provider.list: opencode server GET http://0.0.0.0:4096/provider?... → 401 Unauthorized
app.agents: opencode server GET http://0.0.0.0:4096/agent?... → 401 Unauthorized
config.get: opencode server GET http://0.0.0.0:4096/config?... → 401 Unauthorized

Expected

TUI should start successfully.

If OPENCODE_SERVER_PASSWORD enables Basic auth, internal TUI requests should include auth or otherwise work.

Why it matters

--mdns and --hostname 0.0.0.0 expose OpenCode on LAN. Password auth should be usable with those modes.

Activity

  1. github-actions commented on May 29, 2026

    @github-actions
    Contributor

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

  2. OpeOginni commented on May 29, 2026

    @OpeOginni
    Contributor

    I am able to reproduce, and I am looking at a fix!

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