[Support] Josh5 - Steam (Headless)


Recommended Posts

store_home_share.thumb.jpg.8e7e9b807df336d49c6ccf6ea101d290.jpg

 

Application Name: Steam (Headless)

Application Site: https://store.steampowered.com/

Docker Hub: https://hub.docker.com/r/josh5/steam-headless/

Github: https://github.com/Josh5/docker-steam-headless/

Discord: https://unmanic.app/discord (Not just for Unmanic...)

 

 

Description:

Play your games in the browser with audio. Connect another device and use it with Steam Remote Play. 

 

 

Features:

  • NVIDIA GPU support
  • AMD GPU support
  • Full video/audio noVNC web access to a Desktop
  • Root access
  • SSH server for remote terminal access

 


Notes:

ADDITIONAL SOFTWARE:
If you wish to install additional applications, you can generate a
script inside the "~/init.d" directory ending with ".sh". This will be executed on the container startup.

 

STORAGE PATHS:
Everything that you wish to save in this container should be stored in the home directory or a docker container mount that you have specified. All files that are store outside your home directory are not persistent and will be wiped if there is an update of the container or you change something in the template.

 

GAMES LIBRARY:
It is recommended that you mount your games library to `/games` and configure Steam to add that path.

 

AUTO START APPLICATIONS:
In this container, Steam is configured to automatically start. If you wish to add additional services to automatically start, add them under Applications > Settings > Session and Startup in the WebUI.

 

NETWORK MODE:

If you want to use the container as a Steam Remote Play (previously "In Home Streaming") host device you should set the Network Type: to "host". This is a requirement for controller hardware to work and to prevent traffic being routed through the internet since Steam thinks you are on a different network.

 

 

Setup Guide:

CONTAINER TEMPLATE:

  1. Navigate to "APPS" tab.
  2. Search for "steam-headless"
  3. Select either Install or Actions > Install from the search result.
    install-steam-headless-unraid-ca.thumb.png.4d2fb7f5ae7d46f2d37da6466a8d7d3b.png
  4. Configure the template as required.

 

GPU CONFIGURATION (NVIDIA):

This container can use your GPU. In order for it to do this you need to have the NVIDIA plugin installed.

 

  1. Install the Nvidia-Driver Plugin by @ich777. This will maintain an up-to-date NVIDIA driver installation on your Unraid server.
    unraid-nvidia-plugin.thumb.png.b7c328e1cb0c7a5364cefeab597cf77c.png
  2. Toggle the steam-headless Docker Container template editor to "Advanced View".

  3. In the "Extra Parameters" field, ensure that you have the "--runtime=nvidia" parameter added.
    unraid-steam-headless-template-nvidia-extra-params.thumb.png.0421c194f4b5f6c72147635a92e14b39.png

  4. (Optional - This step is only necessary if you only have a single GPU, then leaving this as "all" is fine.) Expand the Show more settings... section near the bottom of the template. In the Nvidia GPU UUID: (NVIDIA_VISIBLE_DEVICES) variable, copy your GPU UUID (can be found in the Unraid Nvidia Plugin. See that forum thread for details).

 

GPU CONFIGURATION (AMD):

  1. Install the Radeon-Top Plugin by @ich777.image.thumb.png.197974d8a61c268525794394dadb70ba.png
  2. Profit

 

ADDING CONTROLLER SUPPORT:

Unraid's Linux kernel by default does not have the modules required to support controller input. Steam requires these modules to be able to create the virtual "Steam Input Gamepad Emulation" device that it can then map buttons to.

@ich777 Has kindly offered to build and maintain the required modules for the Unraid kernel as he already has a CI/CD pipeline in place and a small number of other kernel modules that he is maintaining for other projects. So a big thanks to him for that!

 

  1. Install the uinput plugin from the Apps tab.
    unraid-steam-headless-install-uinput-plugin.thumb.png.5445fa85686bb24606ab30bfef49f1c8.png
  2. The container will not be able to receive kernel events from the host unless the Network Type: is set to "host". Ensure that you container is configured this way.
    WARNING:
    Be aware that this container requires at least 8083, 32123, and 2222 available for the WebUI, Web Audio, and SSH to work. It will also require any ports that Steam requires for Steam Remote Play
    unraid-steam-headless-configure-network-as-host.thumb.png.62d1ac7f0094e8eff85fca4b67cff481.png
  3. No server restart is required, however. Ensure that the steam-headless Docker container is recreated after installing the uinput plugin for it to be able to detect the newly added module.
Edited by Josh.5
Add AMD support instructions
  • Like 9
  • Thanks 2
Link to comment
48 minutes ago, Squid said:

image.png.51a6d53deb2bbddaff2dcd3bf815de6c.png

 

(You found a display bug in CA in the process :) - Fixed next release)

Oh right... 
I also see these template errors. Going through and fixing up these for this and my other container templates.

  • Thanks 1
Link to comment
11 minutes ago, randomninjaatk said:

Does this support intel or amd gpu's?

 

EDIT: NVM, you said the others (intel/amd) are to follow shortly.

 

It sounds like you can use this as a steamlink host... do controllers work?

This Docker image is targeting games played in the browser or via Steam Remote Play (as you say using something like Seam Link). I've tested Steam Link pretty extensively and it works really well. I have tested it on my TV (Android TV), my phone and my MS Surface. All three devices work perfectly with a wireless Xbox controller. The phone also has the options for touch controls.

 

I've tried to make this container super simple to setup with Steam. From scratch I can install it and setup Steam for remote playback in about 10 mins.

I don't currently own an AMD GPU, so I may need help from someone else or I may need to go buy one to get that working. But it is definitely something I want to try.

 

I'm also looking at adding Epic Games, Retroarch, Lutris, etc. And I am looking at adding the ChimeraOS app for remotely managing steam/retroarch/etc. if possible.

  • Like 1
Link to comment

It was my plan originally to base this on Arch seeing as the new SteamOS was going to be Arch based. But that took me down a road of chasing my tail for no reason considering that most of the benefits of and Arch base is kernel level, which has nothing to do with Docker containers. So in the end I started by basing it off the current SteamOS builds and the bumped it up to bullseye when I felt it was working well.

 

I also toyed with setting up the webUI in Steam Big Picture mode all the time to make a much more streamlined experience and lighter image, but i found that that defeats the purpose of the webUI where you can go in and modify/install whatever custom applications you want. So in the end I just went with a light desktop. Steam always runs on startup, so you could always configure it to load into Big Picture mode as it is now.

Link to comment

@Josh.5 nice container. ;)

 

Then I can deprecate my Debian-Buster-Nvidia container and will point users to your container if that's okay for you. :)

 

I actually planned on creating a Bullseye based Nvidia container but got no time currently and since you've published this container I don't have to create one... :)

 

Link to comment
21 minutes ago, ich777 said:

@Josh.5 nice container. ;)

 

I will deprecate my Debian-Buster-Nvidia container and will point users to your container if that's okay for you.

 

I actually planned on creating a Bullseye based Nvidia container but got no time currently.

 

Thanks @ich777. I had inspiration from your Buster container. 


You are maintaining a lot of containers, so totally fine with you doing that if you want and if that helps you out with your stuff.

  • Like 1
Link to comment
9 minutes ago, Josh.5 said:

Thanks @ich777. I had inspiration from your Buster container. 

Nice, if I can help somewhere let me know, haven't even got time to look through the code or the template itself, will definitely do it and also try out the container.

 

11 minutes ago, Josh.5 said:

so totally fine with you doing that if you want and if that helps you out with your stuff.

Sure thing, I'm also happy if someone comes up with newer/better idea(s) on how to do such a container and make it more easy to install and I also don't think we need two different container that do basically the same thing... :)

 

May I ask two things:

  1. If I play through Steam Play if it's possible to plug in a controller and if that is working fine?
  2. Shouldn't it be possible to set up multiple containers (better speaking 3 on consumer cards because of NVENC) to stream from one unRAID box to multiple Steam Play instances?
Link to comment

Hello,

 

Stoked to try this out but I'm running into an issue: See below for docker log output:

 

ErrorWarningSystemArrayLogin



[ /scripts/10-setup_user.sh: executing... ]
**** Configure default user ****
Setting run user uid=100(default) gid=99(default)
Setting umask to 000
Adding default home directory template
Setting root password
Setting user password
DONE

[ /scripts/20-configre_sshd.sh: executing... ]
DONE

[ /scripts/30-configure_system_paths.sh: executing... ]
**** Configure system paths ****
Configure dbus
Configure X Windows context
Configure X Windows session
Remove old lockfiles
DONE

[ /scripts/40-setup_locale.sh: executing... ]
**** Locales already set correctly to en_US.UTF-8 UTF-8 ****
DONE

[ /scripts/50-configure_audio.sh: executing... ]
**** Configure pulseaudio socket ****
**** Patching noVNC with audio websocket ****
DONE

[ /scripts/80-configure_nvidia_driver.sh: executing... ]
**** Found NVIDIA device 'NVIDIA GeForce GTX 1050 Ti' ****
Downloading driver

Installing driver

DONE

[ /scripts/90-configure_xorg.sh: executing... ]
**** Generate NVIDIA xorg.conf ****
Configure Xwrapper.config
Configuring X11 with GPU ID: 'GPU-bb0a6c23-f6a4-d567-4fe4-edc694fe7fe9'
Configuring X11 with PCI bus ID: 'PCI:4:0:0'
Writing X11 config with Modeline "1600x900R" 97.50 1600 1648 1680 1760 900 903 908 926 +hsync -vsync

WARNING: Unable to locate/open X configuration file.


Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-server' found
Option "ProbeAllGpus" "False" added to Screen "Screen0".
Option "AllowEmptyInitialConfiguration" "True" added to Screen "Screen0".
New X configuration file written to '/etc/X11/xorg.conf'

DONE
**** Starting supervisord ****
DONE

[ /scripts/90-configure_xorg.sh: executing... ]
**** Generate NVIDIA xorg.conf ****
Configure Xwrapper.config
Configuring X11 with GPU ID: 'GPU-bb0a6c23-f6a4-d567-4fe4-edc694fe7fe9'
Configuring X11 with PCI bus ID: 'PCI:4:0:0'
Writing X11 config with Modeline "1600x900R" 97.50 1600 1648 1680 1760 900 903 908 926 +hsync -vsync

WARNING: Unable to locate/open X configuration file.


Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-server' found
Option "ProbeAllGpus" "False" added to Screen "Screen0".
Option "AllowEmptyInitialConfiguration" "True" added to Screen "Screen0".
New X configuration file written to '/etc/X11/xorg.conf'

DONE
**** Starting supervisord ****
2022-01-10 11:10:06,372 INFO Included extra file "/etc/supervisor/conf.d/services.conf" during parsing
2022-01-10 11:10:06,373 INFO Set uid to user 0 succeeded
2022-01-10 11:10:06,383 INFO RPC interface 'supervisor' initialized
2022-01-10 11:10:06,384 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2022-01-10 11:10:06,385 INFO supervisord started with pid 1
2022-01-10 11:10:07,390 INFO spawned: 'audiostream' with pid 172
2022-01-10 11:10:07,394 INFO spawned: 'audiowebsock' with pid 173
2022-01-10 11:10:07,396 INFO spawned: 'dbus' with pid 174
2022-01-10 11:10:07,401 INFO spawned: 'pulseaudio' with pid 175
2022-01-10 11:10:07,403 INFO spawned: 'ssh' with pid 176
2022-01-10 11:10:07,406 INFO spawned: 'xorg' with pid 177
2022-01-10 11:10:07,411 INFO spawned: 'x11vnc' with pid 178
2022-01-10 11:10:07,419 INFO spawned: 'de' with pid 179
2022-01-10 11:10:07,422 INFO spawned: 'novnc' with pid 180
2022-01-10 11:10:07,435 INFO exited: audiostream (exit status 111; not expected)
2022-01-10 11:10:07,519 INFO exited: xorg (exit status 1; not expected)
2022-01-10 11:10:07,581 INFO reaped unknown pid 221 (exit status 0)
2022-01-10 11:10:07,602 INFO exited: de (exit status 1; not expected)
2022-01-10 11:10:08,454 INFO spawned: 'audiostream' with pid 235
2022-01-10 11:10:08,455 INFO success: audiowebsock entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:08,455 INFO success: dbus entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:08,455 INFO success: pulseaudio entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:08,455 INFO success: ssh entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:08,456 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:08,456 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:08,456 INFO exited: x11vnc (exit status 1; not expected)
2022-01-10 11:10:08,462 INFO spawned: 'x11vnc' with pid 236
2022-01-10 11:10:08,471 INFO exited: audiostream (exit status 111; not expected)
2022-01-10 11:10:09,236 INFO spawned: 'xorg' with pid 240
2022-01-10 11:10:09,239 INFO spawned: 'de' with pid 241
2022-01-10 11:10:09,313 INFO exited: xorg (exit status 1; not expected)
2022-01-10 11:10:09,369 INFO reaped unknown pid 250 (exit status 0)
2022-01-10 11:10:09,371 INFO exited: de (exit status 1; not expected)
2022-01-10 11:10:09,483 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:09,485 INFO exited: x11vnc (exit status 1; not expected)
2022-01-10 11:10:10,491 INFO spawned: 'audiostream' with pid 251
2022-01-10 11:10:10,496 INFO spawned: 'x11vnc' with pid 252
2022-01-10 11:10:10,501 INFO exited: audiostream (exit status 111; not expected)
2022-01-10 11:10:11,262 INFO reaped unknown pid 220 (exit status 1)
2022-01-10 11:10:11,516 INFO spawned: 'xorg' with pid 253
2022-01-10 11:10:11,516 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:11,520 INFO spawned: 'de' with pid 254
2022-01-10 11:10:11,521 INFO exited: x11vnc (exit status 1; not expected)
2022-01-10 11:10:11,526 INFO spawned: 'x11vnc' with pid 255
2022-01-10 11:10:11,601 INFO exited: xorg (exit status 1; not expected)
2022-01-10 11:10:11,652 INFO reaped unknown pid 264 (exit status 0)
2022-01-10 11:10:11,653 INFO exited: de (exit status 1; not expected)
2022-01-10 11:10:12,547 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:12,547 INFO reaped unknown pid 249 (exit status 1)
2022-01-10 11:10:12,550 INFO exited: x11vnc (exit status 1; not expected)
2022-01-10 11:10:12,634 INFO spawned: 'x11vnc' with pid 265
2022-01-10 11:10:13,658 INFO spawned: 'audiostream' with pid 266
2022-01-10 11:10:13,658 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:13,659 INFO exited: x11vnc (exit status 1; not expected)
2022-01-10 11:10:13,663 INFO spawned: 'x11vnc' with pid 267
2022-01-10 11:10:13,667 INFO exited: audiostream (exit status 111; not expected)
2022-01-10 11:10:13,668 INFO gave up: audiostream entered FATAL state, too many start retries too quickly
2022-01-10 11:10:14,686 INFO spawned: 'xorg' with pid 268
2022-01-10 11:10:14,686 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:14,690 INFO spawned: 'de' with pid 269
2022-01-10 11:10:14,690 INFO reaped unknown pid 263 (exit status 1)
2022-01-10 11:10:14,691 INFO exited: x11vnc (exit status 1; not expected)
2022-01-10 11:10:14,695 INFO spawned: 'x11vnc' with pid 270
2022-01-10 11:10:14,757 INFO exited: xorg (exit status 1; not expected)
2022-01-10 11:10:14,813 INFO gave up: xorg entered FATAL state, too many start retries too quickly
2022-01-10 11:10:14,813 INFO reaped unknown pid 279 (exit status 0)
2022-01-10 11:10:14,815 INFO exited: de (exit status 1; not expected)
2022-01-10 11:10:15,463 INFO gave up: de entered FATAL state, too many start retries too quickly
2022-01-10 11:10:15,714 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:15,716 INFO exited: x11vnc (exit status 1; not expected)
2022-01-10 11:10:16,722 INFO spawned: 'x11vnc' with pid 280
2022-01-10 11:10:17,751 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:17,753 INFO exited: x11vnc (exit status 1; not expected)
2022-01-10 11:10:18,761 INFO spawned: 'x11vnc' with pid 281
2022-01-10 11:10:18,762 INFO reaped unknown pid 278 (exit status 1)
2022-01-10 11:10:19,783 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:19,786 INFO exited: x11vnc (exit status 1; not expected)
2022-01-10 11:10:20,793 INFO spawned: 'x11vnc' with pid 282
2022-01-10 11:10:21,563 WARN received SIGTERM indicating exit request
2022-01-10 11:10:21,564 INFO waiting for audiowebsock, dbus, pulseaudio, ssh, x11vnc, novnc to die
2022-01-10 11:10:21,595 INFO stopped: novnc (exit status 143)
2022-01-10 11:10:21,595 INFO reaped unknown pid 204 (exit status 0)
2022-01-10 11:10:21,563 WARN received SIGTERM indicating exit request
2022-01-10 11:10:21,564 INFO waiting for audiowebsock, dbus, pulseaudio, ssh, x11vnc, novnc to die
2022-01-10 11:10:21,595 INFO stopped: novnc (exit status 143)
2022-01-10 11:10:21,595 INFO reaped unknown pid 204 (exit status 0)
2022-01-10 11:10:21,815 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-01-10 11:10:21,817 INFO stopped: x11vnc (terminated by SIGQUIT)
2022-01-10 11:10:21,819 INFO stopped: ssh (exit status 255)
2022-01-10 11:10:21,821 INFO stopped: pulseaudio (terminated by SIGQUIT)
2022-01-10 11:10:21,824 INFO stopped: dbus (terminated by SIGQUIT)
2022-01-10 11:10:21,828 INFO stopped: audiowebsock (terminated by SIGQUIT)

 

Link to comment

 

Quote

May I ask two things:

  1. If I play through Steam Play if it's possible to plug in a controller and if that is working fine?

In all honesty, at this point I don't have an answer to this yet. Up until now I have only been using it headless and with controllers connected through the steam remote play. Getting usb devices to be recognised should not be too difficult right?
 

Quote

Shouldn't it be possible to set up multiple containers (better speaking 3 on consumer cards because of NVENC) to stream from one unRAID box to multiple Steam Play instances?

Yea, this is what I am working on currently. I keep getting the errors that the other people have reported here when starting x while running another container. But I believe that this should be possible.

 

Quote

Sure thing, I'm also happy if someone comes up with newer/better idea(s) on how to do such a container and make it more easy to install and I also don't think we need two different container that do basically the same thing... :)

I was going to say before, part of the reason for creating this container was because I wanted something that was 100% focused on being run headless for steam remote play. I wanted the container to not have any configuration requirements that may bloat it for people who are not wanting to connect hardware or output to a monitor. I wanted this container to be able to easily reboot in seconds back to Steam. So it was my intention to palm any people who wanted to setup hardware I/O for a Steam docker to your Buster container... But then here you came and ruined that plan. 😆 
I guess at this point I want to focus on getting the container to run real smooth as a headless and no direct hardware I/O solution, and then later on look at either forking it for that use-case or implementing it if it does not mean adding a lot of configuration to the the template.

  • Like 1
Link to comment
1 minute ago, Josh.5 said:

Anyone here getting errors trying to start the container, please make sure that you are not running any other containers like this that is using the GPU for a "screen". This is not currently possible.

Got it. I have Plex and Emby leveraging the card. I'll hold off for now, amigo.

Link to comment

Kudos for this, what an excellent surprise to find your container in the apps tab today!

 

I didn't read "Option path to your games. This path will need to also be configured in Steam after the first boot." and installed a game to the /home/default/.steam directory, but that was fixed shortly thereafter.

 

Thank you very much for this excellent container!

  • Thanks 1
Link to comment

 

5 hours ago, ich777 said:

Shouldn't it be possible to set up multiple containers (better speaking 3 on consumer cards because of NVENC) to stream from one unRAID box to multiple Steam Play instances?

After a bit of digging, I think the answer to this is no.
But perhaps I can modify this container such that the X server starts as root and then we make configurable the number of VNC desktops we want to run. This should work with the exception of the sound output hack that I added. This will also need to be rewritten. But then again (thinking out loud here...) There will still only be one IP assigned to the container, so I think only one remote stream will work at a time.
Another option is to create a X server container separate to this one and have this container share that process. This may work as there will be a dedicated X server for the single GPU hardware, and then each container that connects to it would still be able to have their own IP.

Link to comment

Just installed this, the "--runtime=nvidia" value was already there by default.

I also didn't modify "Nvidia GPU UUID" value as it was set to "all" by default and that seemed to work fine.


Got it running, have tried playing Factorio and all worked well! Thanks OP!

  • Like 1
Link to comment
Just installed this, the "--runtime=nvidia" value was already there by default.
I also didn't modify "Nvidia GPU UUID" value as it was set to "all" by default and that seemed to work fine.

Got it running, have tried playing Factorio and all worked well! Thanks OP!
Awesome.

I will be removing that runtime param from the template once I add support for other hardware. For now it can stay there.
Also, you are right. The only reason to specify the GPU uuid is when you have multiple and you specifically want to use one.
Link to comment

Awesome container, really excited to test this.

 

I do have this issue on Safari, doesn't happen in Firefox. I can still use the VNC, it just is in the way. No big deal, I can set up in Firefox and shouldn't need to touch it again.

 

image.thumb.png.d2923d29706bd4379ba34ccf1b89088a.png

 

Thank you for making this!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.