Raised This Month: $51 Target: $400
 12% 

Running two servers from one folder


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 10-08-2017 , 08:47   Running two servers from one folder
Reply With Quote #1

Hi,
Is it possible (and not bad) to run two servers from one folder?
Only difference I want between the servers is running from two different server.cfg's, which I guess would just be noting that in the launch options.

So is it possible and a good idea to do this? Or should I just create two different folders for them, which would add more maintenance time
__________________
condolent is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 10-08-2017 , 10:25   Re: Running two servers from one folder
Reply With Quote #2

Quote:
Originally Posted by condolent View Post
Hi,
Is it possible (and not bad) to run two servers from one folder?
Only difference I want between the servers is running from two different server.cfg's, which I guess would just be noting that in the launch options.

So is it possible and a good idea to do this? Or should I just create two different folders for them, which would add more maintenance time
It's possible and functional, but I don't think it is the best approach primarily because say you wanted one server to run certain plugins and the other one to not, that won't work for that situation.
ThatKidWhoGames is offline
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 10-08-2017 , 12:43   Re: Running two servers from one folder
Reply With Quote #3

You should use symlinks
good_live is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 10-08-2017 , 16:36   Re: Running two servers from one folder
Reply With Quote #4

You would need to split Sourcemod along with the base server config.

https://wiki.alliedmods.net/Multiple...ers_(SourceMod)
__________________
Neuro Toxin is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 10-09-2017 , 03:15   Re: Running two servers from one folder
Reply With Quote #5

Quote:
Originally Posted by ThatKidWhoGames View Post
It's possible and functional, but I don't think it is the best approach primarily because say you wanted one server to run certain plugins and the other one to not, that won't work for that situation.
Yeah I get that but in this case I want the two servers to be identical, just a copy of another. So I think this might be the approach I'll take!

Thanks for everyones responses!
__________________
condolent is offline
Addicted.
AlliedModders Donor
Join Date: Dec 2013
Location: 0xA9D0DC
Old 10-10-2017 , 14:33   Re: Running two servers from one folder
Reply With Quote #6

You can use screen on Linux based servers to create multiple “screens” running from the same srcds directory
Addicted. is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-10-2017 , 15:20   Re: Running two servers from one folder
Reply With Quote #7

...bad side effect is in forked server,
if servers use same plugins and those plugins use own cfg file.

To get different plugins settings to work on each server,
one trick is blank (or comment plugin //cvars) plugin cfg file and add same cvars in each server servercfgfile "server_1.cfg"

*edit
maybe with symlink you can solve this. Never tested.
__________________
Do not Private Message @me

Last edited by Bacardi; 10-10-2017 at 15:24.
Bacardi is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 10-10-2017 , 16:51   Re: Running two servers from one folder
Reply With Quote #8

This is how I go about it.

- Create base directory to house everything
> c:\servers\
- Create a master steam game directory
> c:\servers\steam_740
- Install steamcmd and game to the master directory
- Create directory for each server
> c:\servers\ip_port\
- Create two directories in each server folder
> c:\servers\ip_port\csgo\
> c:\servers\ip_port\steam\
- Install Metamod and Sourcemod into the csgo directory
- Place all other files you edit in the csgo directory, eg: gamemodes*, server.cfg, ect...

- Create batch scripts in the main server directories
> c:\servers\ip_port\
>> install_master.bat
>>> This symbol links every file from the master into the servers steam directory
>> clean_master_overrides.bat
>>> This deletes every file that exists in the servers csgo directory from the servers steam directory
>> install_csgo.bat
>>> This symbol links every file from the servers csgo directory to the servers steam

So when you launch a server you run the above batches first.

Before updating via steamcmd you need a batch to delete everything in each servers steam directory.
__________________
Neuro Toxin is offline
TomL.
Veteran Member
Join Date: Oct 2017
Location: Germany
Old 10-12-2017 , 18:27   Re: Running two servers from one folder
Reply With Quote #9

This works by adding +servercfgfile (e.g. "+servercfgfile server1.cfg") to your start parameters.
There is also a very easy way to run multiple servers (with own cfg and addons folder) from 1 installation by using symlinks under linux.
TomL. is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode