this post was submitted on 19 Jun 2023
110 points (98.2% liked)

Selfhosted

39939 readers
578 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Hello everyone! πŸ‘‹

For the past year I had fun messing around with Docker containers, Moonlight/Sunshine and HW acceleration; so much so that I've ended up building a Gamestream server from scratch!

The basic underlying idea is to allow the followings:

  • Share a single server (possibly headless but doesn't have to be) with multiple users
  • by creating virtual HW accelerated desktops
  • whilst keeping remote mouse, keyboard and controllers completely separated
  • with low latency

It's still rough around the edges, and it needs more testing from the community; if you want to check it out, here you can read the docs and here's the Github repo.

all 33 comments
sorted by: hot top controversial new old
[–] [email protected] 6 points 1 year ago (1 children)

Whoa, what a cool project! It seems like way more than I need for single-user purposes, but I've been relying on Moonlight, Sunshine, and Chiaki quite a lot more than I ever expected to since I ended up taking quite a liking to using the Steam Deck as a pseudo thin-client. Kind of the best of both worlds letting another machine do the heavy lifting somewhere else in the house, so any advancements in the local game streaming space are extremely welcome to see.

[–] abeltramo 6 points 1 year ago

Yeah the Steam Deck is such a perfect target for Moonlight I use it for all the demanding games that I can't run properly natively or when playing on the couch with a big screen.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago) (2 children)

Wow, this is impressive. Already seems quite stable, I got it running straight away on a headless machine with an Intel i5-7400T running Ubuntu 22.04. I think I need to do some optimising, but I can already use it as a somewhat convoluted way to get proper adblocking on an iPad!

I noticed a small mistake in the docs - the docker run command in the quickstart is missing a backslash.

The PulseAudio container also doesn't stop when the main wolf container stops - not sure if that's expected behaviour or not.

I'm excited to see where this project goes, I can see a bunch of uses for this running graphical application remotely.

[–] [email protected] 3 points 1 year ago

ingenious idea, but for having adfree youtube on the ipad the easiest way is to use invidious :)

[–] abeltramo 2 points 1 year ago

Thanks for trying it out and for the feedback, I'm glad it works!

You are right, we should probably stop and remove the pulse container; I'll add it to the things that needs to be improved.

[–] [email protected] 3 points 1 year ago

Very cool indeed!

[–] [email protected] 3 points 1 year ago

This is really awesome, and might fit the bill for a linux terminal server environment im setting up. Ill defo take a look when I can.

[–] [email protected] 2 points 1 year ago (1 children)

This looks promising! How's k8s compatibility/support? As I understand k8s doesn't officially support splitting the GPU between pods, but there apparently some workarounds.

[–] abeltramo 1 points 1 year ago

I don't have a lot of experience in k8s but the basic principle should work; at the moment Wolf connects directly to the Docker socket in order to spin up and down apps on demand.

I guess there might be some issues in passing the required socket files to the pods, but the whole running model can be changed in theory. Instead of having a single Wolf process you have one front instance that deals with clients and the Moonlight protocol which in turns starts new Wolf pods with the app running that then feed audio and video stream directly to clients.

Definitely do-able, just needs some proper thinking and probably a proper REST API

[–] [email protected] 2 points 1 year ago (1 children)

Would i deploy this on a VM or Bare Metal? Evaluating whether i should try it on my Unraid.

But looks Great!

[–] abeltramo 1 points 1 year ago (1 children)

It doesn't matter, as long as you have Docker installed (and possibly a GPU to HW accelerate things) you are good to go!

[–] Upronn 2 points 1 year ago (1 children)

Does it matter what kind of GPU you have? Would any GPU be able to run multiple gaming instances at the same time?

[–] abeltramo 2 points 1 year ago (1 children)

They should all be supported but there's only so many types of HW that we can test. So far we've got reports of Nvidia, AMD and Intel all working in different setups.

[–] Upronn 1 points 1 year ago* (last edited 1 year ago) (1 children)

That's great to hear. This might be the holy grail of game streaming server setups. I could build one strong server with one gpu and have it serve an arbitrary number of clients. Since they are all effectively Linux desktops, they should have a wide range of compatibility via WINE and emulators.

I did some more research and came up with another question: Does Vulkan work on AMD GPUs?

[–] abeltramo 1 points 1 year ago (1 children)

I could build one strong server with one gpu and have it serve an arbitrary number of clients

That's exactly our goal as well, there are still things that needs to be fixed and improved but the underlying idea is implemented and it works!

Does Vulkan work on AMD GPUs? It surely does!

[–] Upronn 1 points 1 year ago* (last edited 1 year ago)

I'll definitely set up an instance when I get some spare time.

Once you have it mature, you should reach out to Craft Computing on YouTube. He did a ~16 video series on different ways to build a private game streaming server and I believe what you have here would be much more achievable for a normal person.

[–] llanoraw 2 points 1 year ago (1 children)

Very nice! I've been on the hunt for a headless gamestream solution but not found something yet so will definitely be watching this project.

On first run it was failing to work, console log was showing http errors.

Also, it looks like lots of things run with Docker priveleged=true / root permissions? That's a no-go in my book. Any reason why?

[–] abeltramo 2 points 1 year ago (1 children)

On first run it was failing to work, console log was showing http errors.

Would you like to open up an issue on Github or share some logs in our Discord channel?

Also, it looks like lots of things run with Docker priveleged=true

Are you talking about Games on Whales compose file and script? That's a bit legacy as things are right now, Wolf does run all containers as unprivileged by default

[–] llanoraw 3 points 1 year ago (1 children)

Oops! Mixed up the two repos. Thanks for clarifying.

I'll post a log as well with the error I'm getting.

[–] abeltramo 1 points 1 year ago

Makes sense, as for the HTTP errors someone else reported on the Discord server that it might happen if you had previously paired on that host with Sunshine. If you unpair from Moonlight and pair again it seems to work

[–] ProfessionalBoofis 2 points 1 year ago

Damn that's cool

[–] draecas 1 points 1 year ago (1 children)

What's required to map a folder into one of the containers (i.e. retroarch)? I've attempted to edit config.toml to include it, but the main wolf container immediately crashes on boot due to interrupt code 11. There's no other error messages, just a binary stack trace.

The folder exists. I've tried directly mounting the host path as well as mounting it into Wolf-Wolf-1 and using the local path, but nothing works. Even perfectly mirrored paths don't work. Wolf appears to be running as root so I don't think it's a permissions error? I can certainly access the folders. They are a locally mounted NFS, but I've used this with dozens of containers without issue.

[–] abeltramo 1 points 1 year ago (1 children)

It's probably failing to parse the config.toml file, although that should usually print a proper error line. Have you tried deleting the file or copy and paste the default?

[–] draecas 2 points 1 year ago (1 children)

Looks like the mount definitions require the :ro (or maybe :rq?) at the end unlike regular docker volumes, that was the issue.

[–] abeltramo 2 points 1 year ago

Ooops that was a lazy leftover from my side, sorry about that. Thanks for letting me know, I'll fix it soon!

[–] [email protected] 1 points 1 year ago

So, you can use this as a sort of private GeForce now if I’m correct.

[–] NSA_Server_04 1 points 1 year ago (1 children)

Interesting project! Almost got reminded of Kasm, until I watched the YouTube video.

[–] abeltramo 3 points 1 year ago (1 children)

Kasm is probably similar in many ways, we are more focused on running videogames at low latency, compared to a more general remote desktop solution.

[–] NSA_Server_04 2 points 1 year ago

Absolutely nothing wrong with it! Keep up the good work.