Prepare a Debian Server host
Debian Server 12 (Bookworm) and Debian Server 13 (Trixie) are candidate platforms for Steam Headless. This guide covers preparing a minimal Debian Server installation, including the firmware and host settings your games need.
1. System Baseline Verification
Debian Server 12 defaults to Linux 6.1 LTS, and Debian Server 13 defaults to Linux 6.12+. Both comfortably exceed the Linux 5.6 kernel floor.
Verify your kernel and unified cgroup status:
uname -r
stat -fc %T /sys/fs/cgroup
- Kernel: Must report ≥ 5.6.
- cgroups: Must return
cgroup2fs.
2. Enable Non-Free Firmware Repositories
Debian Server maintains a strict separation between free open-source software and proprietary binaries. Modern gaming hardware (Intel, AMD Radeon, and NVIDIA GeForce) requires closed-source firmware blobs to initialise hardware video encoders and graphics acceleration.
Step 2.1: Enable the non-free-firmware Repository
On Debian Server 12 and 13, verify that your APT sources include non-free-firmware and non-free.
Read the release codename from /etc/os-release and print the matching entries for a traditional /etc/apt/sources.list:
. /etc/os-release
cat <<EOF
deb http://deb.debian.org/debian ${VERSION_CODENAME} main contrib non-free non-free-firmware
deb http://deb.debian.org/debian-security ${VERSION_CODENAME}-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian ${VERSION_CODENAME}-updates main contrib non-free non-free-firmware
EOF
Update the corresponding entries in your existing sources file using this output. If your installation uses /etc/apt/sources.list.d/debian.sources instead, add contrib non-free non-free-firmware to its Components: lines. Keep the existing release suites and avoid adding duplicate entries. These instructions cover Debian 12 and 13; detecting the codename does not establish support for other releases.
Step 2.2: Install Required Firmware Packages
Update your package cache and install non-free firmware and CPU microcode:
sudo apt-get update
sudo apt-get install -y firmware-linux-nonfree firmware-misc-nonfree
# Install CPU microcode depending on your processor:
sudo apt-get install -y intel-microcode # For Intel processors
# or
sudo apt-get install -y amd64-microcode # For AMD processors
3. Install Docker Engine
Steam Headless requires Docker Engine 28.0.0 or higher for the writable-cgroups=true option. Install it from Docker's official Debian APT repository.
docker.io PackageDo not install Debian Server's default docker.io package (sudo apt install docker.io). Distribution packages in Debian Server stable are deliberately frozen and lack Docker 28's writable-cgroups=true security option. Always use Docker's official APT repository.
Step 3.1: Configure the Official Docker APT Repository
Install repository prerequisites and import the official Docker GPG key:
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Step 3.2: Install Docker Packages
Update APT and install Docker Engine, containerd, and the Compose plugin:
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
Step 3.3: Enable and Verify Docker
Enable Docker on boot and start the daemon:
sudo systemctl enable --now docker
Verify that Docker is running:
sudo docker ps
You should see a table of running containers without an error.
4. Kernel Device Nodes (uinput, uhid, fuse)
Steam Headless requires three kernel device nodes for controller emulation and user-space filesystems:
uinput: Virtual keyboard, mouse, and basic joystick creation.uhid: User-space HID controller emulation for virtual Xbox and PlayStation controllers.fuse: Filesystem in Userspace for AppImages and game launcher utilities.
Modern Debian Server installations automatically manage static device nodes and on-demand module loading via systemd-udevd.
Verify that the device nodes exist on your host:
ls -l /dev/uinput /dev/uhid /dev/fuse
- Expected output: All three paths should be present as character devices.
5. Kernel Resource Limits (Inotify & Memory Map Capacity)
Running desktop containers and modern 3D games requires tuning two host kernel parameters: inotify instance capacity (preventing desktop service crashes) and virtual memory map capacity (vm.max_map_count, preventing Steam and Proton games from crashing silently on launch).
Step 5.1: Persist Kernel Tuning
Debian Server 12 defaults to 128 inotify instances and 65,530 virtual memory mappings. Create /etc/sysctl.d/90-steam-headless.conf with the standard 1,024-instance default (recommended for up to three concurrent Steam Headless containers) and Valve's SteamOS baseline of 1,048,576 memory mappings. If you plan to run four or more containers, choose a higher value from the inotify sizing table.
cat <<'EOF' | sudo tee /etc/sysctl.d/90-steam-headless.conf >/dev/null
fs.inotify.max_user_instances = 1024
vm.max_map_count = 1048576
EOF
Step 5.2: Apply Configuration
Apply the new limits immediately:
sudo sysctl --system
Verify the active values:
sysctl fs.inotify.max_user_instances vm.max_map_count
- Expected output:
fs.inotify.max_user_instances = 1024vm.max_map_count = 1048576
6. AppArmor Security Configuration
Debian Server 12 and 13 enable AppArmor by default.
Docker's default docker-default AppArmor profile restricts the mount-propagation system calls required by systemd during container initialisation. You do not need to modify system-wide AppArmor profiles on your Debian Server host; the Docker Compose deployment templates provided in later sections configure the necessary container security options automatically.
7. GPU Driver Configuration
Steam Headless only requires the host kernel driver and firmware. Do not install desktop environments, Mesa userspace, or Steam on the Debian Server host.
Option A: Intel Graphics (VA-API)
Intel integrated and discrete GPUs use the in-kernel i915 or xe drivers combined with the non-free firmware installed in Section 2.
- Verify that the render node is available:
ls -l /dev/dri/renderD128
Option B: AMD Radeon Graphics
AMD Radeon GPUs use the open-source in-kernel amdgpu driver with non-free firmware.
- Verify that the render node is available:
ls -l /dev/dri/renderD*
Option C: NVIDIA GeForce Graphics
NVIDIA GPUs require a compatible NVIDIA driver stack, Kernel Mode Setting (nvidia_drm.modeset=1), and the NVIDIA Container Toolkit. Debian Server supports both open and proprietary NVIDIA kernel module packages.
If your server runs multiple NVIDIA graphics cards from different generations (for example, an older GTX 1050 Ti alongside a newer RTX 4060):
- Proprietary driver required: The Linux kernel can only load one NVIDIA kernel module flavour. Because open GPU kernel modules do not support cards older than the GTX 16 series, mixed-generation systems cannot use open kernel modules and must use the proprietary driver.
- Select the newest driver supporting all cards: Install the newest driver branch that supports every installed card (the lowest common denominator). For systems combining a Maxwell or Pascal card (GTX 900, GTX 10, or TITAN V) with a newer RTX card, select the Legacy 580xx tab below. On Debian Server 12, both cards will run under the pinned 580xx proprietary driver.
1. Install the NVIDIA driver
To access up-to-date drivers and container-optimised kernel modules, configure the official NVIDIA repository using cuda-keyring:
NVIDIA_DISTRO="debian$(. /etc/os-release && echo "$VERSION_ID")"
sudo apt-get update
sudo apt-get install -y linux-headers-$(uname -r) wget
wget "https://developer.download.nvidia.com/compute/cuda/repos/${NVIDIA_DISTRO}/x86_64/cuda-keyring_1.1-1_all.deb"
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
Select your graphics card family to reveal the exact installation commands:
- GTX 16 Series or Any RTX (Turing+ / Recommended)
- GTX 900, GTX 10, TITAN V (Maxwell & Pascal / 580xx)
Install the current driver with NVIDIA's open GPU kernel modules for Turing, Ampere, Ada Lovelace, and Blackwell cards:
sudo apt-get install -y \
nvidia-driver \
nvidia-kernel-open-dkms
On Debian Server 12 (Bookworm), lock to the 580 branch using the official pinning package, then install the driver with proprietary kernel modules for Maxwell and Pascal cards (such as the GTX 750/750 Ti, GTX 900 series, GTX 10 series, and TITAN V):
sudo apt-get install -y nvidia-driver-pinning-580
sudo apt-get install -y \
nvidia-driver \
nvidia-kernel-dkms
NVIDIA's Debian Server 13 repository begins at the R590 branch, which dropped support for Maxwell and Pascal GPUs, and does not contain R580 packages. For Maxwell and Pascal cards on Debian Server 13, install Debian Server's archive driver (sudo apt-get install -y linux-headers-$(uname -r) nvidia-driver from non-free), or run Debian Server 12 if you require the newer R580 driver.
Do not install both sets of packages. If you are unsure which graphics card you have, run lspci | grep -i nvidia before continuing.
2. Enable Kernel Mode Setting (nvidia_drm.modeset=1)
KWin Wayland requires Direct Rendering Manager modesetting enabled:
- Edit
/etc/default/gruband appendnvidia_drm.modeset=1toGRUB_CMDLINE_LINUX_DEFAULT. - Update GRUB and reboot:
sudo update-grubsudo reboot
- After rebooting, confirm modesetting is active:
cat /sys/module/nvidia_drm/parameters/modeset
- Expected output:
Y.
- Expected output:
3. Initialise NVIDIA device nodes at boot
Loading the NVIDIA kernel modules does not necessarily create /dev/nvidia-modeset or the unified-memory device nodes on a headless server. Install this startup helper to detect every NVIDIA graphics card, use its actual device minor, and ask nvidia-modprobe to create the required nodes before Docker starts:
sudo curl -fsSL https://steamheadless.com/scripts/steam-headless-nvidia-init \
-o /usr/local/sbin/steam-headless-nvidia-init
sudo chmod 0755 /usr/local/sbin/steam-headless-nvidia-init
Create and start the systemd service:
sudo tee /etc/systemd/system/steam-headless-nvidia-devices.service >/dev/null <<'EOF'
[Unit]
Description=Initialise NVIDIA device nodes for Steam Headless
After=systemd-modules-load.service
Before=docker.service containerd.service
[Service]
Type=oneshot
ExecCondition=/usr/local/sbin/steam-headless-nvidia-init --check
ExecStart=/usr/local/sbin/steam-headless-nvidia-init
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now steam-headless-nvidia-devices.service
Confirm the service, modules, modeset setting, and device files before creating the container:
systemctl --no-pager status steam-headless-nvidia-devices.service
lsmod | grep -E '^nvidia(_modeset|_drm|_uvm)?'
cat /sys/module/nvidia_drm/parameters/modeset
ls -l /dev/nvidia-modeset /dev/nvidia-uvm /dev/nvidia-uvm-tools
The service must report active (exited), all four NVIDIA modules must appear, the modeset command must print Y, and all three device paths must exist.
4. Install the NVIDIA Container Toolkit
Import the NVIDIA repository and install the toolkit:
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
Configure Docker and restart the service:
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
8. Verification Checklist
Run these diagnostic commands to confirm that your Debian Server host is fully prepared:
echo "=== 1. Docker Version ==="
sudo docker version --format 'Engine Version: {{.Server.Version}}'
echo "=== 2. cgroup v2 ==="
stat -fc 'cgroup filesystem: %T' /sys/fs/cgroup
echo "=== 3. DRM Render Node ==="
ls -l /dev/dri/renderD*
echo "=== 4. Virtual Input & FUSE Nodes ==="
ls -l /dev/uinput /dev/uhid /dev/fuse
echo "=== 5. Kernel Limits (Inotify & vm.max_map_count) ==="
sysctl fs.inotify.max_user_instances vm.max_map_count
→ Next step: Choose a Deployment Method.