Skip to main content

Use host networking

Host networking (network_mode: host) connects the Steam Headless container directly to the host machine's network stack. Instead of creating a virtual network interface with a dedicated IP address, the container shares the host's existing IP address and binds directly to the host's network ports.

This mode offers the simplest setup for single-container installations, eliminating the need for virtual network configuration or a host communication shim.


When to use host networking​

Host networking is best suited for:

  • Dedicated single-session servers: You are running exactly one Steam Headless gaming container on the host machine.
  • Simplified deployment: You want to avoid configuring macvlan subnets, router DHCP exclusions, or host shims.
  • Wi-Fi connected hosts: Unlike macvlan, host networking works over Wi-Fi connections because the container does not generate additional MAC addresses. (However, a wired Ethernet connection is still strongly recommended for streaming performance).

Because the container shares the host's network identity, use host networking only on a home network you trust. Services exposed by Steam Headless listen on the host's own IP address, and your host firewall becomes the main protection against unwanted connections.


The strict single-container limitation​

Only One Container Per Host

You cannot run more than one Steam Headless container using host networking on the same host machine.

Steam Headless relies on fixed listening ports that cannot be dynamically offset:

  • Sunshine: Binds to UDP ports 47998, 47999, 48000, and 48010 for real-time video, audio, and controller input.
  • SHUI: Binds to TCP port 8483 for web authentication/WebSockets and UDP port 8483 for direct WebRTC media streaming.

Because two applications cannot bind to the same network port simultaneously on one IP address, starting a second container in host mode results in a port collision:

Checking Port Availability

Before launching, you can quickly check whether any existing services on your host are listening on these ports:

sudo ss -tulpn | grep -E '8483|47998|47999|48000|48010'

If this command returns no output, your ports are completely free.

If you plan to run two or more concurrent gaming sessions, use a dedicated-address network such as macvlan instead. Unraid can provide the same result with its supported ipvlan custom networks.


Configuration​

To deploy with host networking, simply set network_mode: host in your Compose file or pass --net=host to docker run:

Port Mappings Are Ignored in Host Mode

When using network_mode: host, standard Docker port mapping flags (ports: in Compose or -p 8483:8483 in CLI) are completely ignored by the Docker daemon. The container binds directly to the host's network interfaces.

Input remains isolated from the host​

Host networking shares network ports only. It does not give the container access to your host's keyboard, mouse, controllers, running programs, or Docker service.

Keep the device and security settings from the supplied deployment example unchanged. In particular, do not add host /dev/input, /run/udev, the host PID namespace, or the Docker socket. Steam Headless creates and manages its own virtual input devices inside the container, even when host networking is selected.


Host Firewall Configuration​

Because the container listens directly on the host interface, host firewall rules apply to incoming traffic:

Firewalld (Fedora Server / RHEL):​

sudo firewall-cmd --permanent --add-port=8483/tcp
sudo firewall-cmd --permanent --add-port=8483/udp
sudo firewall-cmd --permanent --add-port=47998-48000/udp
sudo firewall-cmd --permanent --add-port=48010/udp
sudo firewall-cmd --permanent --add-port=47984/tcp
sudo firewall-cmd --permanent --add-port=47989/tcp
sudo firewall-cmd --reload

UFW (Ubuntu Server / Debian Server):​

sudo ufw allow 8483/tcp comment 'SHUI Web Portal'
sudo ufw allow 8483/udp comment 'SHUI WebRTC Media'
sudo ufw allow 47998:48000/udp comment 'Sunshine Video/Control/Audio'
sudo ufw allow 48010/udp comment 'Sunshine RTSP'
sudo ufw allow 47984/tcp comment 'Sunshine Web HTTPS'
sudo ufw allow 47989/tcp comment 'Sunshine HTTP API'
sudo ufw reload

→ Next step: Configure Steam Headless.