Skip to content

Commit 854bda5

Browse files
Bot Updating Templated Files
1 parent ab656ad commit 854bda5

File tree

1 file changed

+134
-122
lines changed

1 file changed

+134
-122
lines changed

README.md

Lines changed: 134 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,94 @@ The web interface includes a terminal with passwordless `sudo` access. Any user
8080

8181
While not generally recommended, certain legacy environments specifically those with older hardware or outdated Linux distributions may require the deactivation of the standard seccomp profile to get containerized desktop software to run. This can be achieved by utilizing the `--security-opt seccomp=unconfined` parameter. It is critical to use this option only when absolutely necessary as it disables a key security layer of Docker, elevating the potential for container escape vulnerabilities.
8282

83+
### Hardware Acceleration & The Move to Wayland
84+
85+
We are currently transitioning our desktop containers from X11 to Wayland. While X11 is still the default, we strongly encourage users to test the new Wayland mode.
86+
87+
**Important:** GPU acceleration support for X11 is being deprecated. Future development for hardware acceleration will focus entirely on the Wayland stack.
88+
89+
To enable Wayland mode, set the following environment variable:
90+
* `-e PIXELFLUX_WAYLAND=true`
91+
92+
**Why use Wayland?**
93+
* **Zero Copy Encoding:** When configured correctly with a GPU, the frame is rendered and encoded on the video card without ever being copied to the system RAM. This drastically lowers CPU usage and latency.
94+
* **Modern Stack:** Single-application containers utilize **Labwc** (replacing Openbox) and full desktop containers use **KDE Plasma Wayland**, providing a more modern and secure compositing environment while retaining the same user experience.
95+
96+
#### GPU Configuration
97+
98+
To use hardware acceleration in Wayland mode, we distinguish between the card used for **Rendering** (3D apps/Desktops) and **Encoding** (Video Stream).
99+
100+
**Configuration Variables:**
101+
* `DRINODE`: The path to the GPU used for **Rendering** (EGL).
102+
* `DRI_NODE`: The path to the GPU used for **Encoding** (VAAPI/NVENC).
103+
104+
If both variables point to the same device, the container will automatically enable **Zero Copy** encoding, significantly reducing CPU usage and latency.
105+
106+
##### Intel & AMD (Open Source Drivers)
107+
108+
For Intel and AMD GPUs.
109+
110+
```yaml
111+
devices:
112+
- /dev/dri:/dev/dri
113+
environment:
114+
- PIXELFLUX_WAYLAND=true
115+
# Optional: Specify device if multiple exist (IE: /dev/dri/renderD129)
116+
- DRINODE=/dev/dri/renderD128
117+
- DRI_NODE=/dev/dri/renderD128
118+
```
119+
120+
##### Nvidia (Proprietary Drivers)
121+
122+
**Note: Nvidia support is not available for Alpine-based images.**
123+
124+
**Prerequisites:**
125+
1. **Driver:** Proprietary drivers **580 or higher** are required.
126+
2. **Kernel Parameter:** Set `nvidia-drm.modeset=1` in your host bootloader (GRUB/systemd-boot).
127+
3. **Initialization:** On headless systems, run `nvidia-modprobe --modeset` on the host (once per boot) to initialize the card.
128+
4. **Docker Runtime:** Configure the host docker daemon to use the Nvidia runtime:
129+
```bash
130+
sudo nvidia-ctk runtime configure --runtime=docker
131+
sudo systemctl restart docker
132+
```
133+
134+
**Compose Configuration:**
135+
136+
```yaml
137+
services:
138+
rustdesk:
139+
image: lscr.io/linuxserver/rustdesk:latest
140+
environment:
141+
- PIXELFLUX_WAYLAND=true
142+
# Ensure these point to the rendered node injected by the runtime (usually renderD128)
143+
- DRINODE=/dev/dri/renderD128
144+
- DRI_NODE=/dev/dri/renderD128
145+
deploy:
146+
resources:
147+
reservations:
148+
devices:
149+
- driver: nvidia
150+
count: 1
151+
capabilities: [compute,video,graphics,utility]
152+
```
153+
154+
### SealSkin Compatibility
155+
156+
This container is compatible with [SealSkin](https://sealskin.app).
157+
158+
SealSkin is a self-hosted, client-server platform that provides secure authentication and collaboration features while using a browser extension to intercept user actions such as clicking a link or downloading a file and redirect them to a secure, isolated application environment running on a remote server.
159+
160+
* **SealSkin Server:** [Get it Here](https://github.com/linuxserver/docker-sealskin)
161+
* **Browser Extension:** [Chrome](https://chromewebstore.google.com/detail/sealskin-isolation/lclgfmnljgacfdpmmmjmfpdelndbbfhk) and [Firefox](https://addons.mozilla.org/en-US/firefox/addon/sealskin-isolation/).
162+
* **Mobile App:** [iOS](https://apps.apple.com/us/app/sealskin/id6758210210) and [Android](https://play.google.com/store/apps/details?id=io.linuxserver.sealskin)
163+
164+
83165
### Options in all Selkies-based GUI containers
84166

85-
This container is based on [Docker Baseimage Selkies](https://github.com/linuxserver/docker-baseimage-selkies), which provides the following environment variables and run configurations to customize its functionality.
167+
This container is based on [Docker Baseimage Selkies](https://github.com/linuxserver/docker-baseimage-selkies).
86168

87-
#### Optional Environment Variables
169+
<details>
170+
<summary>Click to expand: Optional Environment Variables</summary>
88171

89172
| Variable | Description |
90173
| :----: | --- |
@@ -93,8 +176,8 @@ This container is based on [Docker Baseimage Selkies](https://github.com/linuxse
93176
| CUSTOM_HTTPS_PORT | Internal port the container listens on for https if it needs to be swapped from the default `3001` |
94177
| CUSTOM_WS_PORT | Internal port the container listens on for websockets if it needs to be swapped from the default 8082 |
95178
| CUSTOM_USER | HTTP Basic auth username, abc is default. |
96-
| DRI_NODE | Enable VAAPI stream encoding and use the specified device IE `/dev/dri/renderD128` |
97-
| DRINODE | Specify which GPU to use for DRI3 acceleration IE `/dev/dri/renderD129` |
179+
| DRI_NODE | **Encoding GPU**: Enable VAAPI/NVENC stream encoding and use the specified device IE `/dev/dri/renderD128` |
180+
| DRINODE | **Rendering GPU**: Specify which GPU to use for EGL/3D acceleration IE `/dev/dri/renderD129` |
98181
| PASSWORD | HTTP Basic auth password, abc is default. If unset there will be no auth |
99182
| SUBFOLDER | Subfolder for the application if running a subfolder reverse proxy, need both slashes IE `/subfolder/` |
100183
| TITLE | The page title displayed on the web browser, default "Selkies" |
@@ -120,105 +203,52 @@ This container is based on [Docker Baseimage Selkies](https://github.com/linuxse
120203
- **5**: Centered
121204
- **6**: Animated
122205

123-
#### Optional Run Configurations
206+
</details>
207+
208+
<details>
209+
<summary>Click to expand: Optional Run Configurations (DinD & GPU Mounts)</summary>
124210

125211
| Argument | Description |
126212
| :----: | --- |
127213
| `--privileged` | Starts a Docker-in-Docker (DinD) environment. For better performance, mount the Docker data directory from the host, e.g., `-v /path/to/docker-data:/var/lib/docker`. |
128214
| `-v /var/run/docker.sock:/var/run/docker.sock` | Mounts the host's Docker socket to manage host containers from within this container. |
129-
| `--device /dev/dri:/dev/dri` | Mount a GPU into the container, this can be used in conjunction with the `DRINODE` environment variable to leverage a host video card for GPU accelerated applications. Only **Open Source** drivers are supported IE (Intel,AMDGPU,Radeon,ATI,Nouveau) |
215+
| `--device /dev/dri:/dev/dri` | Mount a GPU into the container, this can be used in conjunction with the `DRINODE` environment variable to leverage a host video card for GPU accelerated applications. |
130216

131-
### Language Support - Internationalization
217+
</details>
132218

133-
To launch the desktop session in a different language, set the `LC_ALL` environment variable. For example:
219+
<details>
220+
<summary>Click to expand: Legacy X11 Resolution & Acceleration</summary>
134221

135-
* `-e LC_ALL=zh_CN.UTF-8` - Chinese
136-
* `-e LC_ALL=ja_JP.UTF-8` - Japanese
137-
* `-e LC_ALL=ko_KR.UTF-8` - Korean
138-
* `-e LC_ALL=ar_AE.UTF-8` - Arabic
139-
* `-e LC_ALL=ru_RU.UTF-8` - Russian
140-
* `-e LC_ALL=es_MX.UTF-8` - Spanish (Latin America)
141-
* `-e LC_ALL=de_DE.UTF-8` - German
142-
* `-e LC_ALL=fr_FR.UTF-8` - French
143-
* `-e LC_ALL=nl_NL.UTF-8` - Netherlands
144-
* `-e LC_ALL=it_IT.UTF-8` - Italian
145-
146-
### SealSkin Compatibility
222+
**Note:** This section applies only if you are **NOT** using `PIXELFLUX_WAYLAND=true`.
147223

148-
This container is compatible with [SealSkin](https://github.com/linuxserver/docker-sealskin).
149-
150-
SealSkin is a self-hosted, client-server platform that provides secure authentication and collaboration features while using a browser extension to intercept user actions such as clicking a link or downloading a file and redirect them to a secure, isolated application environment running on a remote server.
151-
152-
* **SealSkin Server:** [Get it Here](https://github.com/linuxserver/docker-sealskin)
153-
* **Browser Extension:** [Install Here](https://chromewebstore.google.com/detail/sealskin-isolation/lclgfmnljgacfdpmmmjmfpdelndbbfhk)
154-
155-
### All GPU Acceleration - use sane resolutions
156-
157-
When using 3d acceleration via Nvidia DRM or DRI3 it is important to clamp the virtual display to a reasonable max resolution. This can be achieved with the environment setting:
224+
When using 3d acceleration via Nvidia DRM or DRI3 in X11 mode, it is important to clamp the virtual display to a reasonable max resolution to avoid memory exhaustion or poor performance.
158225

159226
* `-e MAX_RESOLUTION=3840x2160`
160227

161-
This will set the total virtual framebuffer to 4K, you can also set a manual resolution to achieve this.
162-
By default the virtual monitor in the session is 16K to support large monitors and dual display configurations. Leaving it this large has no impact on CPU based performance but costs GPU memory usage and memory bandwidth when leveraging one for acceleration. If you have performance issues in an accelerated session, try clamping the resolution to 1080p and work up from there:
228+
This will set the total virtual framebuffer to 4K. By default, the virtual monitor is 16K. If you have performance issues in an accelerated X11 session, try clamping the resolution to 1080p and work up from there:
163229

164230
```
165231
-e SELKIES_MANUAL_WIDTH=1920
166232
-e SELKIES_MANUAL_HEIGHT=1080
167233
-e MAX_RESOLUTION=1920x1080
168234
```
169235

170-
### DRI3 GPU Acceleration
171-
172-
For accelerated apps or games, render devices can be mounted into the container and leveraged by applications using:
173-
174-
`--device /dev/dri:/dev/dri`
175-
176-
This feature only supports **Open Source** GPU drivers:
177-
178-
| Driver | Description |
179-
| :----: | --- |
180-
| Intel | i965 and i915 drivers for Intel iGPU chipsets |
181-
| AMD | AMDGPU, Radeon, and ATI drivers for AMD dedicated or APU chipsets |
182-
| NVIDIA | nouveau2 drivers only, closed source NVIDIA drivers lack DRI3 support |
183-
184-
The `DRINODE` environment variable can be used to point to a specific GPU.
185-
186-
DRI3 will work on aarch64 given the correct drivers are installed inside the container for your chipset.
187-
188-
### Nvidia GPU Support
189-
190-
**Note: Nvidia support is not available for Alpine-based images.**
191-
192-
Nvidia GPU support is available by leveraging Zink for OpenGL. When a compatible Nvidia GPU is passed through, it will also be **automatically utilized for hardware-accelerated video stream encoding** (using the `x264enc` full-frame profile), significantly reducing CPU load.
236+
</details>
193237

194-
Enable Nvidia support with the following runtime flags:
195-
196-
| Flag | Description |
197-
| :----: | --- |
198-
| `--gpus all` | Passes all available host GPUs to the container. This can be filtered to specific GPUs. |
199-
| `--runtime nvidia` | Specifies the Nvidia runtime, which provides the necessary drivers and tools from the host. |
200-
201-
For Docker Compose, you must first configure the Nvidia runtime as the default on the host:
202-
203-
```
204-
sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
205-
sudo systemctl restart docker
206-
```
238+
### Language Support - Internationalization
207239

208-
Then, assign the GPU to the service in your `compose.yaml`:
240+
To launch the desktop session in a different language, set the `LC_ALL` environment variable. For example:
209241

210-
```
211-
services:
212-
rustdesk:
213-
image: lscr.io/linuxserver/rustdesk:latest
214-
deploy:
215-
resources:
216-
reservations:
217-
devices:
218-
- driver: nvidia
219-
count: 1
220-
capabilities: [compute,video,graphics,utility]
221-
```
242+
* `-e LC_ALL=zh_CN.UTF-8` - Chinese
243+
* `-e LC_ALL=ja_JP.UTF-8` - Japanese
244+
* `-e LC_ALL=ko_KR.UTF-8` - Korean
245+
* `-e LC_ALL=ar_AE.UTF-8` - Arabic
246+
* `-e LC_ALL=ru_RU.UTF-8` - Russian
247+
* `-e LC_ALL=es_MX.UTF-8` - Spanish (Latin America)
248+
* `-e LC_ALL=de_DE.UTF-8` - German
249+
* `-e LC_ALL=fr_FR.UTF-8` - French
250+
* `-e LC_ALL=nl_NL.UTF-8` - Netherlands
251+
* `-e LC_ALL=it_IT.UTF-8` - Italian
222252

223253
### Application Management
224254

@@ -246,20 +276,19 @@ You can install packages from the system's native repository using the [universa
246276
- INSTALL_PACKAGES=libfuse2|git|gdb
247277
```
248278

249-
#### Hardening
250-
251-
These variables can be used to lock down the desktop environment for single-application use cases or to restrict user capabilities.
279+
### Advanced Configuration
252280

253-
##### Meta Variables
281+
<details>
282+
<summary>Click to expand: Hardening Options</summary>
254283

255-
These variables act as presets, enabling multiple hardening options at once. Individual options can still be set to override the preset.
284+
These variables can be used to lock down the desktop environment for single-application use cases or to restrict user capabilities.
256285

257286
| Variable | Description |
258287
| :----: | --- |
259288
| **`HARDEN_DESKTOP`** | Enables `DISABLE_OPEN_TOOLS`, `DISABLE_SUDO`, and `DISABLE_TERMINALS`. Also sets related Selkies UI settings (`SELKIES_FILE_TRANSFERS`, `SELKIES_COMMAND_ENABLED`, `SELKIES_UI_SIDEBAR_SHOW_FILES`, `SELKIES_UI_SIDEBAR_SHOW_APPS`) if they are not explicitly set by the user. |
260289
| **`HARDEN_OPENBOX`** | Enables `DISABLE_CLOSE_BUTTON`, `DISABLE_MOUSE_BUTTONS`, and `HARDEN_KEYBINDS`. It also flags `RESTART_APP` if not set by the user, ensuring the primary application is automatically restarted if closed. |
261290

262-
##### Individual Hardening Variables
291+
**Individual Hardening Variables:**
263292

264293
| Variable | Description |
265294
| :--- | --- |
@@ -271,46 +300,27 @@ These variables act as presets, enabling multiple hardening options at once. Ind
271300
| **`HARDEN_KEYBINDS`** | If true, disables default Openbox keybinds that can bypass other hardening options (e.g., `Alt+F4` to close windows, `Alt+Escape` to show the root menu). |
272301
| **`RESTART_APP`** | If true, enables a watchdog service that automatically restarts the main application if it is closed. The user's autostart script is made read-only and root owned to prevent tampering. |
273302

274-
#### Selkies application settings
275-
276-
Using environment variables every facet of the application can be configured.
277-
278-
##### Booleans and Locking
279-
Boolean settings accept `true` or `false`. You can also prevent the user from changing a boolean setting in the UI by appending `|locked`. The UI toggle for this setting will be hidden.
280-
281-
* **Example**: To force CPU encoding on and prevent the user from disabling it:
282-
```bash
283-
-e SELKIES_USE_CPU="true|locked"
284-
```
285-
286-
##### Enums and Lists
287-
These settings accept a comma-separated list of values. Their behavior depends on the number of items provided:
303+
</details>
288304

289-
* **Multiple Values**: The first item in the list becomes the default selection, and all items in the list become the available options in the UI dropdown.
290-
* **Single Value**: The provided value becomes the default, and the UI dropdown is hidden because the choice is locked.
305+
<details>
306+
<summary>Click to expand: Selkies Application Settings</summary>
291307

292-
* **Example**: Force the encoder to be `jpeg` with no other options available to the user:
293-
```bash
294-
-e SELKIES_ENCODER="jpeg"
295-
```
308+
Using environment variables every facet of the application can be configured.
296309

297-
##### Ranges
298-
Range settings define a minimum and maximum for a value (e.g., framerate).
310+
**Booleans and Locking:**
311+
Boolean settings accept `true` or `false`. You can also prevent the user from changing a boolean setting in the UI by appending `|locked`.
312+
* Example: `-e SELKIES_USE_CPU="true|locked"`
299313

300-
* **To set a range**: Use a hyphen-separated `min-max` format. The UI will show a slider.
301-
* **To set a fixed value**: Provide a single number. This will lock the value and hide the UI slider.
314+
**Enums and Lists:**
315+
These settings accept a comma-separated list of values. The first item becomes default. If only one item is provided, the UI dropdown is hidden.
316+
* Example: `-e SELKIES_ENCODER="jpeg"`
302317

303-
* **Example**: Lock the framerate to exactly 60 FPS.
304-
```bash
305-
-e SELKIES_FRAMERATE="60"
306-
```
307-
308-
##### Manual Resolution Mode
309-
The server can be forced to use a single, fixed resolution for all connecting clients. This mode is automatically activated if `SELKIES_MANUAL_WIDTH`, `SELKIES_MANUAL_HEIGHT`, or `SELKIES_IS_MANUAL_RESOLUTION_MODE` is set.
318+
**Ranges:**
319+
Use a hyphen-separated `min-max` format for a slider, or a single number to lock the value.
320+
* Example: `-e SELKIES_FRAMERATE="60"`
310321

311-
* If `SELKIES_MANUAL_WIDTH` and/or `SELKIES_MANUAL_HEIGHT` are set, the resolution is locked to those values.
312-
* If `SELKIES_IS_MANUAL_RESOLUTION_MODE` is set to `true` without specifying width or height, the resolution defaults to **1024x768**.
313-
* When this mode is active, the client UI for changing resolution is disabled.
322+
**Manual Resolution Mode:**
323+
If `SELKIES_MANUAL_WIDTH` or `SELKIES_MANUAL_HEIGHT` are set, the resolution is locked to those values.
314324

315325
| Environment Variable | Default Value | Description |
316326
| --- | --- | --- |
@@ -371,12 +381,14 @@ The server can be forced to use a single, fixed resolution for all connecting cl
371381
| `SELKIES_ENABLE_PLAYER3` | `True` | Enable sharing link for gamepad player 3. |
372382
| `SELKIES_ENABLE_PLAYER4` | `True` | Enable sharing link for gamepad player 4. |
373383

384+
</details>
385+
374386
## Usage
375387

376388
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
377389

378390
>[!NOTE]
379-
>Unless a parameter is flaged as 'optional', it is *mandatory* and a value must be provided.
391+
>Unless a parameter is flagged as 'optional', it is *mandatory* and a value must be provided.
380392

381393
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
382394

0 commit comments

Comments
 (0)