Beyond All Reason LAN server customization - Yaribz/SPADS GitHub Wiki
This guide explains how to perform basic customization of a dedicated LAN server for Beyond All Reason. It assumes that the server was installed by following the Beyond All Reason LAN server quick install guide for Windows or Linux.
Step 1: Secure administrator account
After an automatic installation of the dedicated LAN server for Beyond All Reason, the default SPADS administrator account is named admin
. As the lobby server is running in LAN mode, there is no lobby account management and lobby passwords aren't checked. This means anyone can use a lobby client to connect to the LAN server as admin
user and call privileged SPADS commands (kicking/banning players, stopping/restarting the server etc.). While this can be ok for an offline LAN environment where every user is trusted, depending on your precise use case you might want to secure the administrator account as follows.
1.1) Stop SPADS
If your SPADS instance for dedicated LAN server is running, you need to stop it first. It is recommended to stop it cleanly by using the !quit
command from a lobby client (it is assumed that the lobby client was configured to connect to the LAN server by following this documentation):
- Start the Beyond All Reason launcher then click on
Start
- Click on the
Login
button in the top right corner - In the
Username
field of the window that just opened, replace your previous username withadmin
and click onLogin
- In the menu on the left, click on the
Multiplayer & Coop
button, then on theBattle List
button - Click on the battle room corresponding to your LAN server (named
SPADS (default settings)
by default) - In the battle room window that just opened, a section named
Spectators
should be visible in the bottom right corner. Click on the spectator user corresponding to your dedicated server (namedSPADS
by default), then onMessage
to send a chat message to your dedicated server. - At the bottom of the chat message window that opened on the right, enter command
!quit
- After a few seconds, the dedicated server should quit and your client should be disconnected
- Click on
Exit
in the bottom left corner to quit the lobby client
1.2) Customize administrator account name
If you want to access privileged server commands using your normal lobby username instead of admin
, you can change the administrator account to match your username by editing the users.conf
configuration file located in the etc
sub-directory of SPADS installation directory. In this file, the following line must be updated by replacing admin
with your actual desired lobby username (case sensitive):
:admin:::::|140
1.3) Configure SPADS password for administrator account
Note: Steps 1.3 and 1.4 are only needed if you don't trust the clients connecting to your LAN server and want to protect the administrator account with a password.
- Start SPADS (from SPADS installation directory, enter
perl spads.pl etc/spads.conf
) - Start the Beyond All Reason launcher then click on
Start
- Click on the
Login
button in the top right corner - In the
Username
field of the window that just opened, replaceadmin
with your desired username (as configured in step1.2
) and click onLogin
- In the menu on the left, click on the
Multiplayer & Coop
button, then on theBattle List
button - Click on the battle room corresponding to your LAN server (named
SPADS (default settings)
by default) - In the battle room window that just opened, a section named
Spectators
should be visible in the bottom right corner. Click on the spectator user corresponding to your dedicated server (namedSPADS
by default), then onMessage
to send a chat message to your dedicated server. - At the bottom of the chat message window that opened on the right, enter command
!chpasswd MyUserName MyPassword
(replaceMyUserName
with your actual username, andMyPassword
with your actual desired password) - SPADS should confirm the password has been correctly set. At this stage, the SPADS password is configured for your account but this has no effect yet because SPADS authentication is not required for this account yet (see next step)
1.4) Enable SPADS authentication for administrator account
-
Edit the
users.conf
configuration file located in theetc
sub-directory of SPADS installation directory. In this file, the following line must be updated by inserting2
just before the pipe character|
::MyUserName:::::|140
(in this example, the administrator account is named
MyUserName
)After modification, the line should be:
:MyUserName:::::2|140
-
In the lobby client chat window opened in step
1.3
, enter command!reloadConf
to reload SPADS configuration and apply changes -
From now on, the administrator account requires SPADS authentication to access privileged commands. This means you need to authenticate yourself by sending the command
!auth MyPassword
(replaceMyPassword
with your actual password chosen in step1.3
using the!chpasswd
command).
Step 2: Customize battle room name
-
The default battle room name is
SPADS (default settings)
. This can be changed by modifying the hosting settingbattleName
which is declared in thehostingPresets.conf
configuration file (located in theetc
sub-directory of SPADS installation directory). -
By default, the username used by the dedicated server to host games is
SPADS
. This can also be changed by editing the global settinglobbyLogin
which is declared in thespads.conf
configuration file. This setting requires a restart of SPADS to be taken into account (you can use the!restart
command for that).
Step 3: Configure port forwarding (optional)
This step should only be performed if both following conditions are true:
- the dedicated server must be accessible online, to allow users to connect both from LAN and Internet
- the dedicated server is running behind a NAT and has no Internet address on its local interface(s)
In this case only, you need to setup following port forwarding on your external router:
- forward TCP port
8200
to your dedicated LAN server (this is the default port for the lobby server, as configured by thelistenPort
setting in the SPADS plugin configuration fileLanServer.conf
) - forward UDP port
8452
to your dedicated LAN server (this is the default port for the game server, as configured by theport
hosting setting in the SPADS configuration filehostingPresets.conf
)
Step 4: Advanced configuration (optional)
SPADS is highly customizable through various configuration files and a plugin API interface. Default configuration should fit most needs, but if you have specific requirements you can start by taking a look at the 3 main configuration files to adjust precisely the hosting behavior: spads.conf
, hostingPresets.conf
and battlePresets.conf
. All SPADS commands and settings are documented here.