How to run multiple servers on SteamCMD?

how?

Nvm. hmm i cant seem to find a usefull anwser on your problem? :smiley:
Hope you find your answer

Just start each server with a different port. Each server must have it’s own directory, ofc. :slight_smile:

So, its safe to Copy/Paste GarrysModDS and run 2 servers?

If you mean the folder where garrysmod is in: yes. Just remember to change the port and have that port portforwarded :slight_smile:

Hope it works :D… i have never tried it myself so if it works plz respond :slight_smile:

i did it, and the server itself started well, but im having problems changing the ports that the server uses.

I don’t know if you can directly change the port, but I know that srcds will choose 27015 if it’s full, then 27016 etc.

well, i have changed hostport to 27016, but server refuses to show up on list.

Is that port open on your router?

To launch different Gmod servers on your PC and/or on a hosted box. You basically launch scrds.exe, or in linux /scrds_run with the following command(s) on a bat file

Windows Example 1 (w/o gamemode example):



@echo off
cls
echo Protecting srcds from crashes...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title Garry's Mod Bat starter
:srcds
echo (%time%) srcds started.
start /wait srcds.exe -console -game garrysmod +map gm_flatgrass +maxplayers 16 -autoupdate
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds


Windows Example 2 (w/ gamemode example + port):



@echo off
cls
echo Protecting srcds from crashes...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title Garry's Mod Bat starter
:srcds
echo (%time%) srcds started.
start /wait srcds.exe -console -game garrysmod +map gm_flatgrass +gamemode "terrortown" +maxplayers 16 -port 27019 -autoupdate
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds


Linux Example 1 (w/o gamemode example):



#!/bin/sh
echo "Starting Garry's Mod Server"
sleep 1
screen -A -m -d -S gmod-server ./srcds_run -console -game garrysmod +map gm_flatgrass +maxplayers 16 -autoupdate


Linux Example 2 (w/ gamemode example + port):



#!/bin/sh
echo "Starting Garry's Mod Server"
sleep 1
screen -A -m -d -S gmod-server ./srcds_run -console -game garrysmod +map gm_flatgrass +gamemode "terrortown" -port 27019 +maxplayers 16 -autoupdate


What does the commands do?
-port - Gives your server its own port so you can have different servers on the same box/computer
+gamemode - Sets your server’s gamemode, and it needs to read its folder (not the actual gamemode name)
-autoupdate - Everytime it starts the server, it checks if there is any new available update. (Warning, might slow down the server load!)
+map - Sets your server’s default map.
-console - Sometimes needed, but it really just loads the console up nothing more.
+maxplayers - Set the maxplayer count on the server, 32 is the maximum of the recommended size.

more information about Linux servers can be found HERE
more information about Windows servers can be found HERE

im trying that out, ill tell if it works.

[editline]9th July 2013[/editline]

i did that, still nothing changed, server still wont show up in list

And your ports are forwarded correctly?

nvm what i said, it was a problem with the ports :S