Advanced Server Administration Guide

So you've been running a server for awhile and now you'd like to do more with it? Maybe you'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're saying "Hell yeah!" but you don't know what to actually do about it?

You've come to the right place!

Going further - Game Variations
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't do.

todo: write this. This section needs actual helpful stuff, settings and the like, for game variations. Don't go and transclude the variations page, it's not helpful here!

Dealing with Lag
The simple fact is, there's a certain amount of lag you can't fix.

Better Connection
Most people just have a normal residential internet connection, often cable or DSL, at home. Generally, these connections are directly connected to an ISP's network, which is then uplinked to the larger internet as a whole. As a result, there are a number of hops and latency just to get out to the internet. The same applies in the reverse. 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. Overall, that means your gameplay can cross as many or even more than 16 hops, each one adding more lag!

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'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 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.

Bandwidth Limiting
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.

To calculate how many players to limit on your server, you need to know how much upstream bandwidth you have. That'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'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.

You can test your internet speed by visiting one of the websites in the resource section at the bottom of this page.

Example
You have 512kbit/sec of upstream bandwidth. That converts to 64kilobytes/second  of upstream bandwidth. 64/6 = 10.6666. Since you can't have 2/3 of a player, that's 10 players. That's also using the recommended minimum setting. Let'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  and   and your full server will need all available upstream bandwidth.

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't be able to handle 12 clients and leave that much room for other uses.

Simulation Framerate
If you'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's just like the FPS number you see, only it applies to the internal simulation of the game on the server. Since that doesn'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.

You limit the framerate of the simulation with. You'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.

There'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.

Other network settings that affect lag
Server:

Client:

Dealing with unruly players
There are several ways to deal with unruly players. We'll touch on each of them here.

Moderation
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  in your settings_custom.cfg file and then giving that password out to your preferred moderators. Then they will use the password like this:

While playing on the server, in a chat prompt, type, replacing   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. Use  to leave the in-game admin system.

Every command is available, so be cautious to whom you give your !

ADMIN_PASS might no longer work
Attention: ADMIN_PASS seems to be deprecated and might no longer work on a newer server. Check out Authentication for information about modern ways of authentication.

Voting
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' choices. This doesn't mean you should let them walk all over you, but what's the point of letting them vote in the first place if you'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.

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 "policy" and are not something you'd necessarily share with someone who asked. You might still share them, don't get me wrong, but if someone wants to clone your server and you want to help them, you'd normally just send them settings_custom.cfg and let them come up with their own server policies.

The results of votes are decided as early as possible, so if the voters who haven't voted yet (but could still vote) aren'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't be able to change the outcome even if they voted against, so the poll is acted after.

Here are the setting items you'll want to address, along with their default values:

Voting Policy Settings
These are the ones that really define how voting is to be accomplished.


 * ALLOW_VOTING 1
 * Turns on voting.


 * ALLOW_VOTING_SPECTATOR 0
 * Allows spectator players to vote. Generally not something you want to enable, hence the default.


 * VOTING_BIAS 0
 * 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.


 * VOTING_SPAM 50
 * 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.


 * VOTING_PRIVACY 1
 * 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.


 * MIN_VOTERS 3
 * Number of voters that need to be online to enable voting. So it's a quorum threshold.

Voting Simulation Settings
You won't normally need to adjust these, but if you want to make votes happen quicker or something, you'll change these.


 * VOTING_TIMEOUT 300
 * 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.


 * VOTING_TIMEOUT_PER_VOTER 0
 * Additional value for VOTING_TIMEOUT for every voter present.


 * VOTING_START_DECAY 60
 * Number of seconds after that the non-voters start to get ignored


 * VOTING_DECAY 60
 * One non-voter is ignored everytime this many seconds pass


 * VOTING_SPAM_ISSUE 1.0
 * The spam level of issuing a vote.


 * VOTING_SPAM_REJECT 5.0
 * The spam level of getting your vote rejected.


 * VOTING_KICK_TIME 300
 * The minimum time in seconds between two kick votes against the same player.


 * VOTING_MATURITY 300
 * The minimum time in seconds a player needs to be online with the same name before he can issue votes.

IP Banning
Starting with version 0.2.8, banning users by IP address is supported in game.

The two commands to handle banning within the game are  and. Both take either a player identifier (visible with  in the chat) or a player name. Starting with v0.3.0, you can use tab completion on player names. 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): BAN 3 60 You are a certified idiot

Firewall
For older servers, you'll still need to use a firewall.

Installing a firewall is a big job, potentially. There are firewalls that are really rockin' and do all sorts of stuff, and there are firewalls that don't rock. In order to use a firewall to deal with unruly players, you'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.

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'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'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't a foolproof method of banning a user.

To help you, Armagetron Advanced supports some additional logging, listed here.


 * CONSOLE_DECORATE_ID 1
 * Decorates every line of console output with the client ID


 * CONSOLE_DECORATE_IP 0
 * Decorates every line of console output with the client IP

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.

Internet Speed Test

 * Frog
 * Arcor (German)
 * thinkbroadband