Multiple Linux Dedicated Servers... Howto posted in the wiki
-
- On Lightcycle Grid
- Posts: 37
- Joined: Tue Jan 08, 2008 1:40 pm
Multiple Linux Dedicated Servers... Howto posted in the wiki
--- EDIT 30th July 2008 --------------------------------
SINCE I HAVE POSTED THIS FIRST MESSAGE, I HAVE CREATED A HOWTO ON THE ARMAGETRONAD WIKI:
http://wiki.armagetronad.net/index.php? ... x_computer
-------------------------------------------------------------------------------------
Hi guys,
I need some help here....
1. How can I verify if my dedicated server will restart if the server is rebooted ?
2. How can I run multiple servers on Linux ? I have no clue how to do it.
On windows, I was running multiple instance. But in Linux ? Any help welcome. Could not find anything in the documentation nor on the forum
SINCE I HAVE POSTED THIS FIRST MESSAGE, I HAVE CREATED A HOWTO ON THE ARMAGETRONAD WIKI:
http://wiki.armagetronad.net/index.php? ... x_computer
-------------------------------------------------------------------------------------
Hi guys,
I need some help here....
1. How can I verify if my dedicated server will restart if the server is rebooted ?
2. How can I run multiple servers on Linux ? I have no clue how to do it.
On windows, I was running multiple instance. But in Linux ? Any help welcome. Could not find anything in the documentation nor on the forum
Last edited by superkikim on Wed Jul 30, 2008 12:29 am, edited 3 times in total.
-
- Adjust Outside Corner Grinder
- Posts: 2003
- Joined: Tue Nov 07, 2006 6:02 pm
- Location: paris
- Contact:
1. err, reboot the machine? 
2. ok, do your stuff to get a source copy, ./configure --enable-dedicated( or --no-glout on older versions ) --prefix=/the/dir/where/you/want/arma/to/be
make && make install
make a resource/ directory somewhere, where your server will be able to write
Right, now you have an arma installation
you wont edit anything in there, that will be the part common to all your servers
now, let's make a dir, wherever you want...inside it, two dirs: config/ and var/
let var/ empty, and put your config files (settings_custom.cfg & server_info.cfg) in the config/ folder
then, start arma like this:

2. ok, do your stuff to get a source copy, ./configure --enable-dedicated( or --no-glout on older versions ) --prefix=/the/dir/where/you/want/arma/to/be
make && make install
make a resource/ directory somewhere, where your server will be able to write
Right, now you have an arma installation
you wont edit anything in there, that will be the part common to all your servers
now, let's make a dir, wherever you want...inside it, two dirs: config/ and var/
let var/ empty, and put your config files (settings_custom.cfg & server_info.cfg) in the config/ folder
then, start arma like this:
Code: Select all
/the/dir/where/you/want/arma/to/be/bin/armagetronad-dedicated --userconfigdir /path/to/config/ --vardir /path/to/var/ --resourcedir /path/to/resource/
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6712
- Joined: Thu Dec 18, 2003 7:03 pm
-
- Adjust Outside Corner Grinder
- Posts: 2003
- Joined: Tue Nov 07, 2006 6:02 pm
- Location: paris
- Contact:
Code: Select all
$ cat ~/.screenrc
screen -t "x server" 0 /home/rain/startserver.php testserver
screen -t "x server logparser" 1 inotail -f /home/rain/testserver/console_log.txt & cat >>/home/rain/testserver/console_input.txt
screen -t "x server TOADMIN log" 2 inotail -f /home/rain/testserver
-
- On Lightcycle Grid
- Posts: 37
- Joined: Tue Jan 08, 2008 1:40 pm
Multiple, like in more than one
Hi folks,
Tx for you replies. I've seen my message and I see I was not really clear in it.
I already run a linux Dedicated server on an FC4 dedicated server hosted remotely. This is the Fast Track Reloaded server.
I have a folder with all my settings there. I used the installer, so I didn't had to work from source files (I was glad, as I'm not a king in Linux). So I didn't do anything, and it just works. I have found that there is an armagetron service installed, and running. I can stop it, restart it. That ok. I know how to do it. The question is more conceptual.
I have a folder with all the settings for Fast Track Reloaded. I know that a second server runs on differnet ports. I made it on windows. The question more: How does it work on linux....
Let's say. I guess I have to create one folder per server, with the setting files inside. Good. Then, how do I tell the Armagetron Service I have many servers to run ?
Tx for you replies. I've seen my message and I see I was not really clear in it.
I already run a linux Dedicated server on an FC4 dedicated server hosted remotely. This is the Fast Track Reloaded server.
I have a folder with all my settings there. I used the installer, so I didn't had to work from source files (I was glad, as I'm not a king in Linux). So I didn't do anything, and it just works. I have found that there is an armagetron service installed, and running. I can stop it, restart it. That ok. I know how to do it. The question is more conceptual.
I have a folder with all the settings for Fast Track Reloaded. I know that a second server runs on differnet ports. I made it on windows. The question more: How does it work on linux....
Let's say. I guess I have to create one folder per server, with the setting files inside. Good. Then, how do I tell the Armagetron Service I have many servers to run ?
i would suggest building from source. that way, you can have everything in one folder. how did you get the first server? if you got it from your linux system's package installer, get the source for it (i know that on Debian, Ubuntu and other Debian derivatives it is "sudo apt-get source <package>") and build it somewhere else.
-
- On Lightcycle Grid
- Posts: 37
- Joined: Tue Jan 08, 2008 1:40 pm
Thank you for your suggestion.ivantis wrote:i would suggest building from source. that way, you can have everything in one folder. how did you get the first server? if you got it from your linux system's package installer, get the source for it (i know that on Debian, Ubuntu and other Debian derivatives it is "sudo apt-get source <package>") and build it somewhere else.
But what's next ? once I have rebuild it ?
The package for Debian is great. It installs Arma in a specific folder, but then, you can put the settings in another one. But I don't know the details how it is working.... I can't believe no one knows.
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6712
- Joined: Thu Dec 18, 2003 7:03 pm
If you build form source you would create a new directory for each server and place a var, config directory with the settings, as well as a symlink to the language directory in it and binary. Then you just launch a new server from each directoy. If you want to use the same global install, you can use command line arguments to specify new locations for the config and var directories.If you want them to all launch automatically with system boot, you'll have to figure out modifications to the system init script for Armagetron yourself.
Code: Select all
--configdir <Directory> : read game configuration (.cfg-files)
from this directory
--vardir <Directory> : save game logs and highscores in this directory

hold on: you could run servers from the same binaries and all, just make other .cfg files for them with unique settings. when you run each server, put the input file to something that says:
INCLUDE <thesettingfile>.cfg
(set input files by putting < after the command and then the path to the file, like "armagetron-server < /path/to/file.cfg")
INCLUDE <thesettingfile>.cfg
(set input files by putting < after the command and then the path to the file, like "armagetron-server < /path/to/file.cfg")
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6712
- Joined: Thu Dec 18, 2003 7:03 pm
-
- On Lightcycle Grid
- Posts: 37
- Joined: Tue Jan 08, 2008 1:40 pm
It works
Ok, I have managed to do what I wanted with screen
armagetronad-dedicated binary is in /usr/local/bin. This has been installed there by the precompiled armagetronad dedicated package (I'm using Fedora Core 4).
I have a folder dedicated to servers.
In that folder, I create one subfolder per server. Inside this, I make a settings, and a var folder
and so on.
Then, I have a script to launch the servers using GNU screen. My script look like:
The -dmS parameter creates a new window in detached mode with session name %1 (which is the 1st parameter on the script command line).
I run the script with as parameter the server folder name. This name will be used also as session name for screen:
That will then create a new screen session named server1, and will use the config files and the var folder in the server1 folder. Then that's the command I put in my rc.local script (with full path obviously).
Finally, to manage the servers, I just use screen -r which reattach the windows.
I'm quite glad with the solution. Hope it helps anyone who was wondering how to easily run multiple servers.
armagetronad-dedicated binary is in /usr/local/bin. This has been installed there by the precompiled armagetronad dedicated package (I'm using Fedora Core 4).
I have a folder dedicated to servers.
In that folder, I create one subfolder per server. Inside this, I make a settings, and a var folder
Code: Select all
/etc/armagetronad-dedicated/server1/settings
/etc/armagetronad-dedicated/server1/var
/etc/armagetronad-dedicated/server2/settings
/etc/armagetronad-dedicated/server2/var
Then, I have a script to launch the servers using GNU screen. My script look like:
Code: Select all
screen -dmS %1 /usr/local/bin/armagetronad-dedicated --configdir /etc/armagetronad-dedicated/$1/settings --vardir /etc/armagetronad-dedicated/$1/var
I run the script with as parameter the server folder name. This name will be used also as session name for screen:
Code: Select all
./myscript server1
Finally, to manage the servers, I just use screen -r which reattach the windows.
Code: Select all
screen -S server1 -r
-
- On Lightcycle Grid
- Posts: 37
- Joined: Tue Jan 08, 2008 1:40 pm
Hi all.
I have changed my scripts, and now, I can easily run and manage multiple servers. I have posted an article on the wiki explaining how.
I'm not a king in scripting, but this works pretty well. Hope my scripting is not too dirty.
http://wiki.armagetronad.net/index.php? ... x_computer
I have changed my scripts, and now, I can easily run and manage multiple servers. I have posted an article on the wiki explaining how.
I'm not a king in scripting, but this works pretty well. Hope my scripting is not too dirty.
http://wiki.armagetronad.net/index.php? ... x_computer
Doesn't look too bad. One minor note, though. If you build from a source release, you don't have to run bootstrap.sh, bootstrap.sh is only needed when building from a bzr branch.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN
Be the devil's own, Lucifer's my name.
- Iron Maiden
Be the devil's own, Lucifer's my name.
- Iron Maiden