How to run multiple instances of Steam dedicated servers on one machine?

Everytime when I try to start my steam games dedicated server while another server or the game itself is already running on the machine, I get the following error on the server startup and cant connect to the server at all:

Steam API failed to initalize!

Is there a way to host multiple steam servers on one dedicated server?

I tried using different ports with the -ports launch option aswell, but I still can run only one Steam server per server. Any help would be greatly appreciated :slight_smile:

I am still having this problem, I tried multiple things but nothing worked. I hope someone can help me if I provide more information:

My DefaultEngine.ini:

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=787040
SteamAppId=787040  
GameServerQueryPort=27015
bRelaunchInSteam=false
GameVersion=1.0.0.0
bUsesPresence=false
P2PConnectionTimeout=180

The errors on the second server I start:

It looks like the server requires a steam account to function, and one steam account can only be logged into one instance at a time, is there any way to remove this?

I hoped setting “bRelaunchInSteam=false” would fix it, but unfortunately it does not.

I use the steamworks plugin and the advanced steam sessions plugin. This is how I create a server (if its a dedicated server):

Here is the relevant server log part:

LogOnline: Display: STEAM: Loading Steam SDK 1.39
LogWindows: Failed to load '../../../Engine/Binaries/ThirdParty/Steamworks/Steamv139/Win64/steamclient64.dll' (GetLastError=126)
LogWindows: File '../../../Engine/Binaries/ThirdParty/Steamworks/Steamv139/Win64/steamclient64.dll' does not exist
LogOnline: Warning: 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.
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
LogOnline: Warning: STEAM: Steam API failed to initialize!
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()

Did you ever figure this out?

No, unfortunately not. I will reply once I find a solution, please do the same if you find a way to make it work :slight_smile:

Hey there! After trying around my self, I figured it out. You have to use different ports for both servers, and not only the game server port but also the Steam query port. By default this is 7777 and for Steam 27015, so your second server should use 7778 and 27016 as an example :slight_smile:

You can set that by launching your first server with

Server.exe -Port=7777 -QueryPort=27015

and your second one with

Server.exe -Port=7778 -QueryPort=27016

Hope that helps!

2 Likes

Thank you so much! Where do I set the query port? I tried using a .bat file with “C:\Location\MyGameServer.exe Port=7778 QueryPort=27016” but that didnt work. Thanks in advance!

Weird, I thought generally the Port and QueryPort command line parameters are built in the engine by default. There’s a way to set these using the DefaultEngine.ini, but that wouldn’t make sense since you’d have the same server build just open multiple times.

I got it to work, thank you very much for your help!

For everyone else who runs into the issue, using a shortcut with the arguments

for the first server:
“C:\Location\GameServer.exe” -logs -queryport=27105 -port=7777 -log

for the second server:
“C:\Location\GameServer.exe” -logs -queryport=27106 -port=7778 -log

2 Likes

Great stuff! I edited my answer to point at the correct solution.