You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/web/src/content/docs/cli.mdx
+24-23Lines changed: 24 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -358,7 +358,7 @@ Start a headless OpenCode server for API access. Check out the [server docs](/do
358
358
opencode serve
359
359
```
360
360
361
-
This starts an HTTP server that provides API access to opencode functionality without the TUI interface. Set `OPENCODE_PASSWORD` to enable HTTP basic auth (username `opencode`).
361
+
This starts an HTTP server that provides API access to opencode functionality without the TUI interface. Set `OPENCODE_SERVER_PASSWORD` to enable HTTP basic auth (username defaults to`opencode`).
362
362
363
363
#### Flags
364
364
@@ -454,7 +454,7 @@ Start a headless OpenCode server with a web interface.
454
454
opencode web
455
455
```
456
456
457
-
This starts an HTTP server and opens a web browser to access OpenCode through a web interface. Set `OPENCODE_PASSWORD` to enable HTTP basic auth (username `opencode`).
457
+
This starts an HTTP server and opens a web browser to access OpenCode through a web interface. Set `OPENCODE_SERVER_PASSWORD` to enable HTTP basic auth (username defaults to`opencode`).
458
458
459
459
#### Flags
460
460
@@ -551,27 +551,28 @@ The opencode CLI takes the following global flags.
551
551
552
552
OpenCode can be configured using environment variables.
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`.
38
+
Set `OPENCODE_SERVER_PASSWORD` to protect the server with HTTP basic auth. The username defaults to`opencode`, or set `OPENCODE_SERVER_USERNAME` to override it. This applies to both `opencode serve` and `opencode web`.
0 commit comments