Choose a network mode
The choice of network mode is purely about container capacity and IP address allocation. There is no streaming or latency performance difference between host networking and macvlan: both modes pass network traffic directly through the host network interface without Network Address Translation (NAT) overhead.
Your container count determines which mode you need:
- Single gaming container: Host networking is the simplest choice. The container shares the host machine's IP address directly, with zero extra network configuration required.
- Two or more concurrent containers: Macvlan networking is required. Each container receives its own dedicated IP address on your local network, preventing port collisions between Sunshine and web interface services running on the same host.
Before starting your containers, choose your network mode:
Streaming protocols: WebSockets, WebRTC, and Sunshine
Steam Headless provides two independent streaming paths:
- Native Web Portal (Steam Headless UI): Zero-install browser streaming accessible from any desktop or mobile browser.
- WebSockets (TCP - Default): On local network (LAN) environments with negligible packet loss, the transmission latency difference between TCP and UDP is practically zero (~1 ms). Because WebSocket video delivers raw frames directly to WebCodecs with zero buffer delay, it avoids the browser's hard-coded ~40 ms WebRTC jitter buffer, making WebSockets the vastly superior choice for home gaming.
- WebRTC (UDP): WebRTC streams media directly over UDP. Modern web browsers impose an unconfigurable ~40 ms internal jitter buffer penalty on WebRTC video, making it inferior on LAN. It is primarily useful as a fallback for lossy Wi-Fi or remote internet connections where TCP packet loss would otherwise stall video playback.
- Sunshine & Moonlight (Dedicated Streaming):
- Sunshine uses a custom, low-latency streaming protocol over UDP.
- Sunshine is always the superior connection for high-fps PC gaming when a Moonlight client is available (e.g. Steam Deck, ROG Ally, Apple TV, smart TV, or native PC client), offering up to 4K 120 FPS and multi-channel surround sound.
Network mode comparison
Steam Headless supports two network modes: Host networking (for single containers) and Macvlan networking (for multiple containers). Bridge networking is strictly unsupported.
| Feature / Criteria | Host Networking (Single Container) | Macvlan Networking (Multi-Container) | Docker Bridge (Unsupported) |
|---|---|---|---|
| Support Status | Supported (Recommended for 1 container) | Supported (Required for 2+ containers) | Unsupported (Do not use) |
| Container Capacity | Strictly 1 container per host | Multiple containers (2-5+ per host) | Broken port bindings |
| IP Addressing | Shares the host machine's IP | Dedicated LAN IP per container | Internal Docker NAT subnet |
| Setup Overhead | Zero configuration (no shims needed) | Requires macvlan network creation | Complex port mapping required |
| Sunshine / Moonlight Auto-Discovery | Native (works out of the box) | Native (works out of the box) | Broken by NAT firewall |
| Port Collisions | Occurs if running a second container | None (each container has its own IP) | Severe port conflicts |
| Host-to-Container Access | Native direct access | Optional Host Shim | Native |
Do NOT attempt to run Steam Headless using Docker's default bridge network (-p 8483:8483). Bridge networking places containers behind a Network Address Translation (NAT) firewall that breaks Moonlight client discovery broadcasts, disrupts WebRTC streaming, and prevents multiple containers from binding to fixed streaming ports. Bridge networking is completely unsupported.
Overview of supported modes
1. Host networking (recommended for single containers)
Host networking attaches the container directly to the host machine's network stack (network_mode: host).
- Why it is recommended for single containers: It is the fastest, simplest way to get up and running. There are no virtual interfaces, subnets, or host shims to configure. Moonlight clients immediately discover the gaming container on your local network.
- Limitation: Because Sunshine binds to fixed ports (47998-48010) and the web interface binds to port 8483, only one container can run in host mode per machine.
2. Macvlan networking (required for multiple containers)
Macvlan gives each container its own unique virtual MAC address and dedicated LAN IP address (for example, 192.168.1.50 for Container A, 192.168.1.51 for Container B).
- Why it is required for multi-container setups: It completely prevents port collisions. Each container runs Sunshine and the web interface on standard ports with its own IP address.
- Host communication: By default, Linux security prevents the host from communicating directly with its own macvlan child containers. If you need the host itself to communicate with the container (for automated scripts or host-side monitoring), an optional Host Shim can be configured.
Required network ports
Permit the following ports through any client-side or hardware firewalls on your network:
| Port | Protocol | Service | Description |
|---|---|---|---|
| 8483 | TCP | Web Portal (Steam Headless UI) | Web interface, HTTPS authentication, and WebSocket streaming. |
| 8483 | UDP | WebRTC Media (Steam Headless UI) | Direct low-latency WebRTC video and audio stream. |
| 47998 | UDP | Sunshine Video | Real-time video stream (H.264, HEVC, AV1). |
| 47999 | UDP | Sunshine Control | Controller input and stream ping/heartbeat channel. |
| 48000 | UDP | Sunshine Audio | Low-latency stereo/surround audio stream. |
| 48010 | UDP | Sunshine RTSP | Stream setup, resolution negotiation, and session teardown. |
| 47984 | TCP | Sunshine Web HTTPS | Sunshine web configuration (proxied securely through the web interface). |
| 47989 | TCP | Sunshine HTTP API | Sunshine API discovery and pairing service. |
| 27031, 27036 | UDP | Steam Remote Play | Optional Steam In-Home Streaming discovery and media channel. |
| 27036, 27037 | TCP | Steam Remote Play | Optional Steam In-Home Streaming control channel. |
Next steps
Select your network configuration guide to continue:
- Use host networking: Recommended for single-container setups sharing the host IP.
- Configure a macvlan network: Required for multi-container setups with dedicated LAN IPs.