Zwift Headless on unRAID with Steam Headless and Steam Link #35
Pinned
anderbak
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you've got a decent NVIDIA GPU already being shared between Docker containers running in a headless server of some kind, you can use this container along with Steam Headless and probably other similar containers, to get even more use out of that GPU and stream Zwift to Steam Link or Moonlight clients.
In my case, I use unRAID to host my VMs and other containers, some of which also use an RTX 2080 for acceleration. I know vGPU setups are starting to become more popular, but at least at this point, there's very little information that I'm aware of to get it set up on unRAID, and as far as I know, partitioning out a GPU seems a bit too rigid for this use case.
There were three config options that I came across that were key to getting this set up in my situation. Network, X11 Display ID, and PulseAudio.
Network: Since I intend to use Steam Headless for more than just Zwift, I was restricted to using the Network=Host option in order to share input devices between the Steam Link client and server based on this. I may or may not have been forced to set Zwift up the same way, but that was how I configured it initially and I haven't changed it since.
X11 Display ID: Steam Headless was pre configured with ID 55, which is likely both to deconflict with the host's display ID and I assume to work with noVNC, but I'm speculating on the latter. If you aren't headless, but still want a similar configuration, there are options for that as well.
PulseAudio: Steam Headless has a PulseAudio server socket mapped to /tmp/pulse/pulse-socket, so you just have to map /run/user/1000/pulse/native from Netbrain's Pulse Client config used in this Zwift container to the same place you map the PulseAudio socket from Steam Headless.
The following Docker run commands are my own, so your mappings will almost certainly be different:
Docker Headless:
/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='Steam-Headless' --net='host' --cpuset-cpus='0,1,2,3,4,8,9,10,11,12' --privileged=true -e TZ="America/New_York" -e HOST_OS="Unraid" -e HOST_HOSTNAME="anderBAKE" -e HOST_CONTAINERNAME="Steam-Headless" -e 'USER_PASSWORD'='Password' -e 'TZ'='America/New_York' -e 'USER_LOCALES'='en_US.UTF-8 UTF-8' -e 'NVIDIA_PATCH_VERSION'='' -e 'WEB_UI_MODE'='vnc' -e 'NVIDIA_VISIBLE_DEVICES'='all' -e 'NVIDIA_DRIVER_CAPABILITIES'='all' -e 'DISPLAY'=':55' -e 'MODE'='primary' -e 'PORT_NOVNC_WEB'='8083' -e 'ENABLE_VNC_AUDIO'='false' -e 'ENABLE_EVDEV_INPUTS'='false' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:8083]/' -l net.unraid.docker.icon='https://raw.githubusercontent.com/Josh5/docker-steam-headless/master/images/steam-icon.png' -v '/mnt/user/appdata/steam-headless':'/home/default':'rw' -v '/mnt/user/Games':'/mnt/games':'rw' --dns=192.168.1.1 --runtime=nvidia --hostname='SteamHeadless' --add-host='SteamHeadless:127.0.0.1' --restart='unless-stopped' --shm-size='2G' --ipc='host' -v '/tmp/.X11-unix/':'/tmp/.X11-unix/':'rw' -v '/tmp/pulse/':'/tmp/pulse/':'rw' --ulimit='nofile=1024:524288' --device='/dev/fuse' --device='/dev/uinput' --device-cgroup-rule='c 13:* rmw' --cap-add='NET_ADMIN' --cap-add='SYS_ADMIN' --cap-add='SYS_NICE' --security-opt='seccomp=unconfined' 'josh5/steam-headless:latest'
Zwift:
/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='Zwift' --net='host' --cpuset-cpus='0,1,2,3,4,8,9,10,11,12' --privileged=true -e TZ="America/New_York" -e HOST_OS="Unraid" -e HOST_HOSTNAME="anderBAKE" -e HOST_CONTAINERNAME="Zwift" -e 'DISPLAY'=':55' -e 'NVIDIA_VISIBLE_DEVICES'='all' -e 'NVIDIA_DRIVER_CAPABILITIES'='all' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.icon='https://us.zwift.com/cdn/shop/files/zwf_icon_rgb_og_200x.png?v=1648572513' -v '/tmp/.X11-unix':'/tmp/.X11-unix':'rw' -v '/mnt/user/appdata/Zwift/Game':'/home/user/.wine/drive_c/Program Files (x86)/':'rw' -v '/mnt/user/appdata/Zwift/User':'/home/user/Zwift/':'rw' -v '/tmp/pulse/pulse-socket':'/run/user/1000/pulse/native':'rw' --dns=192.168.1.1 --runtime=nvidia --cpus=9 'netbrain/zwift:latest'
Steam Headless is a pretty robust container for hosting Games. It has one click setup for a lot of other repos/platforms including Lutris. Lutris has an install script for Zwift, but at least in my case, I couldn't get it to work in the Steam Headless container on unRAID.
I'll include screenshots and performance info some time soon.
Beta Was this translation helpful? Give feedback.
All reactions