diff options
| author | Dax Raad <[email protected]> | 2026-01-12 15:43:48 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2026-01-12 15:43:48 -0500 |
| commit | 7ca767de55c50f47bbace107619d79586c1c53d7 (patch) | |
| tree | 3161b7ffe67d29e29fa781d3efa25fb3bc7b6bff /packages/web/src/content/docs/server.mdx | |
| parent | 1954c1255e71ab86283e6a99ac82598268fc308d (diff) | |
| download | opencode-7ca767de55c50f47bbace107619d79586c1c53d7.tar.gz opencode-7ca767de55c50f47bbace107619d79586c1c53d7.zip | |
core: fix HTTP exception handling order to prevent NamedError from masking HTTP exceptions
docs: add OPENCODE_PASSWORD environment variable documentation for basic auth
Diffstat (limited to 'packages/web/src/content/docs/server.mdx')
| -rw-r--r-- | packages/web/src/content/docs/server.mdx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/web/src/content/docs/server.mdx b/packages/web/src/content/docs/server.mdx index a61d7bae1..a123acb15 100644 --- a/packages/web/src/content/docs/server.mdx +++ b/packages/web/src/content/docs/server.mdx @@ -33,6 +33,16 @@ opencode serve --cors http://localhost:5173 --cors https://app.example.com --- +### Authentication + +Set `OPENCODE_PASSWORD` to protect the server with HTTP basic auth. The username is always `opencode`, and the password is the value of `OPENCODE_PASSWORD`. This applies to both `opencode serve` and `opencode web`. + +```bash +OPENCODE_PASSWORD=your-password opencode serve +``` + +--- + ### How it works When you run `opencode` it starts a TUI and a server. Where the TUI is the |
