Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Sunshine ports are not exposed #157

Open
ohare93 opened this issue Aug 9, 2024 · 5 comments
Open

[Bug]: Sunshine ports are not exposed #157

ohare93 opened this issue Aug 9, 2024 · 5 comments
Labels
status:awaiting-triage type:bug Something isn't working

Comments

@ohare93
Copy link

ohare93 commented Aug 9, 2024

Describe the Bug

The docker container installs Sunshine, but does not expose the ports in the dockerfile. Nor are the ports connected opened in the Unraid template.

How is one supposed to connect to Sunshine via Moonlight when the ports are not opened?

Steps to Reproduce

  1. Try connect to Sunshine in Docker container
  2. Cannot

Expected Behavior

Can connect

Screenshots

Sunshine docker image: https://hub.docker.com/r/lizardbyte/sunshine
image

Relevant Settings

Dockerfile only has EXPOSE 8305 https://github.com/Steam-Headless/docker-steam-headless/blob/master/Dockerfile.debian#L556 More should be exposed for Sunshine specifically

Version

latest

Platform

Unraid. The rest is irrelevant for this issue.

Relevant log output

None.
@ohare93 ohare93 added status:awaiting-triage type:bug Something isn't working labels Aug 9, 2024
@alansari
Copy link
Contributor

alansari commented Aug 9, 2024

Sunshine is the main reason the container needs to be run using host networking. The template on unRAID should reflect that. When using the host network you do not need to expose ports in order to make them available.

@ohare93
Copy link
Author

ohare93 commented Aug 9, 2024

You don't need to expose ports to make them available through Docker while on host mode? Well that is news to me.

Still I could not connect. Nothing would work. But your reply here gave me the idea to just go add the ports into the Unraid template:

image

And it worked! I can now connect

image

No keyboard or mouse controls, that is surely a small issue. I can actually find the machine now.


So am I understanding right that it is the intention that none of the ports are explicitly opened in either the Dockerfile or Unraid template, and that this setup apparently works for other people? 🤔

@alansari
Copy link
Contributor

"No keyboard or mouse controls, that is surely a small issue. I can actually find the machine now." <-- not a small issue and the root reason for the host networking requirement. The fact that you had to add the ports to the template leads me to believe you are not using host networking. Maybe attempting to run behind a proxy/reverse proxy, or using a custom ip on a bridged network?

Correct in that people are using host networking, not setting any ports in the template, have sunshine connecting, and inputs work correctly. Using ipvlan or macvlan, as i'm guessing you might be, would require the ports being opened for moonlight/sunshine just to connect. But due to the way sunshine handles inputs you still need to use host networking for inputs to function, current options are bind monuting the host udev data and input dev, or use dumb-udev (which is the default and recommended method) that is built into the container. If you need any additional help jump on discord for faster response times.
You can refrence docker host networking here: https://docs.docker.com/network/drivers/host/

@ohare93
Copy link
Author

ohare93 commented Aug 13, 2024

"No keyboard or mouse controls, that is surely a small issue. I can actually find the machine now." <-- not a small issue and the root reason for the host networking requirement.

Interesting.

The fact that you had to add the ports to the template leads me to believe you are not using host networking.

image

Never have been, yet I also cannot get access

Maybe attempting to run behind a proxy/reverse proxy, or using a custom ip on a bridged network?

Nope, none of that. I do have a reverse proxy setup on my server (Traefik) with some self hosted services, but I haven't gotten around to this container yet. Though that would be an end goal, to be able to connect to Steam/Sunshine while away from home and without just connecting to my home vpn. Due to other constraints I can no longer use the Steam streaming method.

"Bridged network" though, I am not 100% on the definitions here. Here is my home internet setup:

  1. The Router is plugged into the wall with its wifi disabled
  2. Network Switch is plugged into the router
  3. A UniFi Cloud Key is plugged into the switch
    a) which spreads its own wifi to 2 extention boxes across the house, that are also plugged into the switch
  4. Unraid server is plugged directly into the router.

I wonder if I must have it plugged into the switch 🤔 Probably!

@stealthdave
Copy link

I was having a similar issue with the input not working despite being seemingly setup with network type "host". My issue turned out to be as simple as "host" needing to be in quotes in the docker-compose.yml file:

    # NETWORK:
    ## NOTE:  With this configuration, if we do not use the host network, then physical device input
    ##        is not possible and your USB connected controllers will not work in steam games.
    network_mode: "host" # <-- this is now in quotes
    hostname: ${NAME}
    extra_hosts:
      - "${NAME}:127.0.0.1"

The example file did not have quotes around host. After this change, I no longer needed to manually open the Sunshine ports and input worked as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:awaiting-triage type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants