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
| Variable | Default | Purpose |
|---|---|---|
INITIAL_DISPLAY_WIDTH | 1920 | Initial width for a new desktop profile, from 320 to 7680 pixels. |
INITIAL_DISPLAY_HEIGHT | 1080 | Initial height for a new desktop profile, from 200 to 4320 pixels. |
INITIAL_DISPLAY_REFRESH | 120 | Initial refresh rate for a new desktop profile, from 24 to 240 Hz. |
DISPLAY_MODE | wayland | Display system. Wayland is the supported value. |
WAYLAND_DISPLAY | wayland-0 | Internal Wayland socket name. Leave this unchanged for normal deployments. |
COMPOSITOR_RENDER_DEVICE | First mapped render node | Render node used by KWin and the desktop. |
ENCODER_RENDER_DEVICE | Compositor render node | Render node used by the web interface and Sunshine for video encoding. |
NVIDIA_VISIBLE_DEVICES | Not set | NVIDIA GPU made available to the container. Use all for a single-GPU host. |
NVIDIA_DRIVER_CAPABILITIES | Not set | NVIDIA 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
| Variable | Default | Purpose |
|---|---|---|
SHUI_MEDIA_BACKEND | gstreamer-vaapi | Browser streaming capture and encoding backend. This is the supported value for the current image. |
SHUI_MEDIA_CONVERSION | system | Pixel conversion path. Use system for compatibility or vaapi when that path has been tested with the GPU. |
SHUI_ENCODER | auto | Encoder selection: auto, intel-ihd, intel-i965, amd-vaapi, nvidia-nvenc, or software. Software encoding is intended for diagnosis only. |
SHUI_VIDEO_BITRATE_KBPS | 4000 | Target browser video bitrate in kbit/s, from 2000 to 50000. |
SHUI_WEBRTC_INITIAL_BITRATE | 3000000 | Initial WebRTC bandwidth estimate in bits per second. |
SHUI_WEBRTC_MAX_BITRATE | 50000000 | Maximum WebRTC bandwidth estimate in bits per second. |
SHUI_WEBRTC_BITRATE_POLICY | adaptive | adaptive responds to network conditions; fixed holds the configured target. |
SHUI_SESSION_IDLE_TIMEOUT_DAYS | 7 | Session inactivity timeout, from 1 to 365 days. |
SHUI_SHOW_DIAGNOSTICS | Empty | Set to true to show stream diagnostics by default for a new saved browser preference. |
SUNSHINE_NAME | Container hostname | Name shown to Moonlight clients. Defaults to the container's network hostname. |
SUNSHINE_ENABLE_AUTO_CONFIG | true | Set to false before managing Sunshine's renderer, encoder, or application catalogue manually. |
SUNSHINE_ENABLE_AUTO_DISPLAY_MODE | true | Set 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. |
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
| Variable | Default | Purpose |
|---|---|---|
SHUI_STUN_URLS | Empty | Comma-separated STUN addresses used to discover a direct WebRTC route. |
SHUI_TURN_URLS | Empty | Comma-separated TURN addresses. Each address must select transport=udp or transport=tcp. |
SHUI_TURN_SHARED_SECRET_FILE | Empty | Path to the protected file containing the coturn shared secret. Required when SHUI_TURN_URLS is set. |
SHUI_TURN_CREDENTIAL_LIFETIME_MINUTES | 10 | Lifetime of temporary TURN credentials. |
SHUI_TURN_CLOCK_SKEW_SECONDS | 30 | Allowed 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
| Variable | Default | Purpose |
|---|---|---|
PUID | 1000 | Numeric user ID used by the desktop user. |
PGID | 1000 | Numeric group ID used by the desktop user. |
ENABLE_STEAM_SYSTEMD_SERVICE | true | Lets the systemd service start Steam with the desktop and restart it after it closes. When false, Steam remains installed for manual use. |
XDG_SEAT | Generated | Optional advanced override for the internal virtual input seat name. Leave it empty for normal deployments. |
STEAM_HEADLESS_JOURNAL_LEVEL | warning | Lowest journal priority copied to docker logs: off, emerg, alert, crit, err, warning, notice, info, or debug. |
SHUI_DESKTOP_AUTOMATION_ENABLED | false | Enables 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:
| Setting | Why it is present |
|---|---|
SYS_ADMIN | Allows systemd and FUSE-based apps to prepare their required filesystems. |
SYS_NICE | Allows low-latency audio scheduling. |
SYS_PTRACE and DAC_READ_SEARCH | Allow the container input service to discover its own virtual devices. |
NET_ADMIN | Allows virtual input discovery messages inside the container. |
seccomp=unconfined and systempaths=unconfined | Allow Steam and Flatpak application sandboxes to start. |
writable-cgroups=true and cgroup: private | Give the container's systemd manager its own writable cgroup area. |
shm_size: 2gb | Provides shared memory for the desktop and streaming services. |
stop_signal: SIGRTMIN+3 | Lets systemd shut services down cleanly. |
stop_grace_period: 30s | Gives games and services time to close before Docker forces the container to stop. |
Persistent and temporary mounts
| Container path | Storage | Purpose |
|---|---|---|
/var/lib/steam-headless | Private Docker volume | Root-owned Steam Headless setup, sign-in, and TLS state. |
/var/log/journal | Private Docker volume | Retained service and startup logs. |
/home/steamheadless | Private host directory | Desktop settings, Steam data, Proton prefixes, saves, browser data, Sunshine pairings, and user-installed Flatpaks. |
/mnt/games | Private or shared host directory | Steam game library. Use the same PUID and PGID for containers that need to update a shared library. |
/dev/input | Private in-memory filesystem | Virtual input devices belonging only to this desktop. |
/run, /run/lock, and /tmp | Temporary in-memory filesystems | Runtime 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:
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.