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: docs/images/docker-baseimage-selkies.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,6 +179,8 @@ The server can be forced to use a single, fixed resolution for all connecting cl
179
179
|`SELKIES_USE_BROWSER_CURSORS`|`False`| Use browser CSS cursors instead of rendering to canvas. |
180
180
|`SELKIES_USE_CSS_SCALING`|`False`| HiDPI when false, iftrue a lower resolution is sent from the client and the canvas is stretched. |
181
181
|`SELKIES_PORT` (or `CUSTOM_WS_PORT`) |`8082`| Port for the data websocket server. |
182
+
|`SELKIES_CONTROL_PORT`|`8083`| Port forthe internal control plane API, used for managing access tokens whenin secure mode. |
183
+
|`SELKIES_MASTER_TOKEN`|`''`| Master token to enable secure mode. If set, clients must authenticate using tokens provided via the control plane API. |
182
184
|`SELKIES_DRI_NODE` (or `DRI_NODE`) |`''`| Path to the DRI render node for VA-API. |
183
185
|`SELKIES_AUDIO_DEVICE_NAME`|`'output.monitor'`| Audio device name for pcmflux capture. |
184
186
|`SELKIES_WATERMARK_PATH` (or `WATERMARK_PNG`) |`''`| Absolute path to the watermark PNG file. |
@@ -212,6 +214,43 @@ All base images are built for x86_64 and aarch64 platforms.
212
214
| Kali | kali |
213
215
| Ubuntu | ubuntunoble |
214
216
217
+
### Control Plane API for Token Management
218
+
219
+
When secure mode is enabled (`SELKIES_MASTER_TOKEN` is set), the server runs a control plane API on the `control_port` (default: 8083). This API is used to dynamically set and update the access tokens that clients can use to connect. This control plane port is meant forintegrators that want to wrap the baseimagein their own platforms and handle authentication, this port should never be exposed publically.
220
+
221
+
**Endpoint:**`POST /tokens`
222
+
223
+
**Authentication:** The request must include an `Authorization` header with the master token: `Authorization: Bearer <your-master-token>`
224
+
225
+
**Request Body:** A JSON object where each key is a unique access token string you create, and the value is a permissions object defining that token's capabilities.
226
+
227
+
**Permissions Object Fields:**
228
+
* `"role"`: (String, required) Can be one of the following:
229
+
* `"controller"`: Full access. Can send keyboard, mouse, and all other input events.
230
+
* `"viewer"`: Restricted access. Primarily for viewing the stream. Can be granted specific input rights via the `slot` property.
231
+
* `"slot"`: (Integer or `null`, required) Assigns an input slot, for gamepads.
232
+
* `null`: No specific input slot. A viewer with a `null` slot has no input capabilities.
233
+
* `1`: Grants the `viewer` control over the **Player 1** gamepad *only*.
234
+
* `2`: Grants the `viewer` control over the **Player 2** gamepad *only*.
235
+
* `3`: Grants the `viewer` control over the **Player 3** gamepad *only*.
236
+
* `4`: Grants the `viewer` control over the **Player 4** gamepad *only*.
237
+
238
+
**Behavior:** When a valid request is received, the server replaces its entire set of active tokens with the new set provided in the payload. It then runs a reconciliation process: any connected client whose token is now invalid or has changed permissions will be disconnected and users input capabilities will be modified live.
0 commit comments