|
4 | 4 |
|
5 | 5 | ### Base URL |
6 | 6 |
|
7 | | -The base URL of the server is configured with the following environment |
8 | | -variables: |
9 | | - |
10 | | -- `URL_HOST` - the hostname (domain) of the server, defaults to `localhost` |
11 | | -- `URL_PORT` - the port it's accessible at, defaults to `4000` |
12 | | -- `URL_SCHEME` - the URL scheme, defaults to `http` |
| 7 | +These variables tell the server its **public** address — the scheme, host and |
| 8 | +port that browsers use to reach it. The server uses them to generate links and |
| 9 | +the WebSocket URLs for live streaming, so they must match the address users |
| 10 | +actually connect to, not the port the container listens on internally. |
| 11 | + |
| 12 | +- `URL_HOST` - the public hostname (domain), defaults to `localhost` |
| 13 | +- `URL_PORT` - the public port, defaults to `4000` |
| 14 | +- `URL_SCHEME` - the public URL scheme (`http` or `https`), defaults to `http` |
| 15 | + |
| 16 | +!!! note |
| 17 | + |
| 18 | + `URL_PORT` sets the port in generated URLs only; it does **not** change the |
| 19 | + port the server binds to. The server listens on `4000` inside the container |
| 20 | + by default (set `PORT` to change it) — point your reverse proxy at that |
| 21 | + port, or at the host port you map it to. |
| 22 | + |
| 23 | +!!! warning "Behind a reverse proxy" |
| 24 | + |
| 25 | + Set `URL_*` to the **public** address served by your proxy, not the port the |
| 26 | + container listens on. With a proxy that terminates TLS this is usually |
| 27 | + `URL_SCHEME=https` (which defaults `URL_PORT` to 443). A telltale sign of a |
| 28 | + mismatch is uploads working while live streams show as **offline** — the |
| 29 | + live-streaming WebSocket URLs (used by both the streaming CLI and viewers' |
| 30 | + browsers) are built from these values. |
13 | 31 |
|
14 | 32 | === "HTTP" |
15 | 33 |
|
|
0 commit comments