<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.armagetronad.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Superkikim</id>
	<title>Armagetron Advanced - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.armagetronad.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Superkikim"/>
	<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Special:Contributions/Superkikim"/>
	<updated>2026-10-16T02:09:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=29978</id>
		<title>Running Multiple Servers on a single Linux computer</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=29978"/>
		<updated>2011-01-03T01:34:47Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: /* Credits */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
If you like to experiment new settings, it might be that you come with a set of interesting servers. A shame if you cannot run them all at the same time. Here is how you can achieve this on a Linux server. Please refer to the lag and bandwidth chapters in the wiki before to run multiple servers. If you run too many, you might end with a very bad gameplay.&lt;br /&gt;
&lt;br /&gt;
This chapter will present you an easy way to run multiple servers on a single Linux computer, using GNU screen.&lt;br /&gt;
&lt;br /&gt;
== Server installation ==&lt;br /&gt;
&lt;br /&gt;
First of all, you have to install the Armagetron Advanced Dedicated Server from your specific operating system&#039;s packages.&lt;br /&gt;
&lt;br /&gt;
Linux source can be found at: https://launchpad.net/armagetronad/&lt;br /&gt;
&lt;br /&gt;
For this tutorial we will use the 0.2.8-armagetronad-ct+sty branch&lt;br /&gt;
CD into /home/&lt;br /&gt;
 cd /home/&lt;br /&gt;
&lt;br /&gt;
download the source files&lt;br /&gt;
 bzr branch lp:~armagetronad-ct/armagetronad/0.2.8-armagetronad-sty+ct&lt;br /&gt;
&lt;br /&gt;
once the source if finished downloading to the server CD to the branch&lt;br /&gt;
 cd /home/0.2.8-armagetronad-sty+ct&lt;br /&gt;
&lt;br /&gt;
now run the bootstrap&lt;br /&gt;
 ./bootstrap.sh&lt;br /&gt;
&lt;br /&gt;
Now configure the server. You can look up more options for configuration with ./configure --help. But we will configure the server to be, this way&lt;br /&gt;
 ./configure --disable-glout --enable-authentication --prefix=/home/armagetronad --exec_prefix=/home/armagetronad&lt;br /&gt;
&lt;br /&gt;
once that is configured execute the following command.&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Now your server has been installed in /home/armagetronad/bin&lt;br /&gt;
&lt;br /&gt;
now continues through the rest of the steps&lt;br /&gt;
&lt;br /&gt;
== Preparing the servers ==&lt;br /&gt;
&lt;br /&gt;
=== The tree ===&lt;br /&gt;
&lt;br /&gt;
CD to /home/armagetronad/ &lt;br /&gt;
 cd /home/armagetronad/&lt;br /&gt;
&lt;br /&gt;
Create the following sub directories:&lt;br /&gt;
&lt;br /&gt;
 mkdir servers      &#039;This folder will be used to store server configurations&lt;br /&gt;
 mkdir logs         &#039;This one will be used to save the server logs&lt;br /&gt;
 mkdir scripts      &#039;And this one will be used to same the scripts we will see below&lt;br /&gt;
&lt;br /&gt;
We have now to create our servers. To do so, go to the servers directory you have created earlier, and for each server, create a sub folder with a one-word name for the server, and one sub folder: var. For example:&lt;br /&gt;
&lt;br /&gt;
 cd /home/armagetronad/servers&lt;br /&gt;
&lt;br /&gt;
To create a server called server1:&lt;br /&gt;
&lt;br /&gt;
 mkdir server1&lt;br /&gt;
 mkdir server1/var&lt;br /&gt;
&lt;br /&gt;
then copy your config files in the var sub folder.&lt;br /&gt;
&lt;br /&gt;
You can then create a second server, and more...&lt;br /&gt;
&lt;br /&gt;
 mkdir server2&lt;br /&gt;
 mkdir server2/var&lt;br /&gt;
and so on...&lt;br /&gt;
&lt;br /&gt;
=== The setting files ===&lt;br /&gt;
&lt;br /&gt;
For each server, do not forget to create a &amp;quot;server_info.cfg&amp;quot; file (search the wiki about it), and to change the port number. Port can be from 4534 to 4540, meaning you can safely run up to 7 servers on the same computer, depending obviously on the settings of each servers, and the bandwidth they need.&lt;br /&gt;
&lt;br /&gt;
We assume that you know enough about Server Administration to understand the above explainations. This article is about Advanced Server Administration, isn&#039;t it ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The scripts ==&lt;br /&gt;
&lt;br /&gt;
Now you have to create the scripts to launch and log all your servers. To allow managing each server separately, we will use GNU Screen. GNU screen is a terminal window manager. If it is not install on your server, you can get it with the usual installation tool (yum install screen, apt get screen, etc...). Again... advanced.... We assume you know how to install applications on linux and therefore, we assume GNU screen has been installed&lt;br /&gt;
&lt;br /&gt;
You have to create two scripts. The first one will run a server and start logging the window in which the server has started. The second one will execute the first one for each folder in the /home/armagetronad/servers folder. It will create a window for each of them. Therefore, if you don&#039;t want a server to run, you will have to temporarily move the server folder out from the /home/armagetronad/servers directory.&lt;br /&gt;
&lt;br /&gt;
Save the scripts in the /home/armagetronad/scripts directory. I use nano which is an easy text editor. &lt;br /&gt;
&lt;br /&gt;
=== The server script ===&lt;br /&gt;
&lt;br /&gt;
The first script will be called in this example: srv&lt;br /&gt;
&lt;br /&gt;
 nano /home/armagetronad/scripts/srv &lt;br /&gt;
That creates a text file called srv in the scripts directory. Write the following lines in the file:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 loc=&amp;quot;/home/armagetronad&amp;quot;&lt;br /&gt;
 mkdir $loc/logs/$1&lt;br /&gt;
 screen -S $1 -X logtstamp on 					# print timestamps in log file&lt;br /&gt;
 screen -S $1 -X logfile $loc/logs/$1/$1_%m-%d-%Y-%c.log 	# create a logfile in the logs subf&lt;br /&gt;
 screen -S $1 -X log on 					# Turn on logging for the server window&lt;br /&gt;
 while true; do 						# start a loop to allow server restart if it crashes                         &lt;br /&gt;
            &lt;br /&gt;
 # runs the actual server. By default, the binary is called armagetronad-dedicated and is located in the prefix/bin directory. In this example, it is&lt;br /&gt;
 # in /home/armagetronad/bin directory.&lt;br /&gt;
 	$loc/bin/armagetronad-dedicated --vardir $loc/servers/$1/var                                                                                  &lt;br /&gt;
 # Shows the errors and indicates that the server has crashed, and then, waits 5 seconds before restarting the server, allowing you to quit with CTRL-C&lt;br /&gt;
        echo &amp;quot;Server has crashed. It will restart immediately..., press CTRL-C to cancel&amp;quot;&lt;br /&gt;
        sleep 5                                                                                                                                          &lt;br /&gt;
 done # end the loop&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To save the file, press CTRL-X and Y to confirm. You have now a file called srv in /home/armagetronad/scripts&lt;br /&gt;
&lt;br /&gt;
=== the global script ===&lt;br /&gt;
&lt;br /&gt;
Create the second script. I called it start: &amp;lt;code&amp;gt; nano /home/armagetronad/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #!/bin/bash                                                                                                                                               &lt;br /&gt;
 # If you run the script with a parameter (server name), only that server will be start. Otherwise, all servers in the /home/arma/servers directory &lt;br /&gt;
 # will be started&lt;br /&gt;
 if [ &amp;quot;$1&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
        screen -S $1 -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
        screen -dmS $1 /home/armagetronad/scripts/srv $1			 # start a GNU screen window with the specified server inside&lt;br /&gt;
 else&lt;br /&gt;
        for f in $(ls /home/armagetronad/scripts/servers/.)	 # start a loop running the following command for any existing folders in the&lt;br /&gt;
 # /home/armagetronad/servers folder&lt;br /&gt;
                 do&lt;br /&gt;
                        screen -S $f -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
                        screen -dmS $f /home/armagetronad/scripts/srv $f	# start a GNU screen window with the server inside for each server folder&lt;br /&gt;
                        done							# ends the loop&lt;br /&gt;
 fi&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Save it and exit the same way as before.&lt;br /&gt;
&lt;br /&gt;
BEFORE YOU RUN THE SCRIPT:&lt;br /&gt;
&amp;lt;code&amp;gt;chmod +x srv start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Starting all servers ===&lt;br /&gt;
&lt;br /&gt;
To make your servers start at boot, edit the /etc/rc.local file and add the &amp;quot;start&amp;quot; script at the end of &amp;lt;code&amp;gt;/home/armagetronad/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to manually start all servers, just run the &amp;lt;code&amp;gt;./start&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
=== Starting a single specific server ===&lt;br /&gt;
&lt;br /&gt;
CD to /home/armagetronad/scripts/&lt;br /&gt;
 cd /home/armagetronad/scripts/&lt;br /&gt;
&lt;br /&gt;
Now if you want to start (or restart) a single server, just run ./start servername, for example&lt;br /&gt;
 ./start server1&lt;br /&gt;
&lt;br /&gt;
== Server management ==&lt;br /&gt;
&lt;br /&gt;
=== GNU screen ===&lt;br /&gt;
&lt;br /&gt;
GNU screen is a great tool. As explained above, it allow a multi-windowed environement on the simple terminal. And even better, the windows stay alive, evening when you disconnect from the server. You can find everything about GNU screen by typing &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt; on a terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Listing the running servers ===&lt;br /&gt;
&lt;br /&gt;
To see the existing windows, meaning here, the running servers, type &amp;lt;code&amp;gt;screen -ls&amp;lt;/code&amp;gt;. It will gives you a list of running windows.&lt;br /&gt;
&lt;br /&gt;
=== Accessing and leaving a server console ===&lt;br /&gt;
&lt;br /&gt;
To attach to a window, type &amp;lt;code&amp;gt;screen -r servername&amp;lt;/code&amp;gt;. You will be in the server console. You can then do all the command you would usually do there. Remote moderation, server adjustment, and so on.&lt;br /&gt;
&lt;br /&gt;
To detach, but keep the server running, press CTRL-a d (control key + low case A, then low case D to detach). You can find all GNU screen key combinations by reading &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Killing a server ===&lt;br /&gt;
&lt;br /&gt;
To kill a server, attach to its window, and press CTRL-C. This will kill the script, and the window. Then press ESC to exit the dead window. An alternate way is to run &lt;br /&gt;
 screen -S servername -X quit&lt;br /&gt;
This will kill and end the window and the server inside.&lt;br /&gt;
&lt;br /&gt;
=== Log files ===&lt;br /&gt;
&lt;br /&gt;
Everytime the &amp;lt;code&amp;gt;srv&amp;lt;/code&amp;gt; script is run, a new logfile will be created in the /opt/armagetronad/logs folder. Keep an eye on log sizes. You don&#039;t want to run out of disk space because of Armagetron Advanced, do you ?&lt;br /&gt;
&lt;br /&gt;
=== Test the server autorestart ===&lt;br /&gt;
&lt;br /&gt;
If you want to try if the server restarts when it crash, do not press CTRL-C into the window. CTRL-C kill the script, therefore it will not be able to restart. Instead, run the &amp;lt;code&amp;gt;quit&amp;lt;/code&amp;gt; command inside the server console. It will close the server, and you will be able to see the message, and the server restarting.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This article has been written by Superkikim. These scripts and setup details are used to run the &amp;quot;FAST TRACK&amp;quot;, &amp;quot;Most Wanted&amp;quot; and &amp;quot;Club Dutch&amp;quot; servers.&lt;br /&gt;
&lt;br /&gt;
== VPS packs to install ==&lt;br /&gt;
&lt;br /&gt;
On Centos based systems (Fedora Core, Redhat):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;yum groupinstall &amp;quot;Development Tools&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
yum install libxml2-devel&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install BZR&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;su -c &#039;rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm&#039;&amp;lt;br \&amp;gt;&lt;br /&gt;
su -c &#039;yum install bzr&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Compiling Zthreads&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
CXXFLAGS=-fpermissive ./configure --prefix=/usr&amp;lt;br&amp;gt;&lt;br /&gt;
make&amp;lt;br&amp;gt;&lt;br /&gt;
make install&amp;lt;br&amp;gt;&lt;br /&gt;
ldconfig&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Server/config]]&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=26534</id>
		<title>Running Multiple Servers on a single Linux computer</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=26534"/>
		<updated>2010-04-04T20:22:13Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: /* VPS packs to install */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
If you like to experiment new settings, it might be that you come with a set of interesting servers. A shame if you cannot run them all at the same time. Here is how you can achieve this on a Linux server. Please refer to the lag and bandwidth chapters in the wiki before to run multiple servers. If you run too many, you might end with a very bad gameplay.&lt;br /&gt;
&lt;br /&gt;
This chapter will present you an easy way to run multiple servers on a single Linux computer, using GNU screen.&lt;br /&gt;
&lt;br /&gt;
== Server installation ==&lt;br /&gt;
&lt;br /&gt;
First of all, you have to install the Armagetron Advanced Dedicated Server from your specific operating system&#039;s packages.&lt;br /&gt;
&lt;br /&gt;
Ubuntu packages can be found at: https://launchpad.net/~armagetronad-dev/+archive/ppa&lt;br /&gt;
&lt;br /&gt;
== Preparing the servers ==&lt;br /&gt;
&lt;br /&gt;
=== The tree ===&lt;br /&gt;
&lt;br /&gt;
CD to /opt/armagetronad/ &lt;br /&gt;
 cd /opt/armagetronad/&lt;br /&gt;
&lt;br /&gt;
Create the following subdirectories:&lt;br /&gt;
&lt;br /&gt;
 mkdir servers      &#039;This folder will be used to store server configurations&lt;br /&gt;
 mkdir logs         &#039;This one will be used to save the server logs&lt;br /&gt;
 mkdir scripts      &#039;And this one will be used to same the scripts we will see below&lt;br /&gt;
&lt;br /&gt;
We have now to create our servers. To do so, go to the servers directory you have created earlier, and for each server, create a subfolder with a one-word name for the server, and two subfolders: var and settings. For exemple:&lt;br /&gt;
&lt;br /&gt;
 cd /opt/armagetronad/servers&lt;br /&gt;
&lt;br /&gt;
To create a server called server1:&lt;br /&gt;
&lt;br /&gt;
 mkdir server1&lt;br /&gt;
 mkdir server1/settings&lt;br /&gt;
 mkdir server1/var&lt;br /&gt;
then copy your config files in the settings subfolder.&lt;br /&gt;
&lt;br /&gt;
You can then create a second server, and more...&lt;br /&gt;
&lt;br /&gt;
 mkdir server2&lt;br /&gt;
 mkdir server2/settings&lt;br /&gt;
 mkdir server2/var&lt;br /&gt;
and so on...&lt;br /&gt;
&lt;br /&gt;
=== The setting files ===&lt;br /&gt;
&lt;br /&gt;
For each server, do not forget to create a &amp;quot;server_info.cfg&amp;quot; file (search the wiki about it), and to change the port number. Port can be from 4534 to 4540, meaning you can safely run up to 7 servers on the same computer, depending obviously on the settings of each servers, and the bandwidth they need.&lt;br /&gt;
&lt;br /&gt;
We assume that you know enough about Server Administration to understand the above explainations. This article is about Advanced Server Administration, isn&#039;t it ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The scripts ==&lt;br /&gt;
&lt;br /&gt;
Now you have to create the scripts to launch and log all your servers. To allow managing each server separately, we will use GNU Screen. GNU screen is a terminal window manager. If it is not install on your server, you can get it with the usual installation tool (yum install screen, apt get screen, etc...). Again... advanced.... We assume you know how to install applications on linux and therefore, we assume GNU screen has been installed&lt;br /&gt;
&lt;br /&gt;
You have to create two scripts. The first one will run a server and start logging the window in which the server has started. The second one will execute the first one for each folder in the /opt/armagetronad/servers folder. It will create a window for each of them. Therefore, if you don&#039;t want a server to run, you will have to temporarily move the server folder out from the /opt/armagetronad/servers directory.&lt;br /&gt;
&lt;br /&gt;
Save the scripts in the /opt/armagetronad/scripts directory. I use nano which is an easy text editor. &lt;br /&gt;
&lt;br /&gt;
=== The server script ===&lt;br /&gt;
&lt;br /&gt;
The first script will be called in this example: srv&lt;br /&gt;
&lt;br /&gt;
 nano /opt/armagetronad/scripts/srv &lt;br /&gt;
That creates a text file called srv in the scripts directory. Write the following lines in the file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 screen -S $1 -X logtstamp on 					# print timestamps in log file&lt;br /&gt;
 screen -S $1 -X logfile /opt/armagetronad/logs/$1_%d%m%Y-%c.log 	# create a logfile in the logs subfolder&lt;br /&gt;
 screen -S $1 -X log on 					# Turn on logging for the server window&lt;br /&gt;
 while true; do 						# start a loop to allow server restart if it crashes&lt;br /&gt;
 &lt;br /&gt;
 # runs the actual server. By default, the binary is called armagetronad-dedicated&lt;br /&gt;
 	armagetronad-dedicated --configdir /opt/armagetronad/servers/$1/settings --vardir /opt/armagetronad/servers/$1/var 	&lt;br /&gt;
 &lt;br /&gt;
 # Shows the errors and indicates that the server has crashed, and then, waits 5 seconds before restarting the server, allowing you to quit with CTRL-C&lt;br /&gt;
 	echo &amp;quot;Server has crashed. It will restart immediately..., press CTRL-C to cancel&amp;quot;&lt;br /&gt;
 	sleep 5&lt;br /&gt;
 &lt;br /&gt;
 done # end the loop&lt;br /&gt;
To save the file, press CTRL-X and Y to confirm. You have now a file called srv in /opt/armagetronad/scripts.&lt;br /&gt;
&lt;br /&gt;
=== the global script ===&lt;br /&gt;
&lt;br /&gt;
Create the second script. I called it start: &amp;lt;code&amp;gt; nano /opt/armagetronad/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 # If you run the script with a parameter (server name), only that server will be start. Otherwise, all servers in the /opt/armagetronad/servers directory will be started&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$1&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
 	screen -S $1 -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 	screen -dmS $1 /opt/armagetronad/scripts/srv $1			# start a GNU screen window with the specified server inside&lt;br /&gt;
 else&lt;br /&gt;
 	for f in $(ls /opt/armagetronad/servers/.)				# start a loop running the following command for any existing folders in the /opt/armagetronad/servers folder&lt;br /&gt;
 		do&lt;br /&gt;
 			screen -S $f -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 			screen -dmS $f /opt/armagetronad/scripts/srv $f	# start a GNU screen window with the server inside for each server folder&lt;br /&gt;
 		done							# ends the loop&lt;br /&gt;
 fi&lt;br /&gt;
Save it and exit the same way as before.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to set both files with execute permissions:&lt;br /&gt;
&amp;lt;code&amp;gt;chmod +x srv start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Starting all servers ===&lt;br /&gt;
&lt;br /&gt;
To make your servers start at boot, edit the /etc/rc.local file and add the &amp;quot;start&amp;quot; script at the end of &amp;lt;code&amp;gt;/opt/armagetronad/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to manually start all servers, just run the &amp;lt;code&amp;gt;./start&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
=== Starting a single specific server ===&lt;br /&gt;
&lt;br /&gt;
If you want to start (or restart) a single server, just run&lt;br /&gt;
 ./start servername&lt;br /&gt;
&lt;br /&gt;
== Server management ==&lt;br /&gt;
&lt;br /&gt;
=== GNU screen ===&lt;br /&gt;
&lt;br /&gt;
GNU screen is a great tool. As explained above, it allow a multi-windowed environement on the simple terminal. And even better, the windows stay alive, evening when you disconnect from the server. You can find everything about GNU screen by typing &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt; on a terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Listing the running servers ===&lt;br /&gt;
&lt;br /&gt;
To see the existing windows, meaning here, the running servers, type &amp;lt;code&amp;gt;screen -ls&amp;lt;/code&amp;gt;. It will gives you a list of running windows.&lt;br /&gt;
&lt;br /&gt;
=== Accessing and leaving a server console ===&lt;br /&gt;
&lt;br /&gt;
To attach to a window, type &amp;lt;code&amp;gt;screen -r servername&amp;lt;/code&amp;gt;. You will be in the server console. You can then do all the command you would usually do there. Remote moderation, server adjustment, and so on.&lt;br /&gt;
&lt;br /&gt;
To detach, but keep the server running, press CTRL-a d (control key + low case A, then low case D to detach). You can find all GNU screen key combinations by reading &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Killing a server ===&lt;br /&gt;
&lt;br /&gt;
To kill a server, attach to its window, and press CTRL-C. This will kill the script, and the window. Then press ESC to exit the dead window. An alternate way is to run &lt;br /&gt;
 screen -S servername -X quit&lt;br /&gt;
This will kill and end the window and the server inside.&lt;br /&gt;
&lt;br /&gt;
=== Log files ===&lt;br /&gt;
&lt;br /&gt;
Everytime the &amp;lt;code&amp;gt;srv&amp;lt;/code&amp;gt; script is run, a new logfile will be created in the /opt/armagetronad/logs folder. Keep an eye on log sizes. You don&#039;t want to run out of disk space because of Armagetron Advanced, do you ?&lt;br /&gt;
&lt;br /&gt;
=== Test the server autorestart ===&lt;br /&gt;
&lt;br /&gt;
If you want to try if the server restarts when it crash, do not press CTRL-C into the window. CTRL-C kill the script, therefore it will not be able to restart. Instead, run the &amp;lt;code&amp;gt;quit&amp;lt;/code&amp;gt; command inside the server console. It will close the server, and you will be able to see the message, and the server restarting.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This article has been written by Superkikim. These scripts and setup details are used to run the &amp;quot;FAST TRACK&amp;quot; servers.&lt;br /&gt;
&lt;br /&gt;
== VPS packs to install ==&lt;br /&gt;
&lt;br /&gt;
On Centos based systems (Fedora Core, Redhat):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;yum groupinstall &amp;quot;Development Tools&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
yum install libxml2-devel&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install BZR&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;su -c &#039;rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm&#039;&amp;lt;br \&amp;gt;&lt;br /&gt;
su -c &#039;yum install bzr&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Compiling Zthreads&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
CXXFLAGS=-fpermissive ./configure --prefix=/usr&amp;lt;br&amp;gt;&lt;br /&gt;
make&amp;lt;br&amp;gt;&lt;br /&gt;
make install&amp;lt;br&amp;gt;&lt;br /&gt;
ldconfig&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Server/config]]&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Console&amp;diff=23996</id>
		<title>Console</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Console&amp;diff=23996"/>
		<updated>2009-08-09T21:53:23Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: /* External Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Console==&lt;br /&gt;
&lt;br /&gt;
Many players ask, &amp;quot;How did you change your name within the game?&amp;quot; or &amp;quot;What is the wall length in this server?&amp;quot;&lt;br /&gt;
There is a very easy way of changing your name or cycle color and finding out the settings within the game.&lt;br /&gt;
The [[Console]].   &lt;br /&gt;
&lt;br /&gt;
=== The Console Button ===&lt;br /&gt;
The first step in using the console, is figuring out which button it is bound to it.  To bind a new button to the console go to:&lt;br /&gt;
&lt;br /&gt;
1. [[image:console1.jpg|center|thumbnail|system setup]]&lt;br /&gt;
&lt;br /&gt;
2. [[image:console2.jpg|center|thumbnail|Misc Stuff]]&lt;br /&gt;
&lt;br /&gt;
3. [[image:console3.jpg|center|thumbnail|Global Keyboard Configuration]]&lt;br /&gt;
&lt;br /&gt;
4. [[image:console4.jpg|center|thumbnail|Console Input]]&lt;br /&gt;
&lt;br /&gt;
5. Set a button for console input. You are now qualified to tell people that you have ub3rl33t +ron h4x.&lt;br /&gt;
&lt;br /&gt;
=== Using T3h Console  ===&lt;br /&gt;
The console can be used inside or outside of the grid.  So. Press the button.  You now see &amp;quot;Con:&amp;quot; where it normally shows &amp;quot;Says:&amp;quot;.&lt;br /&gt;
You may now type in commands to alter your settings or view server settings.&lt;br /&gt;
&lt;br /&gt;
== Commands of T3h Console ==&lt;br /&gt;
&lt;br /&gt;
If you do not know a command you may input a search word into the console. You will be given a list of commands containing the given word. You may also find a complete list of [[Console Commands]] here.&lt;br /&gt;
&lt;br /&gt;
=== Various Personal Settings === &lt;br /&gt;
&lt;br /&gt;
  Player_1 xXx   &lt;br /&gt;
This would change your name to xXx.  &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
  color_r_1 n  &lt;br /&gt;
  color_g_1 n   &lt;br /&gt;
  color_b_1 n&lt;br /&gt;
&lt;br /&gt;
Replace n with a number. Any number.  Put red at 16 and blue and 4 and green at 0 for example.  It&#039;s best to figure out the combinations yourself.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
  ping_charity n&lt;br /&gt;
This setting determines how much of your opponent&#039;s you are willing to take over.  If you have a slow connection, set it to 0, if you have a fast connection set it to however generous you feel.  But keep in mind, the server has a habit of deciding your ping charity for you!  So setting this is more like asking the server nicely for something, but usually has no effect.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
  &lt;br /&gt;
  camera_custom_back -- The position of the camera behind the cycle.&lt;br /&gt;
  camera_custom_pitch -- The angle the camera is at.&lt;br /&gt;
  camera_custom_rise -- The height of the camera.&lt;br /&gt;
&lt;br /&gt;
The [[Custom Camera]] page can help you decide your settings for the custom camera.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
  &lt;br /&gt;
  Raoul_Duke_Ping 0 &lt;br /&gt;
This never works, unfortunately.&lt;br /&gt;
&lt;br /&gt;
=== Server Settings Commands ===&lt;br /&gt;
  cycle_walls_length&lt;br /&gt;
  cycle_speed&lt;br /&gt;
  cycle_accel&lt;br /&gt;
  cycle_brake&lt;br /&gt;
  cycle_brake_deplete and cycle_brake_refill&lt;br /&gt;
  cycle_delay&lt;br /&gt;
  cycle_explosion_radius&lt;br /&gt;
  cycle_rubber &lt;br /&gt;
  win_zone_deaths (if set at 1, watch out, it&#039;s a kill zone)&lt;br /&gt;
&lt;br /&gt;
Type these commands in the console when:&lt;br /&gt;
* You wish to find out the settings of the internet server you are playing in (do not type values after the words).&lt;br /&gt;
* You wish to alter your own single player game settings (type values after the words, ex: cycle_speed 30).&lt;br /&gt;
&lt;br /&gt;
There are many other console commands.  I do not know all of them.  Try typing keywords such as &#039;&#039;&#039;cycle&#039;&#039;&#039;, &#039;&#039;&#039;speed&#039;&#039;&#039;, &#039;&#039;&#039;ping&#039;&#039;&#039;, &#039;&#039;&#039;walls&#039;&#039;&#039;, &#039;&#039;&#039;rubber&#039;&#039;&#039;, or any other setting you can think off.&lt;br /&gt;
&lt;br /&gt;
==0xffoo==&lt;br /&gt;
Players can change the color of their text by using oxffoo code.  &lt;br /&gt;
&lt;br /&gt;
*Example: Type in, &amp;quot;0xff0000 Hi I am new at using oxffoo&amp;quot; without the quotations marks of course, and use zeroes, not the letter &amp;quot;o&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0xff0000 codes are RGB triplets, just like you would write in html or something.  Basically, split it up like this:&lt;br /&gt;
&lt;br /&gt;
  0x ff 00 00&lt;br /&gt;
&lt;br /&gt;
The 0x can be ignored.  It&#039;s required to tell the game you want to use color here, but otherwise you can throw it away and not think about it.  The first number is the amount of Red to put in the color.  The second is Green, and the third is Blue.  Hence the phrase &amp;quot;RGB triplet&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The tricky part is that these numbers aren&#039;t in base 10 like your normal counting numbers.  They&#039;re in base 16.  So ff=255.  Just think of it as a two digit number where you can choose from numbers 0-f.  The counting progression is { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f }.  As you can see, &amp;quot;a&amp;quot; is number 10.  You don&#039;t really need to know much more than that 0xff0000 has more Red than 0xaa0000, and stuff like that.&lt;br /&gt;
&lt;br /&gt;
See [[Bases]] if you do want learn more about hex.&lt;br /&gt;
&lt;br /&gt;
Developer&#039;s note: these color codes were not intended for use by the players; the choice of 0x as intro string was a bit unfortunate. Some servers will filter away your codes, so do your testing in a local game. Since it was not intended for use, no thought was given on usability, and for example upper case codes are not accepted. So use 0xff0000 for red, not 0xFF0000. And don&#039;t be angry about future unannounced changes to the format.&lt;br /&gt;
&lt;br /&gt;
== External Resources ==&lt;br /&gt;
For bike and trail colors codes visit [http://armagetron.co.uk/colours/colourpicker.php armagetron.co.uk color picker]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Client Features]]&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=23050</id>
		<title>Running Multiple Servers on a single Linux computer</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=23050"/>
		<updated>2009-03-13T00:55:19Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
If you like to experiment new settings, it might be that you come with a set of interesting servers. A shame if you cannot run them all at the same time. Here is how you can achieve this on a Linux server. Please refer to the lag and bandwidth chapters in the wiki before to run multiple servers. If you run too many, you might end with a very bad game play.&lt;br /&gt;
&lt;br /&gt;
This chapter will present you an easy way to run multiple servers on a single Linux computer, using GNU screen.&lt;br /&gt;
&lt;br /&gt;
== Server installation ==&lt;br /&gt;
&lt;br /&gt;
First of all, you have to install the Armagetron Advanced Dedicated Server from source, not using the provided install script. This will allow to manage at will the settings and var directories. To do so, download the latest source package, and untar it in a temporary folder. &lt;br /&gt;
&lt;br /&gt;
By default, Armagetron Advanced Dedicated Server is compiled in the /opt/armagetronad folder. In the &amp;quot;configure&amp;quot; command, the prefix will allow to change that path to whatever you prefer. I have chosen to install it in /etc/arma. Make your own choice:&lt;br /&gt;
&lt;br /&gt;
 ./configure --prefix=/etc/arma --disable-glout --enable-automakedefaults --disable-sysinstall --disable-etc --disable-useradd --disable-initscripts&lt;br /&gt;
&lt;br /&gt;
Then, compile and install:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Now, armagetron advanced dedicated is installed in the /etc/arma/ folder.&lt;br /&gt;
&lt;br /&gt;
== Preparing the servers ==&lt;br /&gt;
&lt;br /&gt;
=== The tree ===&lt;br /&gt;
&lt;br /&gt;
Change to /etc/arma directory:&lt;br /&gt;
 cd /etc/arma&lt;br /&gt;
&lt;br /&gt;
Create the following subdirectories:&lt;br /&gt;
&lt;br /&gt;
 mkdir servers      &#039;This folder will be used to store server configurations&lt;br /&gt;
 mkdir logs         &#039;This one will be used to save the server logs&lt;br /&gt;
 mkdir scripts      &#039;And this one will be used to same the scripts we will see below&lt;br /&gt;
&lt;br /&gt;
We have now to create our servers. To do so, go to the servers directory you have created earlier, and for each server, create a subfolder with a one-word name for the server, and two subfolders: var and settings. For exemple:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/arma/servers&lt;br /&gt;
&lt;br /&gt;
To create a server called server1:&lt;br /&gt;
&lt;br /&gt;
 mkdir server1&lt;br /&gt;
 mkdir server1/settings&lt;br /&gt;
 mkdir server1/var&lt;br /&gt;
then copy your config files in the settings subfolder.&lt;br /&gt;
&lt;br /&gt;
You can then create a second server, and more...&lt;br /&gt;
&lt;br /&gt;
 mkdir server2&lt;br /&gt;
 mkdir server2/settings&lt;br /&gt;
 mkdir server2/var&lt;br /&gt;
and so on...&lt;br /&gt;
&lt;br /&gt;
=== The setting files ===&lt;br /&gt;
&lt;br /&gt;
For each server, do not forget to create a &amp;quot;server_info.cfg&amp;quot; file (search the wiki about it), and to change the port number. Port can be from 4534 to 4540, meaning you can safely run up to 7 servers on the same computer, depending obviously on the settings of each servers, and the bandwidth they need.&lt;br /&gt;
&lt;br /&gt;
We assume that you know enough about Server Administration to understand the above explainations. This article is about Advanced Server Administration, isn&#039;t it ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The scripts ==&lt;br /&gt;
&lt;br /&gt;
Now you have to create the scripts to launch and log all your servers. To allow managing each server separately, we will use GNU Screen. GNU screen is a terminal window manager. If it is not install on your server, you can get it with the usual installation tool (yum install screen, apt get screen, etc...). Again... advanced.... We assume you know how to install applications on linux and therefore, we assume GNU screen has been installed&lt;br /&gt;
&lt;br /&gt;
You have to create two scripts. The first one will run a server and start logging the window in which the server has started. The second one will execute the first one for each folder in the /etc/arma/servers folder. It will create a window for each of them. Therefore, if you don&#039;t want a server to run, you will have to temporarily move the server folder out from the /etc/arma/servers directory.&lt;br /&gt;
&lt;br /&gt;
Save the scripts in the /etc/arma/scripts directory. I use nano which is an easy text editor. &lt;br /&gt;
&lt;br /&gt;
=== The server script ===&lt;br /&gt;
&lt;br /&gt;
The first script will be called in this example: srv&lt;br /&gt;
&lt;br /&gt;
 nano /etc/arma/scripts/srv &lt;br /&gt;
That creates a text file called srv in the scripts directory. Write the following lines in the file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 screen -S $1 -X logtstamp on 					# print timestamps in log file&lt;br /&gt;
 screen -S $1 -X logfile /etc/arma/logs/$1_%d%m%Y-%c.log 	# create a logfile in the logs subfolder&lt;br /&gt;
 screen -S $1 -X log on 					# Turn on logging for the server window&lt;br /&gt;
 while true; do 						# start a loop to allow server restart if it crashes&lt;br /&gt;
 &lt;br /&gt;
 # runs the actual server. By default, the binary is called armagetronad-dedicated and is located in the prefix/bin directory. In this example, it is in /etc/arma/bin directory.&lt;br /&gt;
 	/etc/arma/bin/armagetronad-dedicated --configdir /etc/arma/servers/$1/settings --vardir /etc/arma/servers/$1/var 	&lt;br /&gt;
 &lt;br /&gt;
 # Shows the errors and indicates that the server has crashed, and then, waits 5 seconds before restarting the server, allowing you to quit with CTRL-C&lt;br /&gt;
 	echo &amp;quot;Server has crashed. It will restart immediately..., press CTRL-C to cancel&amp;quot;&lt;br /&gt;
 	sleep 5&lt;br /&gt;
 &lt;br /&gt;
 done # end the loop&lt;br /&gt;
To save the file, press CTRL-X and Y to confirm. You have now a file called srv in /etc/arma/scripts.&lt;br /&gt;
&lt;br /&gt;
=== the global script ===&lt;br /&gt;
&lt;br /&gt;
Create the second script. I called it start: &amp;lt;code&amp;gt; nano /etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 # If you run the script with a parameter (server name), only that server will be start. Otherwise, all servers in the /etc/arma/servers directory will be started&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$1&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
 	screen -S $1 -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 	screen -dmS $1 /etc/arma/scripts/srv $1			# start a GNU screen window with the specified server inside&lt;br /&gt;
 else&lt;br /&gt;
 	for f in $(ls /etc/arma/servers/.)				# start a loop running the following command for any existing folders in the /etc/arma/servers folder&lt;br /&gt;
 		do&lt;br /&gt;
 			screen -S $f -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 			screen -dmS $f /etc/arma/scripts/srv $f	# start a GNU screen window with the server inside for each server folder&lt;br /&gt;
 		done							# ends the loop&lt;br /&gt;
 fi&lt;br /&gt;
Save it and exit the same way as before.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to set both files with execute permissions:&lt;br /&gt;
&amp;lt;code&amp;gt;chmod +x srv start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Starting all servers ===&lt;br /&gt;
&lt;br /&gt;
To make your servers start at boot, edit the /etc/rc.local file and add the &amp;quot;start&amp;quot; script at the end of &amp;lt;code&amp;gt;/etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to manually start all servers, just run the &amp;lt;code&amp;gt;./start&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
=== Starting a single specific server ===&lt;br /&gt;
&lt;br /&gt;
If you want to start (or restart) a single server, just run&lt;br /&gt;
 ./start servername&lt;br /&gt;
&lt;br /&gt;
== Server management ==&lt;br /&gt;
&lt;br /&gt;
=== GNU screen ===&lt;br /&gt;
&lt;br /&gt;
GNU screen is a great tool. As explained above, it allow a multi-windowed environement on the simple terminal. And even better, the windows stay alive, evening when you disconnect from the server. You can find everything about GNU screen by typing &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt; on a terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Listing the running servers ===&lt;br /&gt;
&lt;br /&gt;
To see the existing windows, meaning here, the running servers, type &amp;lt;code&amp;gt;screen -ls&amp;lt;/code&amp;gt;. It will gives you a list of running windows.&lt;br /&gt;
&lt;br /&gt;
=== Accessing and leaving a server console ===&lt;br /&gt;
&lt;br /&gt;
To attach to a window, type &amp;lt;code&amp;gt;screen -r servername&amp;lt;/code&amp;gt;. You will be in the server console. You can then do all the command you would usually do there. Remote moderation, server adjustment, and so on.&lt;br /&gt;
&lt;br /&gt;
To detach, but keep the server running, press CTRL-a d (control key + low case A, then low case D to detach). You can find all GNU screen key combinations by reading &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Killing a server ===&lt;br /&gt;
&lt;br /&gt;
To kill a server, attach to its window, and press CTRL-C. This will kill the script, and the window. Then press ESC to exit the dead window. An alternate way is to run &lt;br /&gt;
 screen -S servername -X quit&lt;br /&gt;
This will kill and end the window and the server inside.&lt;br /&gt;
&lt;br /&gt;
=== Log files ===&lt;br /&gt;
&lt;br /&gt;
Everytime the &amp;lt;code&amp;gt;srv&amp;lt;/code&amp;gt; script is run, a new logfile will be created in the /etc/arma/logs folder. Keep an eye on log sizes. You don&#039;t want to run out of disk space because of Armagetron Advanced, do you ?&lt;br /&gt;
&lt;br /&gt;
=== Test the server autorestart ===&lt;br /&gt;
&lt;br /&gt;
If you want to try if the server restarts when it crash, do not press CTRL-C into the window. CTRL-C kill the script, therefore it will not be able to restart. Instead, run the &amp;lt;code&amp;gt;quit&amp;lt;/code&amp;gt; command inside the server console. It will close the server, and you will be able to see the message, and the server restarting.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This article has been written by Superkikim. These scripts and setup details are used to run the &amp;quot;FAST TRACK&amp;quot; servers.&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=23049</id>
		<title>Running Multiple Servers on a single Linux computer</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=23049"/>
		<updated>2009-03-13T00:35:35Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
If you like to experiment new settings, it might be that you come with a set of interesting servers. A shame if you cannot run them all at the same time. Here is how you can achieve this on a Linux server. Please refer to the lag and bandwidth chapters in the wiki before to run multiple servers. If you run too many, you might end with a very bad game play.&lt;br /&gt;
&lt;br /&gt;
This chapter will present you an easy way to run multiple servers on a single Linux computer, using GNU screen.&lt;br /&gt;
&lt;br /&gt;
== Server installation ==&lt;br /&gt;
&lt;br /&gt;
First of all, you have to install the Armagetron Advanced Dedicated Server from source, not using the provided install script. This will allow to manage at will the settings and var directories. To do so, download the latest source package, and untar it in a temporary folder. CD to that folder and run the following commands:&lt;br /&gt;
&lt;br /&gt;
By default, Armagetron Advanced Dedicated Server is compiled in the /opt/armagetronad folder. In the &amp;quot;configure&amp;quot; command, the prefix will allow to change that path to whatever you prefer. I have chosen to install it in /etc/arma. Make your own choice:&lt;br /&gt;
&lt;br /&gt;
 ./configure --prefix=/etc/arma --disable-glout --enable-automakedefaults --disable-sysinstall --disable-etc --disable-useradd --disable-initscripts&lt;br /&gt;
&lt;br /&gt;
Then, compile and install:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Now, armagetron advanced dedicated is installed in the /etc/arma/ folder.&lt;br /&gt;
&lt;br /&gt;
== Preparing the servers ==&lt;br /&gt;
&lt;br /&gt;
=== The tree ===&lt;br /&gt;
&lt;br /&gt;
Change to /etc/arma directory:&lt;br /&gt;
 cd /etc/arma&lt;br /&gt;
&lt;br /&gt;
Create the following subdirectories:&lt;br /&gt;
&lt;br /&gt;
 mkdir servers      &#039;This folder will be used to store server configurations&lt;br /&gt;
 mkdir logs         &#039;This one will be used to save the server logs&lt;br /&gt;
 mkdir scripts      &#039;And this one will be used to same the scripts we will see below&lt;br /&gt;
&lt;br /&gt;
We have now to create our servers. To do so, go to the servers directory you have created earlier, and for each server, create a subfolder with a one-word name for the server, and two subfolders: var and settings. For exemple:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/arma/servers&lt;br /&gt;
&lt;br /&gt;
To create a server called server1:&lt;br /&gt;
&lt;br /&gt;
 mkdir server1&lt;br /&gt;
 mkdir server1/settings&lt;br /&gt;
 mkdir server1/var&lt;br /&gt;
then copy your config files in the settings subfolder.&lt;br /&gt;
&lt;br /&gt;
You can then create a second server, and more...&lt;br /&gt;
&lt;br /&gt;
 mkdir server2&lt;br /&gt;
 mkdir server2/settings&lt;br /&gt;
 mkdir server2/var&lt;br /&gt;
and so on...&lt;br /&gt;
&lt;br /&gt;
=== The setting files ===&lt;br /&gt;
&lt;br /&gt;
For each server, do not forget to create a &amp;quot;server_info.cfg&amp;quot; file (search the wiki about it), and to change the port number. Port can be from 4534 to 4540, meaning you can safely run up to 7 servers on the same computer, depending obviously on the settings of each servers, and the bandwidth they need.&lt;br /&gt;
&lt;br /&gt;
We assume that you know enough about Server Administration to understand the above explainations. This article is about Advanced Server Administration, isn&#039;t it ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The scripts ==&lt;br /&gt;
&lt;br /&gt;
Now you have to create the scripts to launch and log all your servers. To allow managing each server separately, we will use GNU Screen. GNU screen is a terminal window manager. If it is not install on your server, you can get it with the usual installation tool (yum install screen, apt get screen, etc...). Again... advanced.... We assume you know how to install applications on linux and therefore, we assume GNU screen has been installed&lt;br /&gt;
&lt;br /&gt;
You have to create two scripts. The first one will run a server and start logging the window in which the server has started. The second one will execute the first one for each folder in the /etc/arma/servers folder. It will create a window for each of them. Therefore, if you don&#039;t want a server to run, you will have to temporarily move the server folder out from the /etc/arma/servers directory.&lt;br /&gt;
&lt;br /&gt;
Save the scripts in the /etc/arma/scripts directory. I use nano which is an easy text editor. &lt;br /&gt;
&lt;br /&gt;
=== The server script ===&lt;br /&gt;
&lt;br /&gt;
The first script will be called in this example: srv&lt;br /&gt;
&lt;br /&gt;
 nano /etc/arma/scripts/srv &lt;br /&gt;
That creates a text file called srv in the scripts directory. Write the following lines in the file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 screen -S $1 -X logtstamp on 					# print timestamps in log file&lt;br /&gt;
 screen -S $1 -X logfile /etc/arma/logs/$1_%d%m%Y-%c.log 	# create a logfile in the logs subfolder&lt;br /&gt;
 screen -S $1 -X log on 					# Turn on logging for the server window&lt;br /&gt;
 while true; do 						# start a loop to allow server restart if it crashes&lt;br /&gt;
 &lt;br /&gt;
 # runs the actual server. By default, the binary is called armagetronad-dedicated and is located in the prefix/bin directory. In this example, it is in /etc/arma/bin directory.&lt;br /&gt;
 	/etc/arma/bin/armagetronad-dedicated --configdir /etc/arma/servers/$1/settings --vardir /etc/arma/servers/$1/var 	&lt;br /&gt;
 &lt;br /&gt;
 # Shows the errors and indicates that the server has crashed, and then, waits 5 seconds before restarting the server, allowing you to quit with CTRL-C&lt;br /&gt;
 	echo &amp;quot;Server has crashed. It will restart immediately..., press CTRL-C to cancel&amp;quot;&lt;br /&gt;
 	sleep 5&lt;br /&gt;
 &lt;br /&gt;
 done # end the loop&lt;br /&gt;
To save the file, press CTRL-X and Y to confirm. You have now a file called srv in /etc/arma/scripts.&lt;br /&gt;
&lt;br /&gt;
=== the global script ===&lt;br /&gt;
&lt;br /&gt;
Create the second script. I called it start: &amp;lt;code&amp;gt; nano /etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 # If you run the script with a parameter (server name), only that server will be start. Otherwise, all servers in the /etc/arma/servers directory will be started&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$1&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
 	screen -S $1 -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 	screen -dmS $1 /etc/arma/scripts/srv $1			# start a GNU screen window with the specified server inside&lt;br /&gt;
 else&lt;br /&gt;
 	for f in $(ls /etc/arma/servers/.)				# start a loop running the following command for any existing folders in the /etc/arma/servers folder&lt;br /&gt;
 		do&lt;br /&gt;
 			screen -S $f -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 			screen -dmS $f /etc/arma/scripts/srv $f	# start a GNU screen window with the server inside for each server folder&lt;br /&gt;
 		done							# ends the loop&lt;br /&gt;
 fi&lt;br /&gt;
Save it and exit the same way as before.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to set both files with execute permissions:&lt;br /&gt;
&amp;lt;code&amp;gt;chmod +x srv start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Starting all servers ===&lt;br /&gt;
&lt;br /&gt;
To make your servers start at boot, edit the /etc/rc.local file and add the &amp;quot;start&amp;quot; script at the end of &amp;lt;code&amp;gt;/etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to manually start all servers, just run the &amp;lt;code&amp;gt;./start&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
=== Starting a single specific server ===&lt;br /&gt;
&lt;br /&gt;
If you want to start (or restart) a single server, just run&lt;br /&gt;
 ./start servername&lt;br /&gt;
&lt;br /&gt;
== Server management ==&lt;br /&gt;
&lt;br /&gt;
=== GNU screen ===&lt;br /&gt;
&lt;br /&gt;
GNU screen is a great tool. As explained above, it allow a multi-windowed environement on the simple terminal. And even better, the windows stay alive, evening when you disconnect from the server. You can find everything about GNU screen by typing &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt; on a terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Listing the running servers ===&lt;br /&gt;
&lt;br /&gt;
To see the existing windows, meaning here, the running servers, type &amp;lt;code&amp;gt;screen -ls&amp;lt;/code&amp;gt;. It will gives you a list of running windows.&lt;br /&gt;
&lt;br /&gt;
=== Accessing and leaving a server console ===&lt;br /&gt;
&lt;br /&gt;
To attach to a window, type &amp;lt;code&amp;gt;screen -r servername&amp;lt;/code&amp;gt;. You will be in the server console. You can then do all the command you would usually do there. Remote moderation, server adjustment, and so on.&lt;br /&gt;
&lt;br /&gt;
To detach, but keep the server running, press CTRL-a d (control key + low case A, then low case D to detach). You can find all GNU screen key combinations by reading &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Killing a server ===&lt;br /&gt;
&lt;br /&gt;
To kill a server, attach to its window, and press CTRL-C. This will kill the script, and the window. Then press ESC to exit the dead window. An alternate way is to run &lt;br /&gt;
 screen -S servername -X quit&lt;br /&gt;
This will kill and end the window and the server inside.&lt;br /&gt;
&lt;br /&gt;
=== Log files ===&lt;br /&gt;
&lt;br /&gt;
Everytime the &amp;lt;code&amp;gt;srv&amp;lt;/code&amp;gt; script is run, a new logfile will be created in the /etc/arma/logs folder. Keep an eye on log sizes. You don&#039;t want to run out of disk space because of Armagetron Advanced, do you ?&lt;br /&gt;
&lt;br /&gt;
=== Test the server autorestart ===&lt;br /&gt;
&lt;br /&gt;
If you want to try if the server restarts when it crash, do not press CTRL-C into the window. CTRL-C kill the script, therefore it will not be able to restart. Instead, run the &amp;lt;code&amp;gt;quit&amp;lt;/code&amp;gt; command inside the server console. It will close the server, and you will be able to see the message, and the server restarting.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This article has been written by Superkikim. These scripts and setup details are used to run the &amp;quot;FAST TRACK&amp;quot; servers.&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=User_talk:Epsy&amp;diff=23047</id>
		<title>User talk:Epsy</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=User_talk:Epsy&amp;diff=23047"/>
		<updated>2009-03-12T09:57:27Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my talk page, I am mailed whenever you edit this, so it is a correct way of contacting me.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hi Epsy...&lt;br /&gt;
&lt;br /&gt;
If I choosed to install in /etc/arma it was for a good reason in fact. The server I&#039;m using is a rent server for other purposes. Additionnally, I plan to compile a CTF, therefore I will have to install it in another directory anyway.&lt;br /&gt;
&lt;br /&gt;
This is Linux. It is not like Windows, where you have to have files in system32 or it will not work. Therefore, it is only of your choice where you place the files for a program.&lt;br /&gt;
&lt;br /&gt;
You corrected the path, but you didn&#039;t changed the comments... I wrote &amp;quot;I have chosen /etc/arma. Make your own choice&amp;quot;. If you have chosen &amp;quot;/opt/armagetronad&amp;quot; then that&#039;s fine for you. But if you thing &amp;quot;/opt/armagetronad&amp;quot; is THE path that HAS to be chose for technical reason, you should have explained why, and removed my comment &amp;quot;I have chose... make your own choice.&lt;br /&gt;
&lt;br /&gt;
Hope you like Fast Track Servers ;-)&lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
&lt;br /&gt;
Superkikim&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=21559</id>
		<title>Running Multiple Servers on a single Linux computer</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=21559"/>
		<updated>2008-08-17T23:38:49Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: /* The tree */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
If you like to experiment new settings, it might be that you come with a set of interesting servers. A shame if you cannot run them all at the same time. Here is how you can achieve this on a Linux server. Please refer to the lag and bandwidth chapters in the wiki before to run multiple servers. If you run too many, you might end with a very bad gameplay.&lt;br /&gt;
&lt;br /&gt;
This chapter will present you an easy way to run multiple servers on a single Linux computer, using GNU screen.&lt;br /&gt;
&lt;br /&gt;
== Server installation ==&lt;br /&gt;
&lt;br /&gt;
First of all, you have to install the Armagetron Advanced Dedicated Server from source, not using the provided install script. This will allow to manage at will the settings and var directories. To do so, download the latest source package, and untar it in a temporary folder. CD to that folder and run the following commands:&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;configure&amp;quot; command, the prefix will be the application directory. I have choose to install it in /etc/arma. Make your own choice:&lt;br /&gt;
&lt;br /&gt;
 ./configure --prefix=/etc/arma --disable-glout --enable-automakedefaults --disable-sysinstall --disable-etc --disable-useradd --disable-initscripts&lt;br /&gt;
&lt;br /&gt;
Then, compile and install:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Now, armagetron advanced dedicated is installed in the /etc/arma folder.&lt;br /&gt;
&lt;br /&gt;
== Preparing the servers ==&lt;br /&gt;
&lt;br /&gt;
=== The tree ===&lt;br /&gt;
&lt;br /&gt;
CD to /etc/arma &amp;lt;code&amp;gt;cd /etc/arma&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the following subdirectories:&lt;br /&gt;
&lt;br /&gt;
 mkdir servers      &#039;This folder will be used to store server configurations&lt;br /&gt;
 mkdir logs         &#039;This one will be used to save the server logs&lt;br /&gt;
 mkdir scripts      &#039;And this one will be used to same the scripts we will see below&lt;br /&gt;
&lt;br /&gt;
We have now to create our servers. To do so, go to the servers directory you have created earlier, and for each server, create a subfolder with a one-word name for the server, and two subfolders: var and settings. For exemple:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/arma/servers&lt;br /&gt;
&lt;br /&gt;
To create a server called server1:&lt;br /&gt;
&lt;br /&gt;
 mkdir server1&lt;br /&gt;
 mkdir server1/settings&lt;br /&gt;
 mkdir server1/var&lt;br /&gt;
then copy your config files in the settings subfolder.&lt;br /&gt;
&lt;br /&gt;
You can then create a second server, and more...&lt;br /&gt;
&lt;br /&gt;
 mkdir server2&lt;br /&gt;
 mkdir server2/settings&lt;br /&gt;
 mkdir server2/var&lt;br /&gt;
and so on...&lt;br /&gt;
&lt;br /&gt;
=== The setting files ===&lt;br /&gt;
&lt;br /&gt;
For each server, do not forget to create a &amp;quot;server_info.cfg&amp;quot; file (search the wiki about it), and to change the port number. Port can be from 4534 to 4540, meaning you can safely run up to 7 servers on the same computer, depending obviously on the settings of each servers, and the bandwidth they need.&lt;br /&gt;
&lt;br /&gt;
We assume that you know enough about Server Administration to understand the above explainations. This article is about Advanced Server Administration, isn&#039;t it ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The scripts ==&lt;br /&gt;
&lt;br /&gt;
Now you have to create the scripts to launch and log all your servers. To allow managing each server separately, we will use GNU Screen. GNU screen is a terminal window manager. If it is not install on your server, you can get it with the usual installation tool (yum install screen, apt get screen, etc...). Again... advanced.... We assume you know how to install applications on linux and therefore, we assume GNU screen has been installed&lt;br /&gt;
&lt;br /&gt;
You have to create two scripts. The first one will run a server and start logging the window in which the server has started. The second one will execute the first one for each folder in the /etc/arma/servers folder. It will create a window for each of them. Therefore, if you don&#039;t want a server to run, you will have to temporarily move the server folder out from the /etc/arma/servers directory.&lt;br /&gt;
&lt;br /&gt;
Save the scripts in the /etc/arma/scripts directory. I use nano which is an easy text editor. &lt;br /&gt;
&lt;br /&gt;
=== The server script ===&lt;br /&gt;
&lt;br /&gt;
The first script will be called in this example: srv&lt;br /&gt;
&lt;br /&gt;
 nano /etc/arma/scripts/srv &lt;br /&gt;
That creates a text file called srv in the scripts directory. Write the following lines in the file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 screen -S $1 -X logtstamp on 					# print timestamps in log file&lt;br /&gt;
 screen -S $1 -X logfile /etc/arma/logs/$1_%d%m%Y-%c.log 	# create a logfile in the logs subfolder&lt;br /&gt;
 screen -S $1 -X log on 					# Turn on logging for the server window&lt;br /&gt;
 while true; do 						# start a loop to allow server restart if it crashes&lt;br /&gt;
 &lt;br /&gt;
 # runs the actual server. By default, the binary is called armagetronad-dedicated and is located in the prefix/bin directory. In this example, it is in /etc/arma/bin directory.&lt;br /&gt;
 	/etc/arma/bin/armagetronad-dedicated --configdir /etc/arma/servers/$1/settings --vardir /etc/arma/servers/$1/var 	&lt;br /&gt;
 &lt;br /&gt;
 # Clear the display, and indicates that the server has crashed, and then, wait 5 seconds before to restart the server, allowing you to quit with CTRL-C&lt;br /&gt;
 	clear&lt;br /&gt;
 	echo &amp;quot;Server has crashed. It will restart immediately..., press CTRL-C to cancel&amp;quot;&lt;br /&gt;
 	sleep 5&lt;br /&gt;
 &lt;br /&gt;
 done # end the loop&lt;br /&gt;
To save the file, press CTRL-X and Y to confirm. You have now a file called srv in /etc/arma/scripts.&lt;br /&gt;
&lt;br /&gt;
=== the global script ===&lt;br /&gt;
&lt;br /&gt;
Create the second script. I called it start: &amp;lt;code&amp;gt; nano /etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 # If you run the script with a parameter (server name), only that server will be start. Otherwise, all servers in the /etc/arma/servers directory will be started&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$1&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
 	screen -S $1 -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 	screen -dmS $1 /etc/arma/scripts/srv $1			# start a GNU screen window with the specified server inside&lt;br /&gt;
 else&lt;br /&gt;
 	for f in $(ls /etc/arma/servers/.)				# start a loop running the following command for any existing folders in the /etc/arma/servers folder&lt;br /&gt;
 		do&lt;br /&gt;
 			screen -S $f -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 			screen -dmS $f /etc/arma/scripts/srv $f	# start a GNU screen window with the server inside for each server folder&lt;br /&gt;
 		done							# ends the loop&lt;br /&gt;
 fi&lt;br /&gt;
Save it and exit the same way as before.&lt;br /&gt;
&lt;br /&gt;
=== Starting all servers ===&lt;br /&gt;
&lt;br /&gt;
To make your servers start at boot, edit the /etc/rc.local file and add the &amp;quot;start&amp;quot; script at the end &amp;lt;code&amp;gt;/etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to manually start all servers, just run the &amp;lt;code&amp;gt;./start&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
=== Starting a single specific server ===&lt;br /&gt;
&lt;br /&gt;
If you want to start (or restart) a single server, just run &amp;lt;code&amp;gt;./start servername&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Server management ==&lt;br /&gt;
&lt;br /&gt;
=== GNU screen ===&lt;br /&gt;
&lt;br /&gt;
GNU screen is a great tool. As explained above, it allow a multi-windowed environement on the simple terminal. And even better, the windows stay alive, evening when you disconnect from the server. You can find everything about GNU screen by typing &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt; on a terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Listing the running servers ===&lt;br /&gt;
&lt;br /&gt;
To see the existing windows, meaning here, the running servers, type &amp;lt;code&amp;gt;screen -ls&amp;lt;/code&amp;gt;. It will gives you a list of running windows.&lt;br /&gt;
&lt;br /&gt;
=== Accessing and leaving a server console ===&lt;br /&gt;
&lt;br /&gt;
To attach to a window, type &amp;lt;code&amp;gt;screen -r servername&amp;lt;/code&amp;gt;. You will be in the server console. You can then do all the command you would usually do there. Remote moderation, server adjustment, and so on.&lt;br /&gt;
&lt;br /&gt;
To detach, but keep the server running, press CTRL-a d (control key + low case A, then low case D to detach). You can find all GNU screen key combinations by reading &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Killing a server ===&lt;br /&gt;
&lt;br /&gt;
To kill a server, attach to its window, and press CTRL-C. This will kill the script, and the window. Then press ESC to exit the dead window. An alternate way is to run &lt;br /&gt;
 screen -S servername -X quit&lt;br /&gt;
This will kill and end the window and the server inside.&lt;br /&gt;
&lt;br /&gt;
=== Log files ===&lt;br /&gt;
&lt;br /&gt;
Everytime the &amp;lt;code&amp;gt;srv&amp;lt;/code&amp;gt; script is run, a new logfile will be created in the /etc/arma/logs folder. Keep an eye on log sizes. You don&#039;t want to run out of disk space because of Armagetron Advanced, do you ?&lt;br /&gt;
&lt;br /&gt;
=== Test the server autorestart ===&lt;br /&gt;
&lt;br /&gt;
If you want to try if the server restarts when it crash, do not press CTRL-C into the window. CTRL-C kill the script, therefore it will not be able to restart. Instead, run the &amp;lt;code&amp;gt;quit&amp;lt;/code&amp;gt; command inside the server console. It will close the server, and you will be able to see the message, and the server restarting.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This article has been written by Superkikim. These scripts and setup details are used to run the &amp;quot;FAST TRACK&amp;quot; servers.&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=21513</id>
		<title>Running Multiple Servers on a single Linux computer</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=21513"/>
		<updated>2008-07-30T13:41:47Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
If you like to experiment new settings, it might be that you come with a set of interesting servers. A shame if you cannot run them all at the same time. Here is how you can achieve this on a Linux server. Please refer to the lag and bandwidth chapters in the wiki before to run multiple servers. If you run too many, you might end with a very bad gameplay.&lt;br /&gt;
&lt;br /&gt;
This chapter will present you an easy way to run multiple servers on a single Linux computer, using GNU screen.&lt;br /&gt;
&lt;br /&gt;
== Server installation ==&lt;br /&gt;
&lt;br /&gt;
First of all, you have to install the Armagetron Advanced Dedicated Server from source, not using the provided install script. This will allow to manage at will the settings and var directories. To do so, download the latest source package, and untar it in a temporary folder. CD to that folder and run the following commands:&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;configure&amp;quot; command, the prefix will be the application directory. I have choose to install it in /etc/arma. Make your own choice:&lt;br /&gt;
&lt;br /&gt;
 ./configure --prefix=/etc/arma --disable-glout --enable-automakedefaults --disable-sysinstall --disable-etc --disable-useradd --disable-initscripts&lt;br /&gt;
&lt;br /&gt;
Then, compile and install:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Now, armagetron advanced dedicated is installed in the /etc/arma folder.&lt;br /&gt;
&lt;br /&gt;
== Preparing the servers ==&lt;br /&gt;
&lt;br /&gt;
=== The tree ===&lt;br /&gt;
&lt;br /&gt;
CD to /etc/arma &amp;lt;code&amp;gt;cd /etc/arma&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the following subdirectories:&lt;br /&gt;
&lt;br /&gt;
 mkdir servers This folder will be used to store server configurations&lt;br /&gt;
 mkdir logsThis one will be used to save the server logs&lt;br /&gt;
 mkdir scriptsAnd this one will be used to same the scripts we will see below&lt;br /&gt;
&lt;br /&gt;
We have now to create our servers. To do so, go to the servers directory you have created earlier, and for each server, create a subfolder with a one-word name for the server, and two subfolders: var and settings. For exemple:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/arma/servers&lt;br /&gt;
&lt;br /&gt;
To create a server called server1:&lt;br /&gt;
&lt;br /&gt;
 mkdir server1&lt;br /&gt;
 mkdir server1/settings&lt;br /&gt;
 mkdir server1/var&lt;br /&gt;
then copy your config files in the settings subfolder.&lt;br /&gt;
&lt;br /&gt;
You can then create a second server, and more...&lt;br /&gt;
&lt;br /&gt;
 mkdir server2&lt;br /&gt;
 mkdir server2/settings&lt;br /&gt;
 mkdir server2/var&lt;br /&gt;
and so on...&lt;br /&gt;
&lt;br /&gt;
=== The setting files ===&lt;br /&gt;
&lt;br /&gt;
For each server, do not forget to create a &amp;quot;server_info.cfg&amp;quot; file (search the wiki about it), and to change the port number. Port can be from 4534 to 4540, meaning you can safely run up to 7 servers on the same computer, depending obviously on the settings of each servers, and the bandwidth they need.&lt;br /&gt;
&lt;br /&gt;
We assume that you know enough about Server Administration to understand the above explainations. This article is about Advanced Server Administration, isn&#039;t it ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The scripts ==&lt;br /&gt;
&lt;br /&gt;
Now you have to create the scripts to launch and log all your servers. To allow managing each server separately, we will use GNU Screen. GNU screen is a terminal window manager. If it is not install on your server, you can get it with the usual installation tool (yum install screen, apt get screen, etc...). Again... advanced.... We assume you know how to install applications on linux and therefore, we assume GNU screen has been installed&lt;br /&gt;
&lt;br /&gt;
You have to create two scripts. The first one will run a server and start logging the window in which the server has started. The second one will execute the first one for each folder in the /etc/arma/servers folder. It will create a window for each of them. Therefore, if you don&#039;t want a server to run, you will have to temporarily move the server folder out from the /etc/arma/servers directory.&lt;br /&gt;
&lt;br /&gt;
Save the scripts in the /etc/arma/scripts directory. I use nano which is an easy text editor. &lt;br /&gt;
&lt;br /&gt;
=== The server script ===&lt;br /&gt;
&lt;br /&gt;
The first script will be called in this example: srv&lt;br /&gt;
&lt;br /&gt;
 nano /etc/arma/scripts/srv &lt;br /&gt;
That creates a text file called srv in the scripts directory. Write the following lines in the file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 screen -S $1 -X logtstamp on 					# print timestamps in log file&lt;br /&gt;
 screen -S $1 -X logfile /etc/arma/logs/$1_%d%m%Y-%c.log 	# create a logfile in the logs subfolder&lt;br /&gt;
 screen -S $1 -X log on 					# Turn on logging for the server window&lt;br /&gt;
 while true; do 						# start a loop to allow server restart if it crashes&lt;br /&gt;
 &lt;br /&gt;
 # runs the actual server. By default, the binary is called armagetronad-dedicated and is located in the prefix/bin directory. In this example, it is in /etc/arma/bin directory.&lt;br /&gt;
 	/etc/arma/bin/armagetronad-dedicated --configdir /etc/arma/servers/$1/settings --vardir /etc/arma/servers/$1/var 	&lt;br /&gt;
 &lt;br /&gt;
 # Clear the display, and indicates that the server has crashed, and then, wait 5 seconds before to restart the server, allowing you to quit with CTRL-C&lt;br /&gt;
 	clear&lt;br /&gt;
 	echo &amp;quot;Server has crashed. It will restart immediately..., press CTRL-C to cancel&amp;quot;&lt;br /&gt;
 	sleep 5&lt;br /&gt;
 &lt;br /&gt;
 done # end the loop&lt;br /&gt;
To save the file, press CTRL-X and Y to confirm. You have now a file called srv in /etc/arma/scripts.&lt;br /&gt;
&lt;br /&gt;
=== the global script ===&lt;br /&gt;
&lt;br /&gt;
Create the second script. I called it start: &amp;lt;code&amp;gt; nano /etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 # If you run the script with a parameter (server name), only that server will be start. Otherwise, all servers in the /etc/arma/servers directory will be started&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$1&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
 	screen -S $1 -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 	screen -dmS $1 /etc/arma/scripts/srv $1			# start a GNU screen window with the specified server inside&lt;br /&gt;
 else&lt;br /&gt;
 	for f in $(ls /etc/arma/servers/.)				# start a loop running the following command for any existing folders in the /etc/arma/servers folder&lt;br /&gt;
 		do&lt;br /&gt;
 			screen -S $f -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 			screen -dmS $f /etc/arma/scripts/srv $f	# start a GNU screen window with the server inside for each server folder&lt;br /&gt;
 		done							# ends the loop&lt;br /&gt;
 fi&lt;br /&gt;
Save it and exit the same way as before.&lt;br /&gt;
&lt;br /&gt;
=== Starting all servers ===&lt;br /&gt;
&lt;br /&gt;
To make your servers start at boot, edit the /etc/rc.local file and add the &amp;quot;start&amp;quot; script at the end &amp;lt;code&amp;gt;/etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to manually start all servers, just run the &amp;lt;code&amp;gt;./start&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
=== Starting a single specific server ===&lt;br /&gt;
&lt;br /&gt;
If you want to start (or restart) a single server, just run &amp;lt;code&amp;gt;./start servername&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Server management ==&lt;br /&gt;
&lt;br /&gt;
=== GNU screen ===&lt;br /&gt;
&lt;br /&gt;
GNU screen is a great tool. As explained above, it allow a multi-windowed environement on the simple terminal. And even better, the windows stay alive, evening when you disconnect from the server. You can find everything about GNU screen by typing &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt; on a terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Listing the running servers ===&lt;br /&gt;
&lt;br /&gt;
To see the existing windows, meaning here, the running servers, type &amp;lt;code&amp;gt;screen -ls&amp;lt;/code&amp;gt;. It will gives you a list of running windows.&lt;br /&gt;
&lt;br /&gt;
=== Accessing and leaving a server console ===&lt;br /&gt;
&lt;br /&gt;
To attach to a window, type &amp;lt;code&amp;gt;screen -r servername&amp;lt;/code&amp;gt;. You will be in the server console. You can then do all the command you would usually do there. Remote moderation, server adjustment, and so on.&lt;br /&gt;
&lt;br /&gt;
To detach, but keep the server running, press CTRL-a d (control key + low case A, then low case D to detach). You can find all GNU screen key combinations by reading &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Killing a server ===&lt;br /&gt;
&lt;br /&gt;
To kill a server, attach to its window, and press CTRL-C. This will kill the script, and the window. Then press ESC to exit the dead window. An alternate way is to run &lt;br /&gt;
 screen -S servername -X quit&lt;br /&gt;
This will kill and end the window and the server inside.&lt;br /&gt;
&lt;br /&gt;
=== Log files ===&lt;br /&gt;
&lt;br /&gt;
Everytime the &amp;lt;code&amp;gt;srv&amp;lt;/code&amp;gt; script is run, a new logfile will be created in the /etc/arma/logs folder. Keep an eye on log sizes. You don&#039;t want to run out of disk space because of Armagetron Advanced, do you ?&lt;br /&gt;
&lt;br /&gt;
=== Test the server autorestart ===&lt;br /&gt;
&lt;br /&gt;
If you want to try if the server restarts when it crash, do not press CTRL-C into the window. CTRL-C kill the script, therefore it will not be able to restart. Instead, run the &amp;lt;code&amp;gt;quit&amp;lt;/code&amp;gt; command inside the server console. It will close the server, and you will be able to see the message, and the server restarting.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This article has been written by Superkikim. These scripts and setup details are used to run the &amp;quot;FAST TRACK&amp;quot; servers.&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=21512</id>
		<title>Running Multiple Servers on a single Linux computer</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=21512"/>
		<updated>2008-07-30T00:10:02Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
If you like to experiment new settings, it might be that you come with a set of interesting servers. A shame if you cannot run them all at the same time. Here is how you can achieve this on a Linux server. Please refer to the lag and bandwidth chapters above before to run multiple servers. If you run too many, you might end with very bad gameplay.&lt;br /&gt;
This chapter will present an easy way to run multiple servers on a single linux computer, using GNU screen.&lt;br /&gt;
&lt;br /&gt;
== Server installation ==&lt;br /&gt;
&lt;br /&gt;
First of all, you have to install the Armagetron Advanced Dedicated Server from source, not using the provided install script. This will allow to manage at will the settings and var directories. To do so, download the latest source package, and untar it in a temporary folder. CD to that folder and run the following commands:&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;configure&amp;quot; command, the prefix will be the application directory. I have choose to install it in /etc/arma. Make your own choice:&lt;br /&gt;
&lt;br /&gt;
 ./configure --prefix=/etc/arma --disable-glout --enable-automakedefaults --disable-sysinstall --disable-etc --disable-useradd --disable-initscripts&lt;br /&gt;
&lt;br /&gt;
Then, compile and install:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Now, armagetron advanced dedicated is installed in the /etc/arma folder.&lt;br /&gt;
&lt;br /&gt;
== Preparing the servers ==&lt;br /&gt;
&lt;br /&gt;
=== The tree ===&lt;br /&gt;
&lt;br /&gt;
CD to /etc/arma &amp;lt;code&amp;gt;cd /etc/arma&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the following subdirectories:&lt;br /&gt;
&lt;br /&gt;
 mkdir servers This folder will be used to store server configurations&lt;br /&gt;
 mkdir logsThis one will be used to save the server logs&lt;br /&gt;
 mkdir scriptsAnd this one will be used to same the scripts we will see below&lt;br /&gt;
&lt;br /&gt;
We have now to create our servers. To do so, go to the servers directory you have created earlier, and for each server, create a subfolder with a one-word name for the server, and two subfolders: var and settings. For exemple:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/arma/servers&lt;br /&gt;
&lt;br /&gt;
To create a server called server1:&lt;br /&gt;
&lt;br /&gt;
 mkdir server1&lt;br /&gt;
 mkdir server1/settings&lt;br /&gt;
 mkdir server1/var&lt;br /&gt;
then copy your config files in the settings subfolder.&lt;br /&gt;
&lt;br /&gt;
You can then create a second server, and more...&lt;br /&gt;
&lt;br /&gt;
 mkdir server2&lt;br /&gt;
 mkdir server2/settings&lt;br /&gt;
 mkdir server2/var&lt;br /&gt;
and so on...&lt;br /&gt;
&lt;br /&gt;
=== The setting files ===&lt;br /&gt;
&lt;br /&gt;
For each server, do not forget to create a &amp;quot;server_info.cfg&amp;quot; file (search the wiki about it), and to change the port number. Port can be from 4534 to 4540, meaning you can safely run up to 7 servers on the same computer, depending obviously on the settings of each servers, and the bandwidth they need.&lt;br /&gt;
&lt;br /&gt;
We assume that you know enough about Server Administration to understand the above explainations. This article is about Advanced Server Administration, isn&#039;t it ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The scripts ==&lt;br /&gt;
&lt;br /&gt;
Now you have to create the scripts to launch and log all your servers. To allow managing each server separately, we will use GNU Screen. GNU screen is a terminal window manager. If it is not install on your server, you can get it with the usual installation tool (yum install screen, apt get screen, etc...). Again... advanced.... We assume you know how to install applications on linux and therefore, we assume GNU screen has been installed&lt;br /&gt;
&lt;br /&gt;
You have to create two scripts. The first one will run a server and start logging the window in which the server has started. The second one will execute the first one for each folder in the /etc/arma/servers folder. It will create a window for each of them. Therefore, if you don&#039;t want a server to run, you will have to temporarily move the server folder out from the /etc/arma/servers directory.&lt;br /&gt;
&lt;br /&gt;
Save the scripts in the /etc/arma/scripts directory. I use nano which is an easy text editor. &lt;br /&gt;
&lt;br /&gt;
=== The server script ===&lt;br /&gt;
&lt;br /&gt;
The first script will be called in this example: srv&lt;br /&gt;
&lt;br /&gt;
 nano /etc/arma/scripts/srv &lt;br /&gt;
That creates a text file called srv in the scripts directory. Write the following lines in the file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 screen -S $1 -X logtstamp on 					# print timestamps in log file&lt;br /&gt;
 screen -S $1 -X logfile /etc/arma/logs/$1_%d%m%Y-%c.log 	# create a logfile in the logs subfolder&lt;br /&gt;
 screen -S $1 -X log on 					# Turn on logging for the server window&lt;br /&gt;
 while true; do 						# start a loop to allow server restart if it crashes&lt;br /&gt;
 &lt;br /&gt;
 # runs the actual server. By default, the binary is called armagetronad-dedicated and is located in the prefix/bin directory. In this example, it is in /etc/arma/bin directory.&lt;br /&gt;
 	/etc/arma/bin/armagetronad-dedicated --configdir /etc/arma/servers/$1/settings --vardir /etc/arma/servers/$1/var 	&lt;br /&gt;
 &lt;br /&gt;
 # Clear the display, and indicates that the server has crashed, and then, wait 5 seconds before to restart the server, allowing you to quit with CTRL-C&lt;br /&gt;
 	clear&lt;br /&gt;
 	echo &amp;quot;Server has crashed. It will restart immediately..., press CTRL-C to cancel&amp;quot;&lt;br /&gt;
 	sleep 5&lt;br /&gt;
 &lt;br /&gt;
 done # end the loop&lt;br /&gt;
To save the file, press CTRL-X and Y to confirm. You have now a file called srv in /etc/arma/scripts.&lt;br /&gt;
&lt;br /&gt;
=== the global script ===&lt;br /&gt;
&lt;br /&gt;
Create the second script. I called it start: &amp;lt;code&amp;gt; nano /etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 # If you run the script with a parameter (server name), only that server will be start. Otherwise, all servers in the /etc/arma/servers directory will be started&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$1&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
 	screen -S $1 -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 	screen -dmS $1 /etc/arma/scripts/srv $1			# start a GNU screen window with the specified server inside&lt;br /&gt;
 else&lt;br /&gt;
 	for f in $(ls /etc/arma/servers/.)				# start a loop running the following command for any existing folders in the /etc/arma/servers folder&lt;br /&gt;
 		do&lt;br /&gt;
 			screen -S $f -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 			screen -dmS $f /etc/arma/scripts/srv $f	# start a GNU screen window with the server inside for each server folder&lt;br /&gt;
 		done							# ends the loop&lt;br /&gt;
 fi&lt;br /&gt;
Save it and exit the same way as before.&lt;br /&gt;
&lt;br /&gt;
=== Starting all servers ===&lt;br /&gt;
&lt;br /&gt;
To make your servers start at boot, edit the /etc/rc.local file and add the &amp;quot;start&amp;quot; script at the end &amp;lt;code&amp;gt;/etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to manually start all servers, just run the &amp;lt;code&amp;gt;./start&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
=== Starting a single specific server ===&lt;br /&gt;
&lt;br /&gt;
If you want to start (or restart) a single server, just run &amp;lt;code&amp;gt;./start servername&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Server management ==&lt;br /&gt;
&lt;br /&gt;
=== GNU screen ===&lt;br /&gt;
&lt;br /&gt;
GNU screen is a great tool. As explained above, it allow a multi-windowed environement on the simple terminal. And even better, the windows stay alive, evening when you disconnect from the server. You can find everything about GNU screen by typing &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt; on a terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Listing the running servers ===&lt;br /&gt;
&lt;br /&gt;
To see the existing windows, meaning here, the running servers, type &amp;lt;code&amp;gt;screen -ls&amp;lt;/code&amp;gt;. It will gives you a list of running windows.&lt;br /&gt;
&lt;br /&gt;
=== Accessing and leaving a server console ===&lt;br /&gt;
&lt;br /&gt;
To attach to a window, type &amp;lt;code&amp;gt;screen -r servername&amp;lt;/code&amp;gt;. You will be in the server console. You can then do all the command you would usually do there. Remote moderation, server adjustment, and so on.&lt;br /&gt;
&lt;br /&gt;
To detach, but keep the server running, press CTRL-a d (control key + low case A, then low case D to detach). You can find all GNU screen key combinations by reading &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Killing a server ===&lt;br /&gt;
&lt;br /&gt;
To kill a server, attach to its window, and press CTRL-C. This will kill the script, and the window. Then press ESC to exit the dead window. An alternate way is to run &lt;br /&gt;
 screen -S servername -X quit&lt;br /&gt;
This will kill and end the window and the server inside.&lt;br /&gt;
&lt;br /&gt;
=== Log files ===&lt;br /&gt;
&lt;br /&gt;
Everytime the &amp;lt;code&amp;gt;srv&amp;lt;/code&amp;gt; script is run, a new logfile will be created in the /etc/arma/logs folder. Keep an eye on log sizes. You don&#039;t want to run out of disk space because of Armagetron Advanced, do you ?&lt;br /&gt;
&lt;br /&gt;
=== Test the server autorestart ===&lt;br /&gt;
&lt;br /&gt;
If you want to try if the server restarts when it crash, do not press CTRL-C into the window. CTRL-C kill the script, therefore it will not be able to restart. Instead, run the &amp;lt;code&amp;gt;quit&amp;lt;/code&amp;gt; command inside the server console. It will close the server, and you will be able to see the message, and the server restarting.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This article has been written by Superkikim. These scripts and setup details are used to run the &amp;quot;FAST TRACK&amp;quot; servers.&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Advanced_Server_Administration_Guide&amp;diff=21511</id>
		<title>Advanced Server Administration Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Advanced_Server_Administration_Guide&amp;diff=21511"/>
		<updated>2008-07-29T23:26:56Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you&#039;ve been running a server for awhile and now you&#039;d like to do more with it?  Maybe you&#039;ve found that there are some punk-ass players out there that you really want to kick off your server?  Maybe your players are asking for more, and you&#039;re saying &amp;quot;Hell yeah!&amp;quot; but you don&#039;t know what to actually do about it?&lt;br /&gt;
&lt;br /&gt;
You&#039;ve come to the right place!&lt;br /&gt;
&lt;br /&gt;
== Going further - Game Variations ==&lt;br /&gt;
&lt;br /&gt;
There are a number of combinations of settings that make for interesting variations of the game.  Here you will find more information on what you can and can&#039;t do.&lt;br /&gt;
&lt;br /&gt;
todo: write this.  This section needs actual helpful stuff, settings and the like, for game variations.  Don&#039;t go and transclude the variations page, it&#039;s not helpful here!&lt;br /&gt;
&lt;br /&gt;
[[Category:Server/config]]&lt;br /&gt;
&lt;br /&gt;
== Dealing with Lag ==&lt;br /&gt;
&lt;br /&gt;
The simple fact is, there&#039;s a certain amount of lag you can&#039;t fix.  &amp;lt;!--For the rest, there&#039;s MasterCard!--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Better Connection ===&lt;br /&gt;
&lt;br /&gt;
Most people just have a normal residential internet connection, often cable or DSL, at home.&lt;br /&gt;
Generally, these connections are directly connected to an ISP&#039;s network, which is then uplinked to the larger internet as a whole.&lt;br /&gt;
As a result, there are a number of hops and latency just to get out to the internet. The same applies in the reverse.&lt;br /&gt;
This means that if both the player and the server are on a residental connection, you might have 5 or more hops to get out to the internet, some variable number of hops actually on the mainstream internet, and then another 5 or more hops to reach the server.&lt;br /&gt;
Overall, that means your gameplay can cross as many or even more than 16 hops, each one adding more lag!&lt;br /&gt;
&lt;br /&gt;
The only solution to this is to locate your server on a business-class connection with a direct path to the internet. Obviously the hops on the player&#039;s side will still be there, but this can cut out extra hops on the server end. Often times this will be very expensive-- if you wanted to keep the server at home, it could be hundreds of dollars a month! Services like [http://lightfoot.dashjr.org Lightfoot Armagetron hosting] allow you to run your server on a low latency business-class connection in a server datacenter for a very small fraction of the price, often less than 10% of what a T1 would cost even for a 32-slot server.&lt;br /&gt;
&lt;br /&gt;
=== Bandwidth Limiting ===&lt;br /&gt;
&lt;br /&gt;
Bandwidth is measured in kilobytes per second and is controlled by MAX_OUT_RATE.  If you set it to 4, there will be some lag at the beginning of the round.  6 is considered minimum for a production server.&lt;br /&gt;
&lt;br /&gt;
To calculate how many players to limit on your server, you need to know how much upstream bandwidth you have.  That&#039;s bandwidth leaving your server.  :)  Then figure out how much of that you want your game server to use.  Divide it by 6.  If you get a really large number, such as 3000, then you probably don&#039;t need to worry about limiting bandwidth.  On the other hand, if you come out near 20, then try a higher number.  Keep trying until you get to the highest number for the number of players.&lt;br /&gt;
&lt;br /&gt;
You can test your internet speed by visiting one of the websites in the resource section at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&lt;br /&gt;
You have 512kbit/sec of upstream bandwidth.  That converts to &#039;&#039;64&#039;&#039;&#039;&#039;&#039;kilobytes/second&#039;&#039;&#039;&#039;&#039; &#039;&#039; of upstream bandwidth.  64/6 = 10.6666.  Since you can&#039;t have 2/3 of a player, that&#039;s 10 players.  That&#039;s also using the recommended minimum setting.  Let&#039;s assume you want to have a maximum of 12 players on your server.  Divide 64 by 12 and you get: 5.33333kb/sec.  So you can go ahead and do &amp;lt;code&amp;gt;MAX_OUT_RATE 5.3333333&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;MAX_CLIENTS 12&amp;lt;/code&amp;gt; and your full server will need all available upstream bandwidth.&lt;br /&gt;
&lt;br /&gt;
Now, you say you want to be able to surf the web and send email while people are playing on your server?  Easy enough.  Leave some room.  So you decide that 32kb/sec is enough for you to do your other internet tasks without significantly disturbing the players on your server.  64-32=32kb/sec available for the server.  32/12=2.66666666, so you won&#039;t be able to handle 12 clients and leave that much room for other uses.&lt;br /&gt;
&lt;br /&gt;
=== Simulation Framerate ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re running on an older server, or you just want a more predictable server, you should consider limiting the framerate of the simulation.  What is the simulation framerate?  Well, it&#039;s just like the FPS number you see, only it applies to the internal simulation of the game on the server.  Since that doesn&#039;t make sense, just think of it as the number of times per second the server thinks about the game.  The rest of the time, it just eats chips or something.&lt;br /&gt;
&lt;br /&gt;
You limit the framerate of the simulation with &amp;lt;code&amp;gt;DEDICATED_FPS&amp;lt;/code&amp;gt;.  You&#039;ll have to decide what you prefer for the simulation, but you can use this setting to get more mileage out of your server.  Good values range from 50-100.  You should aim for a certain CPU usage target.  So for example, you decide that 10% usage is the most the server should take up, then you connect MAX_CLIENTS number of clients to the server, open up a process viewer that shows CPU load for the server process, and play with DEDICATE_FPS until the process uses about 10%, which is your target in this example.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no hard and fast rule, and CPU usage will vary depending on how much it has to simulate, so pick a DEDICATED_FPS that makes for the most stable game you like to play.&lt;br /&gt;
&lt;br /&gt;
=== Other network settings that affect lag ===&lt;br /&gt;
&lt;br /&gt;
Server:&lt;br /&gt;
{|&lt;br /&gt;
  |CYCLE_SYNC_FF&lt;br /&gt;
  |Speed of simulation of the extrapolating sync; decrease for lower CPU load, but higher effective ping&lt;br /&gt;
  |-&lt;br /&gt;
  |CYCLE_SYNC_FF_STEPS&lt;br /&gt;
  |Number of extrapolation simulation timesteps each real timestep; increase for better accuracy&lt;br /&gt;
  |-&lt;br /&gt;
  |CYCLE_SYNC_INTERVAL_ENEMY&lt;br /&gt;
  |Time in seconds between server-client updates of enemy cycles&lt;br /&gt;
  |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Client:&lt;br /&gt;
{|&lt;br /&gt;
  |CYCLE_SYNC_INTERVAL_SELF&lt;br /&gt;
  |Time in seconds between server-client updates of enemy cycles owned by the client itself&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dealing with unruly players ==&lt;br /&gt;
&lt;br /&gt;
There are several ways to deal with unruly players.  We&#039;ll touch on each of them here.&lt;br /&gt;
&lt;br /&gt;
=== Moderation ===&lt;br /&gt;
&lt;br /&gt;
A common way is to have a group of moderators available so that your server usually has people logged in and playing who can use in-game admin to kick evil doers out of the server.  You do this by setting &amp;lt;code&amp;gt;ADMIN_PASS&amp;lt;/code&amp;gt; in your settings_custom.cfg file and then giving that password out to your preferred moderators.  Then they will use the password like this:&lt;br /&gt;
&lt;br /&gt;
While playing on the server, in a chat prompt, type &amp;lt;code&amp;gt;/login ADMIN_PASS&amp;lt;/code&amp;gt;, replacing &amp;lt;code&amp;gt;ADMIN_PASS&amp;lt;/code&amp;gt; with the password you have set for the server.  This logs the player into the in-game admin system.  Now you can execute commands with &amp;lt;code&amp;gt;/admin COMMAND ARGUMENTS&amp;lt;/code&amp;gt;.  Use &amp;lt;code&amp;gt;/logout&amp;lt;/code&amp;gt; to leave the in-game admin system.&lt;br /&gt;
&lt;br /&gt;
Every command is available, so be cautious to whom you give your &amp;lt;code&amp;gt;ADMIN_PASS&amp;lt;/code&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
{{:Remote_Moderation}}&lt;br /&gt;
&lt;br /&gt;
=== Voting ===&lt;br /&gt;
&lt;br /&gt;
Voting is a popular way to deal with unruly players.  It has the advantage of giving power to the players on the server and letting them decide how they want the grid to be when playing.  It comes at a cost, though.  First, as an admin you need to respect your players&#039; choices.  This doesn&#039;t mean you should let them walk all over you, but what&#039;s the point of letting them vote in the first place if you&#039;re just going to override it?  Second, it is possible to exploit the voting system as an unruly player.  There are some more safeguards in 0.2.8 to deal with this, but if you still use 0.2.7 it is an issue you may need to face.&lt;br /&gt;
&lt;br /&gt;
To enable voting, you should copy the group of settings from settings_dedicated.cfg into your server_info.cfg.  The reason it goes in server_info.cfg is because these settings are considered &amp;quot;policy&amp;quot; and are not something you&#039;d necessarily share with someone who asked.  You might still share them, don&#039;t get me wrong, but if someone wants to clone your server and you want to help them, you&#039;d normally just send them settings_custom.cfg and let them come up with their own server policies.&lt;br /&gt;
&lt;br /&gt;
The results of votes are decided as early as possible, so if the voters who haven&#039;t voted yet (but could still vote) aren&#039;t able to change the result the vote already ends. Example: seven players are online, four voted for a poll and one against. The two remaining voters wouldn&#039;t be able to change the outcome even if they voted against, so the poll is acted after.&lt;br /&gt;
&lt;br /&gt;
Here are the setting items you&#039;ll want to address, along with their default values:&lt;br /&gt;
&lt;br /&gt;
==== Voting Policy Settings ====&lt;br /&gt;
&lt;br /&gt;
These are the ones that really define how voting is to be accomplished.&lt;br /&gt;
&lt;br /&gt;
;ALLOW_VOTING 1&lt;br /&gt;
:Turns on voting.&lt;br /&gt;
;ALLOW_VOTING_SPECTATOR 0&lt;br /&gt;
:Allows spectator players to vote.  Generally not something you want to enable, hence the default.&lt;br /&gt;
;VOTING_BIAS 0&lt;br /&gt;
:Number of virtual voters opposing every change.  You can think of this as the Republican Party simulated by the game server, where the game server will always oppose every vote in favor of maintaining the status quo.&lt;br /&gt;
;VOTING_SPAM 50 &lt;br /&gt;
:Voting spam protection. This is new in 0.2.8 and is intended to prevent people from filling the server with polls and annoying everybody. Lower values mean more strict protection.&lt;br /&gt;
;VOTING_PRIVACY 1&lt;br /&gt;
:Level of secrecy of the votes. 2 makes the vote as secret as possible, -2 makes it fully public.  There are those who consider voting to be very personal and private, and would prefer to keep votes secret so nobody can retaliate against voters for voting against them.  There are others (me) who find that making the votes public keeps voters honest and prevents people from backstabbing one another.&lt;br /&gt;
;MIN_VOTERS 3&lt;br /&gt;
:Number of voters that need to be online to enable voting.  So it&#039;s a quorum threshold.&lt;br /&gt;
&lt;br /&gt;
==== Voting Simulation Settings ====&lt;br /&gt;
&lt;br /&gt;
You won&#039;t normally need to adjust these, but if you want to make votes happen quicker or something, you&#039;ll change these.&lt;br /&gt;
&lt;br /&gt;
;VOTING_TIMEOUT 300&lt;br /&gt;
:Number of seconds before a vote times out.  A vote will time out if it is not decided yet and action will not be taken.&lt;br /&gt;
;VOTING_TIMEOUT_PER_VOTER 0&lt;br /&gt;
:Additional value for VOTING_TIMEOUT for every voter present.&lt;br /&gt;
;VOTING_START_DECAY 60&lt;br /&gt;
:Number of seconds after that the non-voters start to get ignored&lt;br /&gt;
;VOTING_DECAY 60&lt;br /&gt;
:One non-voter is ignored everytime this many seconds pass&lt;br /&gt;
;VOTING_SPAM_ISSUE 1.0&lt;br /&gt;
:The spam level of issuing a vote.&lt;br /&gt;
;VOTING_SPAM_REJECT 5.0&lt;br /&gt;
:The spam level of getting your vote rejected.&lt;br /&gt;
;VOTING_KICK_TIME 300&lt;br /&gt;
:The minimum time in seconds between two kick votes against the same player.&lt;br /&gt;
;VOTING_MATURITY 300&lt;br /&gt;
:The minimum time in seconds a player needs to be online with the same name before he can issue votes.&lt;br /&gt;
&lt;br /&gt;
=== IP Banning ===&lt;br /&gt;
&lt;br /&gt;
Starting with version 0.2.8, banning users by IP address is supported in game.&lt;br /&gt;
&lt;br /&gt;
The two commands to handle banning within the game are &amp;lt;code&amp;gt;BAN&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;BAN_IP&amp;lt;/code&amp;gt;.  Both take either a player identifier (visible with &amp;lt;code&amp;gt;/players&amp;lt;/code&amp;gt; in the chat) or a player name.  Starting with v0.3.0, you can use tab completion on player names.  &amp;lt;code&amp;gt;BAN_IP&amp;lt;/code&amp;gt; obviously takes an IP address instead of a player identifier.  Both commands take two optional arguments that specify the time of the ban in minutes and the reason (shown to the person you banned when he/she tries to enter the server). Example (Bans the player with the ID 3 for an hour with a given reason):&lt;br /&gt;
 BAN 3 60 You are a certified idiot&lt;br /&gt;
&lt;br /&gt;
=== Firewall ===&lt;br /&gt;
&lt;br /&gt;
For older servers, you&#039;ll still need to use a firewall.&lt;br /&gt;
&lt;br /&gt;
Installing a firewall is a big job, potentially.  There are firewalls that are really rockin&#039; and do all sorts of stuff, and there are firewalls that don&#039;t rock.  In order to use a firewall to deal with unruly players, you&#039;ll need one that supports some sort of IP-based filtering, such as iptables in Linux.  In that case, banning a player is a matter of figuring out their IP address and adding it to your firewall.&lt;br /&gt;
&lt;br /&gt;
The most basic way of banning an evil doer is to just drop UDP packets from their IP address that are going to port 4534 (or whatever port your server runs on).  For many admins, this is not only a complicated rule to write, but ineffective to deal with the player, so you&#039;ll probably find it better to just ban the IP address completely.  Be warned, however, that a common way around this is for the evil doer to just turn off their cable modem (or dsl router) and turn it back on.  The good news is that it&#039;s more inconvenient to them to do that than it is for you to add their new IP address to your firewall.  :)  The bad news is that this isn&#039;t a foolproof method of banning a user.&lt;br /&gt;
&lt;br /&gt;
To help you, Armagetron Advanced supports some additional logging, listed here.&lt;br /&gt;
&lt;br /&gt;
;CONSOLE_DECORATE_ID 1&lt;br /&gt;
:Decorates every line of console output with the client ID&lt;br /&gt;
;CONSOLE_DECORATE_IP 0&lt;br /&gt;
:Decorates every line of console output with the client IP&lt;br /&gt;
&lt;br /&gt;
There is more good news, actually.  Many consumer-grade NAT routers come with built-in firewalls or at least make available a firewall option, and will do the job for you--from a web browser!  If you have such a beast, you should use it and save your players the hit of the evil-doers packets making another hop down the wire before being cut off.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
=== Internet Speed Test ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.internetfrog.com/mypc/speedtest/ Frog]&lt;br /&gt;
* [http://www.speedcheck.arcor.de/speedcheck/start.jsp Arcor (German)]&lt;br /&gt;
* [http://www.thinkbroadband.com/speedtest.html thinkbroadband]&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=21510</id>
		<title>Running Multiple Servers on a single Linux computer</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=21510"/>
		<updated>2008-07-29T23:25:40Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: /* This article explains how the FAST TRACK servers are running all together on the same Linux server. The linux server used is a rented dedicated server with plenty of bandwidth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
If you like to experiment new settings, it might be that you come with a set of interesting servers. A shame if you cannot run them all at the same time. Here is how you can achieve this on a Linux server. Please refer to the lag and bandwidth chapters above before to run multiple servers. If you run too many, you might end with very bad gameplay.&lt;br /&gt;
This chapter will present an easy way to run multiple servers on a single linux computer, using GNU screen.&lt;br /&gt;
&lt;br /&gt;
== Server installation ==&lt;br /&gt;
&lt;br /&gt;
First of all, you have to install the Armagetron Advanced Dedicated Server from source, not using the provided install script. This will allow to manage at will the settings and var directories. To do so, download the latest source package, and untar it in a temporary folder. CD to that folder and run the following commands:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap.sh&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;configure&amp;quot; command, the prefix will be the application directory. I have choose to install it in /etc/arma. Make your own choice:&lt;br /&gt;
&lt;br /&gt;
 ./configure --prefix=/etc/arma --disable-glout --enable-automakedefaults --disable-sysinstall --disable-etc --disable-useradd --disable-initscripts&lt;br /&gt;
&lt;br /&gt;
Then, compile and install:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Now, armagetron advanced dedicated is installed in the /etc/arma folder.&lt;br /&gt;
&lt;br /&gt;
== Preparing the servers ==&lt;br /&gt;
&lt;br /&gt;
=== The tree ===&lt;br /&gt;
&lt;br /&gt;
CD to /etc/arma &amp;lt;code&amp;gt;cd /etc/arma&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the following subdirectories:&lt;br /&gt;
&lt;br /&gt;
 mkdir servers This folder will be used to store server configurations&lt;br /&gt;
 mkdir logsThis one will be used to save the server logs&lt;br /&gt;
 mkdir scriptsAnd this one will be used to same the scripts we will see below&lt;br /&gt;
&lt;br /&gt;
We have now to create our servers. To do so, go to the servers directory you have created earlier, and for each server, create a subfolder with a one-word name for the server, and two subfolders: var and settings. For exemple:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/arma/servers&lt;br /&gt;
&lt;br /&gt;
To create a server called server1:&lt;br /&gt;
&lt;br /&gt;
 mkdir server1&lt;br /&gt;
 mkdir server1/settings&lt;br /&gt;
 mkdir server1/var&lt;br /&gt;
then copy your config files in the settings subfolder.&lt;br /&gt;
&lt;br /&gt;
You can then create a second server, and more...&lt;br /&gt;
&lt;br /&gt;
 mkdir server2&lt;br /&gt;
 mkdir server2/settings&lt;br /&gt;
 mkdir server2/var&lt;br /&gt;
and so on...&lt;br /&gt;
&lt;br /&gt;
=== The setting files ===&lt;br /&gt;
&lt;br /&gt;
For each server, do not forget to create a &amp;quot;server_info.cfg&amp;quot; file (search the wiki about it), and to change the port number. Port can be from 4534 to 4540, meaning you can safely run up to 7 servers on the same computer, depending obviously on the settings of each servers, and the bandwidth they need.&lt;br /&gt;
&lt;br /&gt;
We assume that you know enough about Server Administration to understand the above explainations. This article is about Advanced Server Administration, isn&#039;t it ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The scripts ==&lt;br /&gt;
&lt;br /&gt;
Now you have to create the scripts to launch and log all your servers. To allow managing each server separately, we will use GNU Screen. GNU screen is a terminal window manager. If it is not install on your server, you can get it with the usual installation tool (yum install screen, apt get screen, etc...). Again... advanced.... We assume you know how to install applications on linux and therefore, we assume GNU screen has been installed&lt;br /&gt;
&lt;br /&gt;
You have to create two scripts. The first one will run a server and start logging the window in which the server has started. The second one will execute the first one for each folder in the /etc/arma/servers folder. It will create a window for each of them. Therefore, if you don&#039;t want a server to run, you will have to temporarily move the server folder out from the /etc/arma/servers directory.&lt;br /&gt;
&lt;br /&gt;
Save the scripts in the /etc/arma/scripts directory. I use nano which is an easy text editor. &lt;br /&gt;
&lt;br /&gt;
=== The server script ===&lt;br /&gt;
&lt;br /&gt;
The first script will be called in this example: srv&lt;br /&gt;
&lt;br /&gt;
 nano /etc/arma/scripts/srv &lt;br /&gt;
That creates a text file called srv in the scripts directory. Write the following lines in the file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 screen -S $1 -X logtstamp on 					# print timestamps in log file&lt;br /&gt;
 screen -S $1 -X logfile /etc/arma/logs/$1_%d%m%Y-%c.log 	# create a logfile in the logs subfolder&lt;br /&gt;
 screen -S $1 -X log on 					# Turn on logging for the server window&lt;br /&gt;
 while true; do 						# start a loop to allow server restart if it crashes&lt;br /&gt;
 &lt;br /&gt;
 # runs the actual server. By default, the binary is called armagetronad-dedicated and is located in the prefix/bin directory. In this example, it is in /etc/arma/bin directory.&lt;br /&gt;
 	/etc/arma/bin/armagetronad-dedicated --configdir /etc/arma/servers/$1/settings --vardir /etc/arma/servers/$1/var 	&lt;br /&gt;
 &lt;br /&gt;
 # Clear the display, and indicates that the server has crashed, and then, wait 5 seconds before to restart the server, allowing you to quit with CTRL-C&lt;br /&gt;
 	clear&lt;br /&gt;
 	echo &amp;quot;Server has crashed. It will restart immediately..., press CTRL-C to cancel&amp;quot;&lt;br /&gt;
 	sleep 5&lt;br /&gt;
 &lt;br /&gt;
 done # end the loop&lt;br /&gt;
To save the file, press CTRL-X and Y to confirm. You have now a file called srv in /etc/arma/scripts.&lt;br /&gt;
&lt;br /&gt;
=== the global script ===&lt;br /&gt;
&lt;br /&gt;
Create the second script. I called it start: &amp;lt;code&amp;gt; nano /etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 # If you run the script with a parameter (server name), only that server will be start. Otherwise, all servers in the /etc/arma/servers directory will be started&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$1&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
 	screen -S $1 -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 	screen -dmS $1 /etc/arma/scripts/srv $1			# start a GNU screen window with the specified server inside&lt;br /&gt;
 else&lt;br /&gt;
 	for f in $(ls /etc/arma/servers/.)				# start a loop running the following command for any existing folders in the /etc/arma/servers folder&lt;br /&gt;
 		do&lt;br /&gt;
 			screen -S $f -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 			screen -dmS $f /etc/arma/scripts/srv $f	# start a GNU screen window with the server inside for each server folder&lt;br /&gt;
 		done							# ends the loop&lt;br /&gt;
 fi&lt;br /&gt;
Save it and exit the same way as before.&lt;br /&gt;
&lt;br /&gt;
=== Starting all servers ===&lt;br /&gt;
&lt;br /&gt;
To make your servers start at boot, edit the /etc/rc.local file and add the &amp;quot;start&amp;quot; script at the end &amp;lt;code&amp;gt;/etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to manually start all servers, just run the &amp;lt;code&amp;gt;./start&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
=== Starting a single specific server ===&lt;br /&gt;
&lt;br /&gt;
If you want to start (or restart) a single server, just run &amp;lt;code&amp;gt;./start servername&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Server management ==&lt;br /&gt;
&lt;br /&gt;
=== GNU screen ===&lt;br /&gt;
&lt;br /&gt;
GNU screen is a great tool. As explained above, it allow a multi-windowed environement on the simple terminal. And even better, the windows stay alive, evening when you disconnect from the server. You can find everything about GNU screen by typing &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt; on a terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Listing the running servers ===&lt;br /&gt;
&lt;br /&gt;
To see the existing windows, meaning here, the running servers, type &amp;lt;code&amp;gt;screen -ls&amp;lt;/code&amp;gt;. It will gives you a list of running windows.&lt;br /&gt;
&lt;br /&gt;
=== Accessing and leaving a server console ===&lt;br /&gt;
&lt;br /&gt;
To attach to a window, type &amp;lt;code&amp;gt;screen -r servername&amp;lt;/code&amp;gt;. You will be in the server console. You can then do all the command you would usually do there. Remote moderation, server adjustment, and so on.&lt;br /&gt;
&lt;br /&gt;
To detach, but keep the server running, press CTRL-a d (control key + low case A, then low case D to detach). You can find all GNU screen key combinations by reading &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Killing a server ===&lt;br /&gt;
&lt;br /&gt;
To kill a server, attach to its window, and press CTRL-C. This will kill the script, and the window. Then press ESC to exit the dead window. An alternate way is to run &lt;br /&gt;
 screen -S servername -X quit&lt;br /&gt;
This will kill and end the window and the server inside.&lt;br /&gt;
&lt;br /&gt;
=== Log files ===&lt;br /&gt;
&lt;br /&gt;
Everytime the &amp;lt;code&amp;gt;srv&amp;lt;/code&amp;gt; script is run, a new logfile will be created in the /etc/arma/logs folder. Keep an eye on log sizes. You don&#039;t want to run out of disk space because of Armagetron Advanced, do you ?&lt;br /&gt;
&lt;br /&gt;
=== Test the server autorestart ===&lt;br /&gt;
&lt;br /&gt;
If you want to try if the server restarts when it crash, do not press CTRL-C into the window. CTRL-C kill the script, therefore it will not be able to restart. Instead, run the &amp;lt;code&amp;gt;quit&amp;lt;/code&amp;gt; command inside the server console. It will close the server, and you will be able to see the message, and the server restarting.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This article has been written by Superkikim. These scripts and setup details are used to run the &amp;quot;FAST TRACK&amp;quot; servers.&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=21509</id>
		<title>Running Multiple Servers on a single Linux computer</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Running_Multiple_Servers_on_a_single_Linux_computer&amp;diff=21509"/>
		<updated>2008-07-29T23:23:45Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: /* This article explains how the FAST TRACK servers are running all together on the same Linux server. The linux server used is a rented dedicated server with plenty of bandwidth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
If you like to experiment new settings, it might be that you come with a set of interesting servers. A shame if you cannot run them all at the same time. Here is how you can achieve this on a Linux server. Please refer to the lag and bandwidth chapters above before to run multiple servers. If you run too many, you might end with very bad gameplay.&lt;br /&gt;
This chapter will present an easy way to run multiple servers on a single linux computer, using GNU screen.&lt;br /&gt;
&lt;br /&gt;
== Server installation ==&lt;br /&gt;
&lt;br /&gt;
First of all, you have to install the Armagetron Advanced Dedicated Server from source, not using the provided install script. This will allow to manage at will the settings and var directories. To do so, download the latest source package, and untar it in a temporary folder. CD to that folder and run the following commands:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap.sh&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;configure&amp;quot; command, the prefix will be the application directory. I have choose to install it in /etc/arma. Make your own choice:&lt;br /&gt;
&lt;br /&gt;
 ./configure --prefix=/etc/arma --disable-glout --enable-automakedefaults --disable-sysinstall --disable-etc --disable-useradd --disable-initscripts&lt;br /&gt;
&lt;br /&gt;
Then, compile and install:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Now, armagetron advanced dedicated is installed in the /etc/arma folder.&lt;br /&gt;
&lt;br /&gt;
== Preparing the servers ==&lt;br /&gt;
&lt;br /&gt;
=== The tree ===&lt;br /&gt;
&lt;br /&gt;
CD to /etc/arma &amp;lt;code&amp;gt;cd /etc/arma&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the following subdirectories:&lt;br /&gt;
&lt;br /&gt;
 mkdir servers This folder will be used to store server configurations&lt;br /&gt;
 mkdir logsThis one will be used to save the server logs&lt;br /&gt;
 mkdir scriptsAnd this one will be used to same the scripts we will see below&lt;br /&gt;
&lt;br /&gt;
We have now to create our servers. To do so, go to the servers directory you have created earlier, and for each server, create a subfolder with a one-word name for the server, and two subfolders: var and settings. For exemple:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/arma/servers&lt;br /&gt;
&lt;br /&gt;
To create a server called server1:&lt;br /&gt;
&lt;br /&gt;
 mkdir server1&lt;br /&gt;
 mkdir server1/settings&lt;br /&gt;
 mkdir server1/var&lt;br /&gt;
then copy your config files in the settings subfolder.&lt;br /&gt;
&lt;br /&gt;
You can then create a second server, and more...&lt;br /&gt;
&lt;br /&gt;
 mkdir server2&lt;br /&gt;
 mkdir server2/settings&lt;br /&gt;
 mkdir server2/var&lt;br /&gt;
and so on...&lt;br /&gt;
&lt;br /&gt;
=== The setting files ===&lt;br /&gt;
&lt;br /&gt;
For each server, do not forget to create a &amp;quot;server_info.cfg&amp;quot; file (search the wiki about it), and to change the port number. Port can be from 4534 to 4540, meaning you can safely run up to 7 servers on the same computer, depending obviously on the settings of each servers, and the bandwidth they need.&lt;br /&gt;
&lt;br /&gt;
We assume that you know enough about Server Administration to understand the above explainations. This article is about Advanced Server Administration, isn&#039;t it ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The scripts ==&lt;br /&gt;
&lt;br /&gt;
Now you have to create the scripts to launch and log all your servers. To allow managing each server separately, we will use GNU Screen. GNU screen is a terminal window manager. If it is not install on your server, you can get it with the usual installation tool (yum install screen, apt get screen, etc...). Again... advanced.... We assume you know how to install applications on linux and therefore, we assume GNU screen has been installed&lt;br /&gt;
&lt;br /&gt;
You have to create two scripts. The first one will run a server and start logging the window in which the server has started. The second one will execute the first one for each folder in the /etc/arma/servers folder. It will create a window for each of them. Therefore, if you don&#039;t want a server to run, you will have to temporarily move the server folder out from the /etc/arma/servers directory.&lt;br /&gt;
&lt;br /&gt;
Save the scripts in the /etc/arma/scripts directory. I use nano which is an easy text editor. &lt;br /&gt;
&lt;br /&gt;
=== The server script ===&lt;br /&gt;
&lt;br /&gt;
The first script will be called in this example: srv&lt;br /&gt;
&lt;br /&gt;
 nano /etc/arma/scripts/srv &lt;br /&gt;
That creates a text file called srv in the scripts directory. Write the following lines in the file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 screen -S $1 -X logtstamp on 					# print timestamps in log file&lt;br /&gt;
 screen -S $1 -X logfile /etc/arma/logs/$1_%d%m%Y-%c.log 	# create a logfile in the logs subfolder&lt;br /&gt;
 screen -S $1 -X log on 					# Turn on logging for the server window&lt;br /&gt;
 while true; do 						# start a loop to allow server restart if it crashes&lt;br /&gt;
 &lt;br /&gt;
 # runs the actual server. By default, the binary is called armagetronad-dedicated and is located in the prefix/bin directory. In this example, it is in /etc/arma/bin directory.&lt;br /&gt;
 	/etc/arma/bin/armagetronad-dedicated --configdir /etc/arma/servers/$1/settings --vardir /etc/arma/servers/$1/var 	&lt;br /&gt;
 &lt;br /&gt;
 # Clear the display, and indicates that the server has crashed, and then, wait 5 seconds before to restart the server, allowing you to quit with CTRL-C&lt;br /&gt;
 	clear&lt;br /&gt;
 	echo &amp;quot;Server has crashed. It will restart immediately..., press CTRL-C to cancel&amp;quot;&lt;br /&gt;
 	sleep 5&lt;br /&gt;
 &lt;br /&gt;
 done # end the loop&lt;br /&gt;
To save the file, press CTRL-X and Y to confirm. You have now a file called srv in /etc/arma/scripts.&lt;br /&gt;
&lt;br /&gt;
=== the global script ===&lt;br /&gt;
&lt;br /&gt;
Create the second script. I called it start: &amp;lt;code&amp;gt; nano /etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 # If you run the script with a parameter (server name), only that server will be start. Otherwise, all servers in the /etc/arma/servers directory will be started&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$1&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
 	screen -S $1 -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 	screen -dmS $1 /etc/arma/scripts/srv $1			# start a GNU screen window with the specified server inside&lt;br /&gt;
 else&lt;br /&gt;
 	for f in $(ls /etc/arma/servers/.)				# start a loop running the following command for any existing folders in the /etc/arma/servers folder&lt;br /&gt;
 		do&lt;br /&gt;
 			screen -S $f -X quit				# Kill the window if it exists already, avoiding to run the same server twice&lt;br /&gt;
 			screen -dmS $f /etc/arma/scripts/srv $f	# start a GNU screen window with the server inside for each server folder&lt;br /&gt;
 		done							# ends the loop&lt;br /&gt;
 fi&lt;br /&gt;
Save it and exit the same way as before.&lt;br /&gt;
&lt;br /&gt;
=== Starting all servers ===&lt;br /&gt;
&lt;br /&gt;
To make your servers start at boot, edit the /etc/rc.local file and add the &amp;quot;start&amp;quot; script at the end &amp;lt;code&amp;gt;/etc/arma/scripts/start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to manually start all servers, just run the &amp;lt;code&amp;gt;./start&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
=== Starting a single specific server ===&lt;br /&gt;
&lt;br /&gt;
If you want to start (or restart) a single server, just run &amp;lt;code&amp;gt;./start servername&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Server management ==&lt;br /&gt;
&lt;br /&gt;
=== GNU screen ===&lt;br /&gt;
&lt;br /&gt;
GNU screen is a great tool. As explained above, it allow a multi-windowed environement on the simple terminal. And even better, the windows stay alive, evening when you disconnect from the server. You can find everything about GNU screen by typing &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt; on a terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Listing the running servers ===&lt;br /&gt;
&lt;br /&gt;
To see the existing windows, meaning here, the running servers, type &amp;lt;code&amp;gt;screen -ls&amp;lt;/code&amp;gt;. It will gives you a list of running windows.&lt;br /&gt;
&lt;br /&gt;
=== Accessing and leaving a server console ===&lt;br /&gt;
&lt;br /&gt;
To attach to a window, type &amp;lt;code&amp;gt;screen -r servername&amp;lt;/code&amp;gt;. You will be in the server console. You can then do all the command you would usually do there. Remote moderation, server adjustment, and so on.&lt;br /&gt;
&lt;br /&gt;
To detach, but keep the server running, press CTRL-a d (control key + low case A, then low case D to detach). You can find all GNU screen key combinations by reading &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Killing a server ===&lt;br /&gt;
&lt;br /&gt;
To kill a server, attach to its window, and press CTRL-C. This will kill the script, and the window. Then press ESC to exit the dead window. An alternate way is to run &amp;lt;code&amp;gt;screen -S servername -X quit&amp;lt;/code&amp;gt;. This will kill and end the window and the server inside.&lt;br /&gt;
&lt;br /&gt;
=== Log files ===&lt;br /&gt;
&lt;br /&gt;
Everytime the &amp;lt;code&amp;gt;srv&amp;lt;/code&amp;gt; script is run, a new logfile will be created in the /etc/arma/logs folder. Keep an eye on log sizes. You don&#039;t want to run out of disk space because of Armagetron Advanced, do you ?&lt;br /&gt;
&lt;br /&gt;
=== Test the server autorestart ===&lt;br /&gt;
&lt;br /&gt;
If you want to try if the server restarts when it crash, do not press CTRL-C into the window. CTRL-C kill the script, therefore it will not be able to restart. Instead, run the &amp;lt;code&amp;gt;quit&amp;lt;/code&amp;gt; command inside the server console. It will close the server, and you will be able to see the message, and the server restarting.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
&lt;br /&gt;
This article has been brought to you by Superkikim. These scripts and setup details are used to run the &amp;quot;FAST TRACK&amp;quot; servers.&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Server_Administration&amp;diff=21508</id>
		<title>Server Administration</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Server_Administration&amp;diff=21508"/>
		<updated>2008-07-29T23:12:45Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &lt;br /&gt;
{{Sections}} &amp;lt;!-- Template:Sections should be at the top of each section --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here you will find various guides to creating and administering game servers.&lt;br /&gt;
&lt;br /&gt;
== [[Server Administration Guide]] ==&lt;br /&gt;
&lt;br /&gt;
Basic guide for setting up a game server.  This is your first and hopefully last, resource when you decide to run your first Armagetron Advanced game server.  It will walk you through setting up the server, making it available on the internet, basic game and physics settings, and it will set you loose.  You should at least read it, even if some of the material strikes you as being particularly basic.  It is intended to be used by a fairly computer-literate person who has very little or no knowledge of server operations of any sort.&lt;br /&gt;
&lt;br /&gt;
== [[Advanced Server Administration Guide]] ==&lt;br /&gt;
&lt;br /&gt;
So you&#039;ve been running a server for awhile and now you&#039;d like to do more with it? Maybe you&#039;ve found that there are some punk-ass players out there that you really want to kick off your server? Maybe your players are asking for more, and you&#039;re saying &amp;quot;Hell yeah!&amp;quot; but you don&#039;t know what to actually do about it?&lt;br /&gt;
&lt;br /&gt;
== [[Running Multiple Servers on a single Linux computer]] ==&lt;br /&gt;
&lt;br /&gt;
Great. Now you know how to run a server. You have found out how to improve the lag issues, and you rock in making great servers people like. It is time to run more than one server. If you rent a dedicated server, or have your own hosting server somewhere, it will most likely be a Linux server. In this section, you will find all you need to automatically run up to seven servers all together, with separated management console, and log files.&lt;br /&gt;
&lt;br /&gt;
== [[Remote Moderation]] ==&lt;br /&gt;
&lt;br /&gt;
So you want your server moderated but you have to explain how to kick and ban remotely to everyone that you want to help moderate it. Well, send them to this page!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[Console Commands]] ==&lt;br /&gt;
&lt;br /&gt;
A complete list of console commands.&lt;br /&gt;
&lt;br /&gt;
== Making the server run as a service in Windows NT (2000/XP) ==&lt;br /&gt;
This is probably one of the easiest things to do for amateur admins. You start by editing the config files located usually (C:) Drive under Program Files and inside the Armagetron Dedicated Server folder. Once you alter those to your liking, create a shortcut on the desktop for the armagetron dedicated server.exe file. Click it ands you should have DOS prompt window show up that spews out text about what is exactly happening to and inside the server, you can mimimize it and not worry about it hanging for freezing. This is probably one of the easiest ways to run a server.  &#039;&#039;&#039;Except that this isn&#039;t running as a service.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Drawbacks of running a server with Windows:&#039;&#039;&#039; Due to the intense graphics the GUI windows uses. The computer may sturr up some lag for players. It is highly suggestive that if you run a windows server, make sure you have a higher end model computer and a fast connection.&lt;br /&gt;
*TODO: Check if [http://www.codeproject.com/system/xyntservice.asp| XYNTservice] can be integrated into the code or used to run win32 dedis as services. Is the absense of a server console a problem ? the server does not have a console as it&#039;s run under another users accounts and there is no way in windows (AFAIK) to access it. We might send a message to the service ? --[[User:Joda|Joda]] 10:56, 19 March 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
{{Sections}} &amp;lt;!-- Template:Sections should be at the top of each section --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
	<entry>
		<id>http://wiki.armagetronad.org/index.php?title=Advanced_Server_Administration_Guide&amp;diff=21507</id>
		<title>Advanced Server Administration Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.armagetronad.org/index.php?title=Advanced_Server_Administration_Guide&amp;diff=21507"/>
		<updated>2008-07-29T21:19:13Z</updated>

		<summary type="html">&lt;p&gt;Superkikim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you&#039;ve been running a server for awhile and now you&#039;d like to do more with it?  Maybe you&#039;ve found that there are some punk-ass players out there that you really want to kick off your server?  Maybe your players are asking for more, and you&#039;re saying &amp;quot;Hell yeah!&amp;quot; but you don&#039;t know what to actually do about it?&lt;br /&gt;
&lt;br /&gt;
You&#039;ve come to the right place!&lt;br /&gt;
&lt;br /&gt;
== Going further - Game Variations ==&lt;br /&gt;
&lt;br /&gt;
There are a number of combinations of settings that make for interesting variations of the game.  Here you will find more information on what you can and can&#039;t do.&lt;br /&gt;
&lt;br /&gt;
todo: write this.  This section needs actual helpful stuff, settings and the like, for game variations.  Don&#039;t go and transclude the variations page, it&#039;s not helpful here!&lt;br /&gt;
&lt;br /&gt;
[[Category:Server/config]]&lt;br /&gt;
&lt;br /&gt;
== Dealing with Lag ==&lt;br /&gt;
&lt;br /&gt;
The simple fact is, there&#039;s a certain amount of lag you can&#039;t fix.  &amp;lt;!--For the rest, there&#039;s MasterCard!--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Better Connection ===&lt;br /&gt;
&lt;br /&gt;
Most people just have a normal residential internet connection, often cable or DSL, at home.&lt;br /&gt;
Generally, these connections are directly connected to an ISP&#039;s network, which is then uplinked to the larger internet as a whole.&lt;br /&gt;
As a result, there are a number of hops and latency just to get out to the internet. The same applies in the reverse.&lt;br /&gt;
This means that if both the player and the server are on a residental connection, you might have 5 or more hops to get out to the internet, some variable number of hops actually on the mainstream internet, and then another 5 or more hops to reach the server.&lt;br /&gt;
Overall, that means your gameplay can cross as many or even more than 16 hops, each one adding more lag!&lt;br /&gt;
&lt;br /&gt;
The only solution to this is to locate your server on a business-class connection with a direct path to the internet. Obviously the hops on the player&#039;s side will still be there, but this can cut out extra hops on the server end. Often times this will be very expensive-- if you wanted to keep the server at home, it could be hundreds of dollars a month! Services like [http://lightfoot.dashjr.org Lightfoot Armagetron hosting] allow you to run your server on a low latency business-class connection in a server datacenter for a very small fraction of the price, often less than 10% of what a T1 would cost even for a 32-slot server.&lt;br /&gt;
&lt;br /&gt;
=== Bandwidth Limiting ===&lt;br /&gt;
&lt;br /&gt;
Bandwidth is measured in kilobytes per second and is controlled by MAX_OUT_RATE.  If you set it to 4, there will be some lag at the beginning of the round.  6 is considered minimum for a production server.&lt;br /&gt;
&lt;br /&gt;
To calculate how many players to limit on your server, you need to know how much upstream bandwidth you have.  That&#039;s bandwidth leaving your server.  :)  Then figure out how much of that you want your game server to use.  Divide it by 6.  If you get a really large number, such as 3000, then you probably don&#039;t need to worry about limiting bandwidth.  On the other hand, if you come out near 20, then try a higher number.  Keep trying until you get to the highest number for the number of players.&lt;br /&gt;
&lt;br /&gt;
You can test your internet speed by visiting one of the websites in the resource section at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&lt;br /&gt;
You have 512kbit/sec of upstream bandwidth.  That converts to &#039;&#039;64&#039;&#039;&#039;&#039;&#039;kilobytes/second&#039;&#039;&#039;&#039;&#039; &#039;&#039; of upstream bandwidth.  64/6 = 10.6666.  Since you can&#039;t have 2/3 of a player, that&#039;s 10 players.  That&#039;s also using the recommended minimum setting.  Let&#039;s assume you want to have a maximum of 12 players on your server.  Divide 64 by 12 and you get: 5.33333kb/sec.  So you can go ahead and do &amp;lt;code&amp;gt;MAX_OUT_RATE 5.3333333&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;MAX_CLIENTS 12&amp;lt;/code&amp;gt; and your full server will need all available upstream bandwidth.&lt;br /&gt;
&lt;br /&gt;
Now, you say you want to be able to surf the web and send email while people are playing on your server?  Easy enough.  Leave some room.  So you decide that 32kb/sec is enough for you to do your other internet tasks without significantly disturbing the players on your server.  64-32=32kb/sec available for the server.  32/12=2.66666666, so you won&#039;t be able to handle 12 clients and leave that much room for other uses.&lt;br /&gt;
&lt;br /&gt;
=== Simulation Framerate ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re running on an older server, or you just want a more predictable server, you should consider limiting the framerate of the simulation.  What is the simulation framerate?  Well, it&#039;s just like the FPS number you see, only it applies to the internal simulation of the game on the server.  Since that doesn&#039;t make sense, just think of it as the number of times per second the server thinks about the game.  The rest of the time, it just eats chips or something.&lt;br /&gt;
&lt;br /&gt;
You limit the framerate of the simulation with &amp;lt;code&amp;gt;DEDICATED_FPS&amp;lt;/code&amp;gt;.  You&#039;ll have to decide what you prefer for the simulation, but you can use this setting to get more mileage out of your server.  Good values range from 50-100.  You should aim for a certain CPU usage target.  So for example, you decide that 10% usage is the most the server should take up, then you connect MAX_CLIENTS number of clients to the server, open up a process viewer that shows CPU load for the server process, and play with DEDICATE_FPS until the process uses about 10%, which is your target in this example.&lt;br /&gt;
&lt;br /&gt;
There&#039;s no hard and fast rule, and CPU usage will vary depending on how much it has to simulate, so pick a DEDICATED_FPS that makes for the most stable game you like to play.&lt;br /&gt;
&lt;br /&gt;
=== Other network settings that affect lag ===&lt;br /&gt;
&lt;br /&gt;
Server:&lt;br /&gt;
{|&lt;br /&gt;
  |CYCLE_SYNC_FF&lt;br /&gt;
  |Speed of simulation of the extrapolating sync; decrease for lower CPU load, but higher effective ping&lt;br /&gt;
  |-&lt;br /&gt;
  |CYCLE_SYNC_FF_STEPS&lt;br /&gt;
  |Number of extrapolation simulation timesteps each real timestep; increase for better accuracy&lt;br /&gt;
  |-&lt;br /&gt;
  |CYCLE_SYNC_INTERVAL_ENEMY&lt;br /&gt;
  |Time in seconds between server-client updates of enemy cycles&lt;br /&gt;
  |-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Client:&lt;br /&gt;
{|&lt;br /&gt;
  |CYCLE_SYNC_INTERVAL_SELF&lt;br /&gt;
  |Time in seconds between server-client updates of enemy cycles owned by the client itself&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dealing with unruly players ==&lt;br /&gt;
&lt;br /&gt;
There are several ways to deal with unruly players.  We&#039;ll touch on each of them here.&lt;br /&gt;
&lt;br /&gt;
=== Moderation ===&lt;br /&gt;
&lt;br /&gt;
A common way is to have a group of moderators available so that your server usually has people logged in and playing who can use in-game admin to kick evil doers out of the server.  You do this by setting &amp;lt;code&amp;gt;ADMIN_PASS&amp;lt;/code&amp;gt; in your settings_custom.cfg file and then giving that password out to your preferred moderators.  Then they will use the password like this:&lt;br /&gt;
&lt;br /&gt;
While playing on the server, in a chat prompt, type &amp;lt;code&amp;gt;/login ADMIN_PASS&amp;lt;/code&amp;gt;, replacing &amp;lt;code&amp;gt;ADMIN_PASS&amp;lt;/code&amp;gt; with the password you have set for the server.  This logs the player into the in-game admin system.  Now you can execute commands with &amp;lt;code&amp;gt;/admin COMMAND ARGUMENTS&amp;lt;/code&amp;gt;.  Use &amp;lt;code&amp;gt;/logout&amp;lt;/code&amp;gt; to leave the in-game admin system.&lt;br /&gt;
&lt;br /&gt;
Every command is available, so be cautious to whom you give your &amp;lt;code&amp;gt;ADMIN_PASS&amp;lt;/code&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
{{:Remote_Moderation}}&lt;br /&gt;
&lt;br /&gt;
=== Voting ===&lt;br /&gt;
&lt;br /&gt;
Voting is a popular way to deal with unruly players.  It has the advantage of giving power to the players on the server and letting them decide how they want the grid to be when playing.  It comes at a cost, though.  First, as an admin you need to respect your players&#039; choices.  This doesn&#039;t mean you should let them walk all over you, but what&#039;s the point of letting them vote in the first place if you&#039;re just going to override it?  Second, it is possible to exploit the voting system as an unruly player.  There are some more safeguards in 0.2.8 to deal with this, but if you still use 0.2.7 it is an issue you may need to face.&lt;br /&gt;
&lt;br /&gt;
To enable voting, you should copy the group of settings from settings_dedicated.cfg into your server_info.cfg.  The reason it goes in server_info.cfg is because these settings are considered &amp;quot;policy&amp;quot; and are not something you&#039;d necessarily share with someone who asked.  You might still share them, don&#039;t get me wrong, but if someone wants to clone your server and you want to help them, you&#039;d normally just send them settings_custom.cfg and let them come up with their own server policies.&lt;br /&gt;
&lt;br /&gt;
The results of votes are decided as early as possible, so if the voters who haven&#039;t voted yet (but could still vote) aren&#039;t able to change the result the vote already ends. Example: seven players are online, four voted for a poll and one against. The two remaining voters wouldn&#039;t be able to change the outcome even if they voted against, so the poll is acted after.&lt;br /&gt;
&lt;br /&gt;
Here are the setting items you&#039;ll want to address, along with their default values:&lt;br /&gt;
&lt;br /&gt;
==== Voting Policy Settings ====&lt;br /&gt;
&lt;br /&gt;
These are the ones that really define how voting is to be accomplished.&lt;br /&gt;
&lt;br /&gt;
;ALLOW_VOTING 1&lt;br /&gt;
:Turns on voting.&lt;br /&gt;
;ALLOW_VOTING_SPECTATOR 0&lt;br /&gt;
:Allows spectator players to vote.  Generally not something you want to enable, hence the default.&lt;br /&gt;
;VOTING_BIAS 0&lt;br /&gt;
:Number of virtual voters opposing every change.  You can think of this as the Republican Party simulated by the game server, where the game server will always oppose every vote in favor of maintaining the status quo.&lt;br /&gt;
;VOTING_SPAM 50 &lt;br /&gt;
:Voting spam protection. This is new in 0.2.8 and is intended to prevent people from filling the server with polls and annoying everybody. Lower values mean more strict protection.&lt;br /&gt;
;VOTING_PRIVACY 1&lt;br /&gt;
:Level of secrecy of the votes. 2 makes the vote as secret as possible, -2 makes it fully public.  There are those who consider voting to be very personal and private, and would prefer to keep votes secret so nobody can retaliate against voters for voting against them.  There are others (me) who find that making the votes public keeps voters honest and prevents people from backstabbing one another.&lt;br /&gt;
;MIN_VOTERS 3&lt;br /&gt;
:Number of voters that need to be online to enable voting.  So it&#039;s a quorum threshold.&lt;br /&gt;
&lt;br /&gt;
==== Voting Simulation Settings ====&lt;br /&gt;
&lt;br /&gt;
You won&#039;t normally need to adjust these, but if you want to make votes happen quicker or something, you&#039;ll change these.&lt;br /&gt;
&lt;br /&gt;
;VOTING_TIMEOUT 300&lt;br /&gt;
:Number of seconds before a vote times out.  A vote will time out if it is not decided yet and action will not be taken.&lt;br /&gt;
;VOTING_TIMEOUT_PER_VOTER 0&lt;br /&gt;
:Additional value for VOTING_TIMEOUT for every voter present.&lt;br /&gt;
;VOTING_START_DECAY 60&lt;br /&gt;
:Number of seconds after that the non-voters start to get ignored&lt;br /&gt;
;VOTING_DECAY 60&lt;br /&gt;
:One non-voter is ignored everytime this many seconds pass&lt;br /&gt;
;VOTING_SPAM_ISSUE 1.0&lt;br /&gt;
:The spam level of issuing a vote.&lt;br /&gt;
;VOTING_SPAM_REJECT 5.0&lt;br /&gt;
:The spam level of getting your vote rejected.&lt;br /&gt;
;VOTING_KICK_TIME 300&lt;br /&gt;
:The minimum time in seconds between two kick votes against the same player.&lt;br /&gt;
;VOTING_MATURITY 300&lt;br /&gt;
:The minimum time in seconds a player needs to be online with the same name before he can issue votes.&lt;br /&gt;
&lt;br /&gt;
=== IP Banning ===&lt;br /&gt;
&lt;br /&gt;
Starting with version 0.2.8, banning users by IP address is supported in game.&lt;br /&gt;
&lt;br /&gt;
The two commands to handle banning within the game are &amp;lt;code&amp;gt;BAN&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;BAN_IP&amp;lt;/code&amp;gt;.  Both take either a player identifier (visible with &amp;lt;code&amp;gt;/players&amp;lt;/code&amp;gt; in the chat) or a player name.  Starting with v0.3.0, you can use tab completion on player names.  &amp;lt;code&amp;gt;BAN_IP&amp;lt;/code&amp;gt; obviously takes an IP address instead of a player identifier.  Both commands take two optional arguments that specify the time of the ban in minutes and the reason (shown to the person you banned when he/she tries to enter the server). Example (Bans the player with the ID 3 for an hour with a given reason):&lt;br /&gt;
 BAN 3 60 You are a certified idiot&lt;br /&gt;
&lt;br /&gt;
=== Firewall ===&lt;br /&gt;
&lt;br /&gt;
For older servers, you&#039;ll still need to use a firewall.&lt;br /&gt;
&lt;br /&gt;
Installing a firewall is a big job, potentially.  There are firewalls that are really rockin&#039; and do all sorts of stuff, and there are firewalls that don&#039;t rock.  In order to use a firewall to deal with unruly players, you&#039;ll need one that supports some sort of IP-based filtering, such as iptables in Linux.  In that case, banning a player is a matter of figuring out their IP address and adding it to your firewall.&lt;br /&gt;
&lt;br /&gt;
The most basic way of banning an evil doer is to just drop UDP packets from their IP address that are going to port 4534 (or whatever port your server runs on).  For many admins, this is not only a complicated rule to write, but ineffective to deal with the player, so you&#039;ll probably find it better to just ban the IP address completely.  Be warned, however, that a common way around this is for the evil doer to just turn off their cable modem (or dsl router) and turn it back on.  The good news is that it&#039;s more inconvenient to them to do that than it is for you to add their new IP address to your firewall.  :)  The bad news is that this isn&#039;t a foolproof method of banning a user.&lt;br /&gt;
&lt;br /&gt;
To help you, Armagetron Advanced supports some additional logging, listed here.&lt;br /&gt;
&lt;br /&gt;
;CONSOLE_DECORATE_ID 1&lt;br /&gt;
:Decorates every line of console output with the client ID&lt;br /&gt;
;CONSOLE_DECORATE_IP 0&lt;br /&gt;
:Decorates every line of console output with the client IP&lt;br /&gt;
&lt;br /&gt;
There is more good news, actually.  Many consumer-grade NAT routers come with built-in firewalls or at least make available a firewall option, and will do the job for you--from a web browser!  If you have such a beast, you should use it and save your players the hit of the evil-doers packets making another hop down the wire before being cut off.&lt;br /&gt;
&lt;br /&gt;
=== Running multiple servers on a Linux computer ===&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
=== Internet Speed Test ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.internetfrog.com/mypc/speedtest/ Frog]&lt;br /&gt;
* [http://www.speedcheck.arcor.de/speedcheck/start.jsp Arcor (German)]&lt;br /&gt;
* [http://www.thinkbroadband.com/speedtest.html thinkbroadband]&lt;/div&gt;</summary>
		<author><name>Superkikim</name></author>
	</entry>
</feed>