opencode
opencode copied to clipboard
Failing to authenticate into web UI when username or password is set
Description
I set the environment variables OPENCODE_SERVER_USERNAME and OPENCODE_SERVER_PASSWORD, and then started a web UI using the opencode web command. However, when I open the server URL on browser, the authentication dialog keeps opening up even when I put correct username and password.
The server logs just say failed, and the subsequent run of opencode fails with an error saying Unauthorized.
If I unset the environment variables, opencode works again.
Plugins
No response
OpenCode version
1.1.21
Steps to reproduce
- Set
OPENCODE_SERVER_USERNAMEandOPENCODE_SERVER_PASSWORDenvironment variables - Run
opencode web--> cannot authenticate with the correct username and password - Run
opencode--> fails with an errorUnauthorized - Unset
OPENCODE_SERVER_USERNAMEandOPENCODE_SERVER_PASSWORD -
opencodeworks again
Screenshot and/or share link
Operating System
macOS 26.3
Terminal
Ghostty