Skip to main content

Advanced configuration

Welcome to the Steam Headless Advanced Configuration guide. While the standard installation delivers a pre-tuned, production-ready environment out of the box (complete with automatic hardware video encoding, macvlan dedicated IP assignment, low-latency PipeWire audio, and integrated Sunshine streaming), advanced configuration unlocks the full potential of Steam Headless for enthusiast homelabs, multi-seat gaming servers, and complex network topologies.

Prerequisites

Before implementing any advanced configurations described in this section, ensure that you have a functioning basic deployment running on your host as documented in the Installation guide. Verifying that a single container can start, authenticate, render, and stream cleanly simplifies diagnosing any subsequent advanced changes.


Guide catalogue​

Explore the advanced configuration topics below:

1. Container options reference​

A comprehensive reference manual detailing every supported environment variable, volume mount, security capability, and runtime parameter.

  • Virtual display configuration: Configure custom resolutions (1280x720, 1920x1080, 2560x1440, 3840x2160) and high refresh rates (60 Hz, 120 Hz, 144 Hz).
  • Browser streaming engine: Fine-tune media pipelines (gstreamer-vaapi), hardware conversion paths, target bitrates (2000–20000 kbps), WebRTC adaptation policies, and session idle timeouts.
  • Desktop & session controls: Configure Steam autostart, logging levels, optional virtual seat overrides, and timezone mappings.

2. Use separate rendering and encoding GPUs​

Architectural and practical guide to distributing containers across multiple physical graphics cards on the same host.

  • Multi-GPU allocation: Dedicate specific GPUs to individual containers (for example, Container A on an Intel iGPU, Container B on a discrete AMD Radeon, and Container C on an external NVIDIA eGPU).
  • Device discovery: Identify PCI topology, bus addresses, and DRM device nodes using /dev/dri/by-path/.
  • Vendor-specific setups: Configure DRM render nodes for Intel and AMD alongside the NVIDIA Container Toolkit (runtime: nvidia) and host modesetting requirements (nvidia_drm.modeset=1).

3. Run multiple containers​

Scaling Steam Headless beyond two concurrent containers on a single physical host.

  • Resource planning & sizing: Calculate realistic CPU, RAM, and VRAM budgets per concurrent 3D gaming session.
  • CPU pinning: Bind containers to isolated physical cores using cpuset to prevent scheduler latency jitter and cache contention.
  • Host-wide inotify scaling: Prevent file-descriptor starvation and EMFILE errors by sizing fs.inotify.max_user_instances for the number of concurrent containers.
  • Input isolation: Understand how each container keeps its virtual controllers, keyboard, and mouse separate without manual seat configuration.

4. Resource pinning and limits​

Practical guide to CPU core pinning, memory reservations, and GPU VRAM constraints under Docker cgroups v2.

  • Real-world performance guidance: Understand why unconstrained kernel scheduling delivers smoother frame pacing and why hard limits degrade gaming performance.
  • CPU pinning & NUMA topology: Prevent cross-CCX latency penalties on multi-die processors and protect host infrastructure without starving game render loops.
  • Soft vs hard memory limits: Use elastic reservations (mem_reservation) to safeguard host stability while avoiding abrupt OOM game crashes.
  • GPU VRAM limits: Why synthetic video memory constraints trigger fatal Vulkan and DXVK errors and why driver-level memory managers should arbitrate VRAM.
  • Platform configuration: Step-by-step setup for Docker Compose, Docker CLI, Unraid, and TrueNAS SCALE.

5. Advanced networking​

Enterprise and advanced routing patterns for local and remote streaming.

  • VLAN segmentation & custom IPAM: Isolate game streaming traffic onto dedicated 802.1q VLANs with custom subnets and gateway routes.
  • The Linux host shim: Understand why Linux prevents host-to-macvlan communication and how to maintain a persistent NetworkManager host shim.
  • Internet WAN streaming: Use the remote browser streaming options with custom STUN and TURN relays when direct remote connections cannot get through.
  • Reverse proxy integration: Configure Nginx or Caddy to proxy HTTPS and WebSocket signalling safely while letting low-latency WebRTC UDP traffic flow directly.

6. Manage Sunshine & Moonlight GameStream​

Deep dive into the integrated Sunshine GameStream server.

  • Integrated architecture: Understand how Sunshine operates as a systemd --user service inside the container session.
  • Secure administrative proxy: Access Sunshine's web UI securely through the web interface at https://<container-ip>:8483/sunshine.
  • Moonlight pairing workflow: Pair mobile devices, handhelds, and smart TVs smoothly using PIN verification.
  • Feature comparison: Understand the trade-offs between native zero-install browser streaming and Sunshine/Moonlight streaming.
  • Custom configuration: Manage custom application shortcuts, virtual audio sinks, and resolution overrides.

7. Use Gamescope and MangoHud​

Quick-start guide for controlling individual games and checking their performance.

  • Gamescope launch options: Set a game's internal resolution, scaling method, output window, and frame-rate limit.
  • MangoHud overlay: Show frame rate, frame timing, GPU, CPU, and memory information while playing.
  • GOverlay configuration: Install an optional graphical editor for MangoHud through Discover and Flathub.

Safe change management and rollback​

Advanced configurations alter kernel parameters, hardware device allocations, and network routing. To maintain host stability, follow these operational best practices:

  1. Change one variable at a time: Never alter GPU mappings, network subnets, and inotify limits simultaneously. Validate each modification before applying the next.
  2. Validate syntax before restarting:
    Terminal
    docker compose -f docker-compose.yml config --quiet
    This command checks your Compose YAML indentation and variable substitutions without touching running containers.
  3. Inspect container startup logs:
    Terminal
    docker compose logs -f desktop-a
    Confirm that systemd initialises successfully, that shinputd discovers your virtual input devices, and that the graphics compositor initialises hardware acceleration.
  4. Keep a backup copy of your working Compose configuration:
    Terminal
    cp docker-compose.yml docker-compose.yml.working.bak
    If a newly introduced configuration fails or prevents streaming, restore your verified backup file immediately.