Skip to main content

Container options reference

The standard deployment examples already include the settings most people need. Use this reference when you are building a custom Compose file, splitting work across GPUs, configuring remote browser streaming, or collecting extra Docker logs.

Display and GPU options​

VariableDefaultPurpose
INITIAL_DISPLAY_WIDTH1920Initial width for a new desktop profile, from 320 to 7680 pixels.
INITIAL_DISPLAY_HEIGHT1080Initial height for a new desktop profile, from 200 to 4320 pixels.
INITIAL_DISPLAY_REFRESH120Initial refresh rate for a new desktop profile, from 24 to 240 Hz.
DISPLAY_MODEwaylandDisplay system. Wayland is the supported value.
WAYLAND_DISPLAYwayland-0Internal Wayland socket name. Leave this unchanged for normal deployments.
COMPOSITOR_RENDER_DEVICEFirst mapped render nodeRender node used by KWin and the desktop.
ENCODER_RENDER_DEVICECompositor render nodeRender node used by the web interface and Sunshine for video encoding.
NVIDIA_VISIBLE_DEVICESNot setNVIDIA GPU made available to the container. Use all for a single-GPU host.
NVIDIA_DRIVER_CAPABILITIESNot setNVIDIA driver features made available to the container. Steam Headless requires all.

KDE remembers display changes made through System Settings. The INITIAL_DISPLAY_* values apply only while preparing a fresh desktop profile. See Use the desktop and install apps.

When only one render node is mapped, leave both render-device variables empty and Steam Headless uses that node everywhere. See Use separate rendering and encoding GPUs before assigning different nodes.

Streaming options​

VariableDefaultPurpose
SHUI_MEDIA_BACKENDgstreamer-vaapiBrowser streaming capture and encoding backend. This is the supported value for the current image.
SHUI_MEDIA_CONVERSIONsystemPixel conversion path. Use system for compatibility or vaapi when that path has been tested with the GPU.
SHUI_ENCODERautoEncoder selection: auto, intel-ihd, intel-i965, amd-vaapi, nvidia-nvenc, or software. Software encoding is intended for diagnosis only.
SHUI_VIDEO_BITRATE_KBPS4000Target browser video bitrate in kbit/s, from 2000 to 50000.
SHUI_WEBRTC_INITIAL_BITRATE3000000Initial WebRTC bandwidth estimate in bits per second.
SHUI_WEBRTC_MAX_BITRATE50000000Maximum WebRTC bandwidth estimate in bits per second.
SHUI_WEBRTC_BITRATE_POLICYadaptiveadaptive responds to network conditions; fixed holds the configured target.
SHUI_SESSION_IDLE_TIMEOUT_DAYS7Session inactivity timeout, from 1 to 365 days.
SHUI_SHOW_DIAGNOSTICSEmptySet to true to show stream diagnostics by default for a new saved browser preference.
SUNSHINE_NAMEContainer hostnameName shown to Moonlight clients. Defaults to the container's network hostname.
SUNSHINE_ENABLE_AUTO_CONFIGtrueSet to false before managing Sunshine's renderer, encoder, or application catalogue manually.
SUNSHINE_ENABLE_AUTO_DISPLAY_MODEtrueSet to false to disable automatic display mode switching (steam-headless-set-display-mode) in Sunshine's global preparation commands. Requires SUNSHINE_ENABLE_AUTO_CONFIG=true.
Keeping Sunshine configuration changes

With SUNSHINE_ENABLE_AUTO_CONFIG=true, every container start matches Sunshine to ENCODER_RENDER_DEVICE and automatically synchronises detected gaming launchers (such as ES-DE, Prism Launcher, RetroDECK, etc.) with Sunshine's application catalogue. Set it to false before making a different renderer or encoder choice in Sunshine or managing applications manually, or those choices will be replaced on the next start. When set to false, Steam Headless will not manage, add, or remove applications in Sunshine, and automatic display mode preparation commands (SUNSHINE_ENABLE_AUTO_DISPLAY_MODE) will not be managed on container start. Steam Headless continues to protect the Sunshine settings required for web interface sign-in and proxy access.

Remote browser streaming options​

VariableDefaultPurpose
SHUI_STUN_URLSEmptyComma-separated STUN addresses used to discover a direct WebRTC route.
SHUI_TURN_URLSEmptyComma-separated TURN addresses. Each address must select transport=udp or transport=tcp.
SHUI_TURN_SHARED_SECRET_FILEEmptyPath to the protected file containing the coturn shared secret. Required when SHUI_TURN_URLS is set.
SHUI_TURN_CREDENTIAL_LIFETIME_MINUTES10Lifetime of temporary TURN credentials.
SHUI_TURN_CLOCK_SKEW_SECONDS30Allowed clock difference when validating temporary TURN credentials.

The shared secret file must be readable only by root and must not be placed in an environment variable, Compose file, screenshot, or support log. Follow Advanced networking for a complete example.

Desktop and logging options​

VariableDefaultPurpose
PUID1000Numeric user ID used by the desktop user.
PGID1000Numeric group ID used by the desktop user.
ENABLE_STEAM_SYSTEMD_SERVICEtrueLets the systemd service start Steam with the desktop and restart it after it closes. When false, Steam remains installed for manual use.
XDG_SEATGeneratedOptional advanced override for the internal virtual input seat name. Leave it empty for normal deployments.
STEAM_HEADLESS_JOURNAL_LEVELwarningLowest journal priority copied to docker logs: off, emerg, alert, crit, err, warning, notice, info, or debug.
SHUI_DESKTOP_AUTOMATION_ENABLEDfalseEnables the administrator-only desktop automation API after a restart. Leave it off unless a compatible automation tool needs it.

Keep tty: true in Compose if you want journal messages to appear in docker logs. Setting the journal level to off stops only the Docker log copy; logs remain available in the web interface. An invalid value stops the container during startup.

Steam Headless generates the seat name from the container's persistent machine identity. Input isolation comes from each container's private process and input environment, so multiple containers do not need different XDG_SEAT values. Set this option only when troubleshooting or integrating software that requires a particular seat name.

Timezone​

Set the optional TZ environment variable to a valid IANA timezone name, such as Europe/London, to choose the container timezone explicitly. A valid TZ takes precedence; otherwise Steam Headless uses the timezone available from the read-only host mount at /run/host-localtime, then falls back to Etc/UTC if neither source identifies a recognised timezone. Mount the host's /etc/localtime at /run/host-localtime, not at /etc/localtime.

Required Docker settings​

Do not replace the listed capabilities and security settings with privileged: true. Copy them from the supported deployment example. Their jobs are summarised here for people maintaining a custom deployment:

SettingWhy it is present
SYS_ADMINAllows systemd and FUSE-based apps to prepare their required filesystems.
SYS_NICEAllows low-latency audio scheduling.
SYS_PTRACE and DAC_READ_SEARCHAllow the container input service to discover its own virtual devices.
NET_ADMINAllows virtual input discovery messages inside the container.
seccomp=unconfined and systempaths=unconfinedAllow Steam and Flatpak application sandboxes to start.
writable-cgroups=true and cgroup: privateGive the container's systemd manager its own writable cgroup area.
shm_size: 2gbProvides shared memory for the desktop and streaming services.
stop_signal: SIGRTMIN+3Lets systemd shut services down cleanly.
stop_grace_period: 30sGives games and services time to close before Docker forces the container to stop.

Persistent and temporary mounts​

Container pathStoragePurpose
/var/lib/steam-headlessPrivate Docker volumeRoot-owned Steam Headless setup, sign-in, and TLS state.
/var/log/journalPrivate Docker volumeRetained service and startup logs.
/home/steamheadlessPrivate host directoryDesktop settings, Steam data, Proton prefixes, saves, browser data, Sunshine pairings, and user-installed Flatpaks.
/mnt/gamesPrivate or shared host directorySteam game library. Use the same PUID and PGID for containers that need to update a shared library.
/dev/inputPrivate in-memory filesystemVirtual input devices belonging only to this desktop.
/run, /run/lock, and /tmpTemporary in-memory filesystemsRuntime files recreated whenever the container starts.

See Configure devices and storage before changing these mounts.

Automated first setup​

Normal setup does not need a password environment variable. Steam Headless creates a temporary password and asks you to choose a permanent one in the web interface.

For automated installation of brand-new state, provide the first password through a Compose secret:

docker-compose.provision.yml
services:
desktop:
secrets:
- source: steam-headless-password
target: /steam-headless-provisioning-password
uid: '0'
gid: '0'
mode: 0400

secrets:
steam-headless-password:
environment: STEAM_HEADLESS_PASSWORD

The password must contain at least 12 characters. It cannot contain :, a line break, or a NUL character, and it cannot exceed 1024 bytes. Set it only in the protected shell or deployment environment that starts Compose:

docker compose -f docker-compose.yml -f docker-compose.provision.yml up -d

The secret is used only when creating new appliance state. Changing it later does not rotate an existing password; use the web interface for password changes.

Optional Docker health status​

The image deliberately has no built-in Docker health check. A temporary Steam, audio, or streaming problem should not encourage management software to destroy an active desktop and close a running game.

You can run the installed check whenever you need a snapshot:

docker exec steam-headless /usr/local/bin/steam-headless-healthcheck

If you want Docker to show a health status and will not configure automatic replacement of unhealthy containers, add this to the service:

healthcheck:
test: ['CMD', '/usr/local/bin/steam-headless-healthcheck']
interval: 15s
timeout: 5s
start_period: 300s
retries: 5

The five-minute start period gives desktop services and slower GPU or driver initialisation time to become ready.