• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Server How to run 2 servers in the same machine?

rodrigoxm49

Grizzled Veteran
Mar 21, 2015
98
1
I can run both of them, they have already different ports (7778 and 7779) on .ini and I can perfectly access them on WebAdmin.

But only the first appears on Server Lists on the game.

PS.: Host (that I'm trying to list servers) and Server are in different location (different IPs/LAN, etc)

What I'm possibly missing?
 
First, use the command line parameters to fix your ports at start, do not use the ini file for that. See here for what these parameters are (actually they are SWITCHES) http://wiki.tripwireinteractive.com/...Launch_Options example if you want to set manually all the ports you can do this:

Windows:
start .\Binaries\win64\kfserver kf-bioticslab -Port=7777 -QueryPort=27015 -WebAdminPort=8080
Linux:
./Binaries/Win64/KFGameSteamServer.bin.x86_64 kf-bioticslab -Port=7777 -QueryPort=27015 -WebAdminPort=8080

Also try to separate the ports more than +1 for example first sever on 7777 the second on 7787 a third on 7797 and so on (adding +10 to Game Port every time for each different server, you can use something else than +10 but this is what I use). Also be sure to open and forward all the ports as indicated on the wiki http://wiki.tripwireinteractive.com/...Floor_2)#Ports (but you can also look at your server log file in the beginning of it, it should also list all the ports used unless you set them in command line in which case you already know the ports as they are written in the command line so it will not list them in log).

Remember that whether you set the ports in command line or not, the Steam Port will always automatically bind, you can not change this port manually you'll need to calculate it (look at default port and see the number difference for default Game Port, and simply add this difference to your custom Game Port to know what it will be), you can also verify you opened and forwarded the good one for Steam Port by looking at the log file it will be listed here.
[0000.43] Log: Automatically setting Steam port to xxxxx (server port is xxxx)

A simple rule if you want to know which ports server use, let say Game Port (the one you set in command line with -Port=xxxx) is 7777, let call it X for my example:

Game Port = 7777 = X
Query Port = X + 19238 = 7777 + 19238 = 27015
Steam Port = X + 12783 = 7777 + 12783 = 20560

So if you use another port for the Game Port, simply replace X by it and you'll know the others to open and forward in your router/firewall

So for each game server you'll have 4 different ports to open and forward (Game Port and Query port that you can set from command line and recommended to use the default difference like with default ports as shown above, Web Admin Port that you can also set in command line but chose whatever port you want, the Steam Port that will be automatically calculated from Game Port (and also actually a 'fifth' port for Weekly mode, the NTP port which will be port 123 and common to all servers you have, which needs to be opened once for all servers you want to run on same machine).

If everything is correctly set they should be all visible in the server browser, unless you have filters avoiding them to be listed (click the Reset filter button to be sure, also ask other people if they see them, if only you can not see all, try deleting you game config in My Games/Killing Floor 2/ it can help)
 
Upvote 0