Difference between revisions of "Setting Up Multiple Armagetron Servers the Easy Way"

From Armagetron
Line 26: Line 26:
 
=== Installing the Server ===
 
=== Installing the Server ===
  
For sty+ct+ap
+
For sty+ct+ap:<pre><nowiki>wget armanelgtron.tk/aa/install/ap.sh -O install.sh
<pre><nowiki>wget armanelgtron.tk/aa/install/ap.sh -O install.sh
 
 
. install.sh</nowiki></pre>
 
. install.sh</nowiki></pre>
  
For 0.4
+
 
<pre><nowiki>wget armanelgtron.tk/aa/install/0.4.sh -O install.sh
+
For 0.4:<pre><nowiki>wget armanelgtron.tk/aa/install/0.4.sh -O install.sh
 
. install.sh</nowiki></pre>
 
. install.sh</nowiki></pre>
  
For sty+ct
+
 
<pre><nowiki>wget resource.armagetronad.net/resource/install.sh -O install.sh
+
For sty+ct:<pre><nowiki>wget resource.armagetronad.net/resource/install.sh -O install.sh
 
. install.sh</nowiki></pre>
 
. install.sh</nowiki></pre>
  

Revision as of 23:30, 13 June 2020

Introduction

This "tutorial" will not explain how things work, or how the server is actually set up. I've created scripts that will do almost all of the work for you. If you want to see how to actually set it up yourself, you may want to check out Running Multiple Servers on a single Linux computer or Running Multiple Servers In a Single Ubuntu Computer. There you can find out more about what is going on in these scripts.


Requirements

A Debian distro. This could be Debian, Ubuntu, Mint, etc.

Root Access (Able to use "su" command)

The ability to type exactly what I put in the code boxes.


Creating a User

If you already have a user with a home directory inside of /home/{USER} then you may skip this step. It's been brought to my attention that Ubuntu server VPS's are often given without an account to use other than root.

Replace USERNAME with the username you wish to use. This will be important later on.

useradd -d /home/USERNAME -m USERNAME

If not logged in as root, but still want a new account for the servers.

sudo useradd -d /home/USERNAME -m USERNAME


Installing the Server

For sty+ct+ap:

wget armanelgtron.tk/aa/install/ap.sh -O install.sh
. install.sh


For 0.4:

wget armanelgtron.tk/aa/install/0.4.sh -O install.sh
. install.sh


For sty+ct:

wget resource.armagetronad.net/resource/install.sh -O install.sh
. install.sh

It will prompt you for your root password, followed by your username. The username is the name you log in under, for example tom owns /home/tom/, and tom would be the username.

Setting Up Necessary Files

This will create the scripts necessary to run the server, and your first server.

wget resource.armagetronad.net/resource/setup.sh -O setup.sh
. setup.sh

Again, use your root password and the same username as before.


Files to Edit

Just a Suggestion The server folder generated can be a base for all servers you create. I would copy and paste it if you don't wish to redo everything in there yourself.


Directory: ~/armagetronad

This is the main server directory. Everything needed is inside here.


File: servers/myServer/config/aiplayers.cfg

This is the config for your AI players. You can change things such as their name in this file.


File: servers/myServer/language/custom.txt

Change the default messages outputted by the server.


Directory: servers/myServer/resource

For the most part, you don't really need to mess with this folder. The server automatically downloads files such as maps and configs and will store them here as a sort of cache, rather than downloading them every time.


File: servers/myServer/scripts/script.php

The generated PHP script. There are scripts available in different places, like the Armagetron forums, and probably on some server hosts' sites. You can add them here, but don't forget to enable it in the settings_custom.cfg so it runs when you boot the server.


File: servers/myServer/settings/script.cfg

This will just kill the script if it's running, and start it back up.


File: servers/myServer/settings/server_info.cfg

One of your most important files, it will be where you add things such as the server name, port, options, etc. You also add user authentication levels here, where 0 is owner, 1 administrator, 2 moderator, 15 logged in, and 20 regular player.


File: servers/myServer/settings/settings_custom.cfg

The other most important file, where you add the server settings. Note that at the top of the file, I've included my base settings. This will get your server up and running on the master list, and allow users to log in. It also sets defaults for a few commands and other settings. Feel free to change anything you want by adding the command and value below the RINCLUDE line.


Starting & Stopping the Server

Boot / Restart All Servers

cd /home/USERNAME/armagetronad/scripts
sudo -s -u USERNAME . boot.sh

Boot / Restart A Single Server

cd /home/USERNAME/armagetronad/scripts
sudo -s -u USERNAME . boot.sh myServer

Kill All Servers

cd /home/USERNAME/armagetronad/scripts
sudo -s -u USERNAME . kill.sh

Kill A Single Server

cd /home/USERNAME/armagetronad/scripts
sudo -s -u USERNAME . kill.sh myServer


Note that the parameters used are the folder names under ~/armagetronad/servers/

Credits & Questions

The scripts and tutorial here was written by Light@forums. If you have any questions or problems, feel free to message me on the Armagetron Forums.

If you get any errors in the scripts or have problems setting up, please let me know so I can fix it.