Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nestrilabs/nestri/llms.txt
Use this file to discover all available pages before exploring further.
nestri-server discovers GPUs automatically on startup by enumerating /sys/class/drm, reading each card’s PCI vendor ID from /sys/class/drm/cardN/device/vendor, and resolving the human-readable device name from /usr/share/hwdata/pci.ids. By default the server picks the first GPU with a recognised vendor. Every flag described below narrows or overrides that automatic choice.
All flags have a matching environment variable. Environment variables are the recommended approach when running
nestri-server inside a container.GPU detection
At startup,nestri-server logs each discovered GPU:
/dev/dri/card1) and render node path (e.g. /dev/dri/renderD128) for each GPU. The render node is passed to waylanddisplaysrc as the render-node property. GPUs with unrecognised vendor IDs are silently excluded from auto-selection but can still be forced via --gpu-card-path.
Supported vendors
| Vendor | PCI vendor ID | Encoder API | GStreamer prefix |
|---|---|---|---|
| NVIDIA | 0x10de | NVENC | nv* |
| AMD | 0x1002 | VAAPI | va* |
| Intel | 0x8086 | VAAPI / QuickSync (QSV) | va* / qsv* |
Selection flags
The four selection flags are applied as a filter chain:--gpu-vendor and --gpu-name narrow the candidate list, then --gpu-index selects a single entry from that narrowed list. --gpu-card-path is mutually exclusive with all three and bypasses the filter chain entirely.
Filter GPUs by vendor name. Accepted values (case-insensitive):
nvidia, amd, intel.Environment variable: GPU_VENDORFilter GPUs by a case-insensitive substring match against the device name from the PCI database. Useful when you have multiple GPUs from the same vendor and want to target one by model.Environment variable:
GPU_NAMESelect by 0-based index from the filtered (or full) GPU list. If the index is out of bounds, the server exits with an error listing the valid range.Environment variable:
GPU_INDEXForce a specific GPU by supplying the exact
/dev/dri/card* or /dev/dri/renderD* path. Both forms are accepted and matching is case-insensitive. This flag conflicts with --gpu-vendor, --gpu-name, and --gpu-index — you cannot combine it with any of them.Environment variable: GPU_CARD_PATHDocker GPU passthrough
The container needs access to the host GPU devices. The correct method depends on the vendor.- NVIDIA
- AMD / Intel
Install the NVIDIA Container Toolkit and pass To select a specific NVIDIA GPU when multiple are present, combine
--gpus all (or a specific device with --gpus '"device=0"'):GPU_VENDOR and GPU_INDEX:Zero-copy mode
Enable zero-copy frame transfer between the display capture source and the hardware encoder. When enabled, frames bypass system memory and travel over DMA-BUF (for VAAPI and QSV) or CUDA shared memory (for NVENC), which can reduce latency and CPU overhead on some systems.Environment variable:
ZERO_COPYZero-copy is only supported with hardware encoders. If --zero-copy is set alongside --video-encoder-type software, the server emits a warning and disables zero-copy automatically.| Encoder API | Memory type | Intermediate element |
|---|---|---|
| VAAPI / QSV | video/x-raw(memory:DMABuf) | vapostproc → video/x-raw(memory:VAMemory) |
| NVENC | video/x-raw(memory:CUDAMemory) | None — fed directly to the encoder |
Software rendering
Use CPU-based software rendering for the Wayland display instead of a GPU render node. When enabled,
waylanddisplaysrc is started with render-node=software.Environment variable: SOFTWARE_RENDERThis flag is useful for debugging or for running nestri-server in environments without a discrete GPU, but it is not suitable for real-time game streaming due to high CPU load and latency.