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

Remove SERVER_PORT and STEAMAPPDATADIR environmetal variables. #79

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

feserr
Copy link
Contributor

@feserr feserr commented Dec 18, 2024

Removing SERVER_PORT and STEAMAPPDATADIR as it isn't properly set it will break the server.

Open all the ports Steam uses for the docker compose example.

@feserr
Copy link
Contributor Author

feserr commented Dec 18, 2024

@Diyagi What do you think about these changes for the discussion at #76 ?

@Diyagi
Copy link
Contributor

Diyagi commented Dec 18, 2024

SERVER_PORT should stay, just the default should be empty and the steam relay vs. direct connection should be documented.

I am kinda bad at explaining things so let me try again.

When the server is started without a port defined, it uses the Steam Relay Network. The only requirement for using the relay is that the server must be able to establish outbound connections to the internet.
The Steam Relay Network works by acting as a middleman between the player and the server, punching through NAT and firewalls. This is possible because both the server and the player initiate outbound connections to the relay (Server -> Relay and Client -> Relay). Since these connections originate from inside the network, most firewalls will allow them without requiring additional configuration.

When a port is defined, the server starts in direct connect mode. In this mode, the server does not use the Steam Relay Network. Instead, it behaves like a traditional game server, waiting for clients to establish a direct connection to it. Since the connection is initiated from outside the network, the server's port must be open and accessible for this method to work.

Not having to open any ports for an dedicated does feel weird because not many dedicated servers make use of steam relay, but it is an option.

@Diyagi
Copy link
Contributor

Diyagi commented Dec 18, 2024

Also, there is no way to know what port steam relay will use, thats defined when the server starts and its given by steam, heres an example of what steam gives to the server
https://api.steampowered.com/ISteamApps/GetSDRConfig/v1?appid=1621690

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants