summaryrefslogtreecommitdiffhomepage
path: root/packages/web
diff options
context:
space:
mode:
Diffstat (limited to 'packages/web')
-rw-r--r--packages/web/src/content/docs/cli.mdx18
-rw-r--r--packages/web/src/content/docs/config.mdx25
-rw-r--r--packages/web/src/content/docs/server.mdx9
3 files changed, 40 insertions, 12 deletions
diff --git a/packages/web/src/content/docs/cli.mdx b/packages/web/src/content/docs/cli.mdx
index e4e40ac7a..4a826e5b3 100644
--- a/packages/web/src/content/docs/cli.mdx
+++ b/packages/web/src/content/docs/cli.mdx
@@ -335,10 +335,11 @@ This starts an HTTP server that provides API access to opencode functionality wi
#### Flags
-| Flag | Short | Description |
-| ------------ | ----- | --------------------- |
-| `--port` | `-p` | Port to listen on |
-| `--hostname` | | Hostname to listen on |
+| Flag | Description |
+| ------------ | --------------------- |
+| `--port` | Port to listen on |
+| `--hostname` | Hostname to listen on |
+| `--mdns` | Enable mDNS discovery |
---
@@ -428,10 +429,11 @@ This starts an HTTP server and opens a web browser to access OpenCode through a
#### Flags
-| Flag | Short | Description |
-| ------------ | ----- | --------------------- |
-| `--port` | `-p` | Port to listen on |
-| `--hostname` | | Hostname to listen on |
+| Flag | Description |
+| ------------ | --------------------- |
+| `--port` | Port to listen on |
+| `--hostname` | Hostname to listen on |
+| `--mdns` | Enable mDNS discovery |
---
diff --git a/packages/web/src/content/docs/config.mdx b/packages/web/src/content/docs/config.mdx
index ebaff36bb..d7f803178 100644
--- a/packages/web/src/content/docs/config.mdx
+++ b/packages/web/src/content/docs/config.mdx
@@ -120,6 +120,31 @@ Available options:
---
+### Server
+
+You can configure server settings for the `opencode serve` and `opencode web` commands through the `server` option.
+
+```json title="opencode.json"
+{
+ "$schema": "https://opencode.ai/config.json",
+ "server": {
+ "port": 4096,
+ "hostname": "0.0.0.0",
+ "mdns": true
+ }
+}
+```
+
+Available options:
+
+- `port` - Port to listen on.
+- `hostname` - Hostname to listen on. When `mdns` is enabled and no hostname is set, defaults to `0.0.0.0`.
+- `mdns` - Enable mDNS service discovery. This allows other devices on the network to discover your OpenCode server.
+
+[Learn more about the server here](/docs/server).
+
+---
+
### Tools
You can manage the tools an LLM can use through the `tools` option.
diff --git a/packages/web/src/content/docs/server.mdx b/packages/web/src/content/docs/server.mdx
index 427d8f505..c63917f79 100644
--- a/packages/web/src/content/docs/server.mdx
+++ b/packages/web/src/content/docs/server.mdx
@@ -18,10 +18,11 @@ opencode serve [--port <number>] [--hostname <string>]
#### Options
-| Flag | Short | Description | Default |
-| ------------ | ----- | --------------------- | ----------- |
-| `--port` | `-p` | Port to listen on | `4096` |
-| `--hostname` | `-h` | Hostname to listen on | `127.0.0.1` |
+| Flag | Description | Default |
+| ------------ | --------------------- | ----------- |
+| `--port` | Port to listen on | `4096` |
+| `--hostname` | Hostname to listen on | `127.0.0.1` |
+| `--mdns` | Enable mDNS discovery | `false` |
---