Running Steam-enabled servers on GameLift

There have been one or two similar posts but no clear steps on how to run Steam-enabled servers on Gamelift. Any input would be appreciated.

If I am logged into a Steam client with an account that is used for Steamworks and I run the game client, Steam initializes and I see the steam overlay.

If I run the game server on Gamelift (including steam_appid.txt in the same directory as the exe) I get the error
STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable.

I assume I don’t have to run a steam client with a logged-in user on every single server? As that would not scale at all.

Our game is built in UE4.22 and works fine with Gamelift until we turn on Steam.

1 Like

Its a good question and I wish I knew of a good set of resources to point you to.

From a GameLift POV I believe the Server SDK doesn’t like any disconnects/network interruptions after the call to InitSDK - if a disconnect is seen then the process gets terminated, so its worth bearing that in mind if you need to switch network stacks.

Also if Steam needs to connect to your GameLift fleet, ensure you have any ports open to require inbound traffic.

Its been a while since I’ve integrated anything with Steam, but from memory (and this maybe out of date) but I believe you can use the install.bat file you provide to GameLift (which is only run once during fleet creation) to generate the information required via steamcmd.exe, update your server etc.

GameLift then make a AMI from everything installed on this instance which is used to initiate all other server instances so you can do a lot of set-up here that only has to happen once.

I will reach out to the GameLift team to see if they have any guidance.

Thanks for Gamelift-side guidance.

I have the gameplay ports and Steams GameServerQueryPorts open. Not seeing the GameServerQueryPorts in a netstat though. But that might be because Steam didn’t initialize (as the error above outlines).

I have also installed the Steam Client on the ec2 instance and logged in to it. Still get that error when I restart the server processes though.

Any info on how steamcmd.exe is used to run the server, especially in the context of the install.bat file, would be helpful too There is some info here: https://developer.valvesoftware.com/wiki/SteamCMD but not very detailed.

Thanks again!

I’m in the same position right now. I was able to debug and see that what’s failing on Gamlift is the call to SteamGameServer_Init (which is a Steamworks API), so it seems unrelated to UE. Couldn’t find a way to get an error message or something on why that init call failed.

Unfortunately GameLift doesn’t provide official support/debug for Steam usage, so we don’t have any examples we can give at this time.