Dedicated Server – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
Arma 3 logo black.png

WORK IN PROGRESS

Introduction

Apart from being informative, this page will also take you through a step by step process to install, configure and run your server The majority of directories and paths are customiseable, however those defined are all consistent with the tutorial instructions.
The majority of content has been extracted from this Tutorial thread, or threads linked from it

Installation

Requirements

  1. Steam Account
  2. Ownership of Arma 3
  3. Supported Operating System
    • Windows: 2008 or later
    • Linux: (TBA)
  4. Minimum Hardware:
    • CPU:
    • RAM:
    • Disk

Instructions (Windows o/s)

The following instructions will guide you though setting up one Arma 3 server on 1 box, however they will also set the foundations for installing multiple servers on that same box

  1. Login to the server as Administrator
  2. Install the latest version of DirectX
  3. Create the following empty directories
    • D:\Apps\Steam
    • D:\Games\ArmA3\A3Master
    • D:\Games\ArmA3\A3Files
  4. Download steamcmd.exe and save it to your targetted Steam install directory (E.g D:\Apps\Steam)
  5. Run the steamcmd.exe. (This will download and install the required steam files to your custom steam directory)
  6. Create an ArmA3_Steam_updater.cmd file, (Example shown below) and save it to D:\Games\ArmA3\A3Files
  7. Run the ArmA3_Steam_updater.cmd file
  8. Just after logging into Steam, the console window will hang and ask for a validation key
    • Steam will have automatically sent you an email with this validation code, which you then need to input at the command prompt
    • The Update console window should then continue to run and install ArmA3 ((DEV or STABLE) version to the target directory as defined in the .cmd file) eg (D:\Games\ArmA3\A3Master)
  9. Create a shortcut for the ArmA3Server.exe on the server desktop
  10. Add the following parameters to the Target Line in the shortcut tab of the newly created desktop shortcut
    • -port=2302 (Required if running multiple server instances including any previous ArmA2 instances)
    • "-profiles=d:\Games\Arma3\A3Master"
    • -config=CONFIG_Vanilla.cfg
    • -world=empty
      • so it looks something similar to the following
      • "D:\Games\Arma3\A3Master\arma3server.exe" "-profiles=d:\Games\Arma3\A3Master" -port=2302 -config=CONFIG_Vanilla.cfg -world=empty
  11. Add firewall rules for the UDP ports
  12. Create a simple Notepad document called "CONFIG_vanilla.cfg" and save it to the root folder of your ArmA3 install on the server D:\Games\ArmA3\A3Master (See below for ".cfg" content)
  13. Start up your shortcut, check the server runs. (You will see a console pop up in your desktop after a few seconds)
  14. Close the console window down, then you will need to edit the following files which will have been automatically created
    • D:\Games\Arma3\A3Master\Users\Adminstrator\Administrator.Arma3Profile
    • D:\Games\Arma3\A3Master\Users\Administrator\Arma3.cfg
  15. Restart the server
  16. Start up your client Arma3.exe (Running the same branch as the server, (eg Stable or DEV) and you should then be able to see your server in the server browser (Filters are available to reduce the server list)
  17. Login to your server using the password you defined in CONFIG_Vanilla.cfg by typing "/" to open the chat window and then type (#login ADMINPASSWORD) followed by enter
  18. Once logged in you will be presented with a mission list, select one of the missions to start the game
  19. Prove the stability of your server by running BIS missions initially before you start adding user made content

Instructions (Linux o/s)

TBA WORK IN PROGRESS


Additional Info

Useful Links

Further Reading

Tools

Useful Addons

File Locations

Some files are automatically created when you use certain commandline parameters Some files have to be created manually. If you have followed the instructions accurately, you will now have the following files and directories in addition to the clean install

  • d:\Games\Arma3\A3Master\ Users\Administrator\Administrator.Arma3Profile (Difficulty settings)
  • d:\Games\Arma3\A3Master\ Users\Administrator\Administrator.vars.Arma3Profile (Some binarised content which you cannot edit)
  • d:\Games\Arma3\A3Master\ Users\Administrator\Arma3.cfg (Bandwidth settings)
  • d:\Games\Arma3\A3Master\ MPMissions\ This is where custom made mission.pbo's need to be placed)
  • d:\Games\Arma3\A3Master\ arma3.rpt (Debug Log, automatically created every time the arma3server.exe is started)
  • d:\Games\Arma3\A3Master\ CONFIG_Vanilla.cfg (Manually created)
  • d:\Games\ArmA3\A3Files\ ArmA3_Steam_updater.cmd (Manually created)
  • d:\Apps\Steam\

Port Forwarding

Arma 3 uses the same default ports as Arma 2 with the addition of 2 steam ports. So if you intend running A2 and A3 servers on the same machine, you need to edit the ports used Default ports are all UDP and as follows

  • 2302 (Arma3 Game port)
  • 2303 (Server reporting)
  • 2305 (Von)
  • 8766 (Steam port)
  • 27016 (Steam query port)

To define the ArmA3 Game port used, state -port= **** in your command line arguments (Where *** is the new initial Arma 3 Game eg 2302)

and to define your Steam ports add the following lines to your CONFIG_Vanilla.cfg (editing the actual port numbers as required)

// STEAM
steamport=8766;
steamqueryport=27016;

If you are running multiple servers, i would suggest the following format

SERVER 1
2300 UDP (steamport)
2301 UDP (Steam query port)
2302 UDP (used for game)
2303 UDP (used for server reporting)
2304 UDP (? no information available for this port useage)
2305 UDP (used for VoN transmissions)
so open ports 2300-2305
and leave at least 10 ports between the next server set

SERVER 2
2320 UDP (steamport)
2321 UDP (Steam query port)
2322 UDP (used for game)
2323 UDP (used for server reporting)
2324 UDP (? no information available for this port useage)
2325 UDP (used for VoN transmissions)
so open ports 2320-2325
leave at least 10 ports then repeat the process for No3 server etc

Configuring for stable or Dev branch

Edit the ArmA3_Steam_Updater.cmd as defined below then run it

  • To select Development version
SET A3BRANCH=107410 -beta development
  • To roll back to stable build
SET A3BRANCH=107410 -beta

Important Feature Since 12th March 2013 the development branch and the stable branch versions are no longer compatible. this means:
Only DEV clients can connect to a DEV server
Only Stable clients can connect to stable servers

Advanced Configuration

WORK IN PROGRESS

Bandwidth Optimisation

WORK IN PROGRESS

Multiple Server configuration

There are various methods available to run multiple Dedicated Arma 3 servers on the same box. Each server instance requires

  • Its own unique set of ports
  • Its own profile
  • Its own config

This Post explains it more in depth

Each method has some pro's and cons To select the preferred methodology that suits your requirements you need to have considered the following

  • The useage of the "Keys" folder
  • The useage of the "MpMissions" folder
  • Available Hard drive space
  • Update management

METHOD 1

see THIS POST for more detailed information This is copy of the master install into a different directory As may times as you have space for

Pros

  • Most robust
  • Unique MpMissions folder
  • Unique "keys" folder
  • Allows ability to run seperate instances of different branches of the game, (E.g Dev or Stable)

Cons

  • Uses more drive space
  • Requires more effort to create and automate the updating process

METHOD 2

This uses 1 master install folder and has renamed arma3server.exe's in sub folders of the master see THIS POST for more detailed information

Pros (Compared to Method 1)

  • Uses less space than Method 1
  • Updating will be easier

Cons (Compared to Method 1)

  • Not very Robust
  • Shares MpMissions folders with all the other exe's (Will create a very cluttered MpMissions folder and allows admins to select addon required missions for a mod this server instance isn't running
  • Shares "keys" folder with all other exe's (This can cause an issue when running various differing -mod servers)
  • Will not allow you to run seperate instances of different branches of the game

METHOD 3

This is a hybrid of method 1, in that it is essentially a "Virtual" copy of the master install in a different directory the difference being that many folders are sim linked to the initial Master directory simlink GUI:

Pros (Compared to Method 1)

  • Uses less drive space (As you wont have multiple copies of the addons folder)
  • Allows for unique MpMissions folder if desired
  • Allows for unique "keys" folder if desired
  • Updating will be easier

Cons (Compared to Method 1)

  • Requires more effort to initially create the simlinks and directories
  • Will not allow you to run seperate instances of different branches of the game at the same time, (E.g Dev or Stable)

METHOD 4

You could of course mix n match all 3 methods to suit your specific requirements


Dedicated Server & Client configuration

The only known issue, is to make sure you start the server up before you start the steam client Failing to do this causes steam port issues and your client will not be able to connect to the server

Headless Client

--JacmacBrian (talk) 22:14, 23 February 2014 (CET)

A Headless Client can be used by missions to offload AI processing to a dedicated client, freeing up the dedicated server process from most AI processing. Thus more AI units can be spawned and the server process will be able to dedicate most of it's processing towards communication with the clients. For a Headless Client/Dedicated Server to function together efficiently, they both need to be connected to each other via extremely low latency and high bandwidth. Effectively, they need to be on the same LAN at least, but preferably running on the same computer.

Setup and Execution

  • Headless Client for ARMA 3 requires a valid active Steam account logged in to function (Dwarden Post)
  • A Headless Client is simply Arma3.exe run from the command line with parameters, for example:
arma3.exe -connect=localhost -port=2444 -client -nosound -password=some_server_password -name=HC -profile=HC -mod=@CBA_A3;@blah;@blah;@blah

In the example above, the headless client is running on the same host as the dedicated server. It uses a profile called HC and connects to the server with a password as required by the server (the password is for password protected servers, optional). The server in this example is running on port 2444, alter this to the port of your server.

  • The Headless Client profile needs to be created like any other profile in Arma 3 (Note: It is best if you name this profile HC)

No configuration of the profile is necessary, but after creation, edit HC.Arma3Profile located in C:\Users\yourusername\Documents\Arma 3 - Other Profiles\HC and add this line:

battleyeLicense=1;

Alternatively, you can use the full Arma 3 client to connect to any multiplayer server with BattlEye enabled and accept the BattlEye License Agreement, which will do the same thing as manually editing HC.Arma3Profile.

Once the profile is ready, copy the profile directory to C:\Users\yourusername\Documents\Arma 3 - Other Profiles on the server (if the profile was not created on the server). If the profile was created on the server or is not going to run on the server and is already on the computer it is going to run on, then it is ready to go.

  • If the Headless Client is on the server, the server's cfg must have the local loopback address as seen below (e.g. A3Server.cfg):
localClient[]={127.0.0.1};
battleyeLicense=1;

Dwarden suggests that battleyeLicense=1; be in the server's config, but it is unclear whether this is actually necessary. (Dwarden Post)

  • If the Headless Client is running on a different computer, the server's config has to have the address in localClient[]=x.x.x.x. This will allow the server to communicate with the Headless Client using unrestricted bandwidth. Multiple headless clients at different addresses can be added:
localClient[]={127.0.0.1, 192.168.1.10, 192.168.1.210};
battleyeLicense=1;

Headless Client on a Dedicated Server Notes: If the Arma 3 Headless Client and a Arma 3 Dedicated Server are running on the same Windows computer (VM or physical), it may be beneficial to set processor affinity to prevent execution intensive threads from being scheduled across the same (v)CPUs. The operating system will generally schedule threads efficiently, but manual CPU allocation is possible. This can be achieved by right-clicking on the process (e.g. Arma3Server.exe(*32)) in the processes tab of the Windows Task Manager and selecting Set Affinity.... Be aware that on a physical intel CPU, the odd numbered CPUs are hyperthread instances.

It has been observed that although the ARMA server and client processes will kick off multiple threads, the bulk of processing is used up by only one or two threads. For example, spawning 50 AI units does not generate 50 threads. There is one thread in the process that handles all of the AI units, irrespective of how many have been spawned. In this way, the ARMA server and client processes do not make maximal use of the processing capability found in modern processors. As such, faster CPU core speed is king and offloading the AI to multiple headless clients on the same computer will probably produce the best possible results.

Example Files

Arma3server_steamcmd_example.cmd

  • Standalone Server Package (no need for game ownership on STEAM account)
  • Note: it needs to be ran twice (1st STEAMcmd update itself, (when done, quit), 2nd update the Server package)
  • Code:
@echo off
@rem http://media.steampowered.com/installer/steamcmd.zip
SETLOCAL ENABLEDELAYEDEXPANSION

       :: DEFINE the following variables where applicable to your install

    SET STEAMLOGIN=mylogin mypassword
    SET A3serverBRANCH=233780 -beta
        :: For stable use 233780 -beta
        :: For Dev use 233780 -beta development
                :: Note, the missing qotation marks, these need to be wrapped around the entire "+app_data......"
                :: There is no DEV branch data yet for Arma 3 Dedicated Server package !!!

    SET A3serverPath=C:\A3server\
        SET STEAMPATH=C:\STEAMcmd\


:: _________________________________________________________

echo.
echo     You are about to update ArmA 3 server
echo        Dir: %A3serverPath%
echo        Branch: %A3serverBRANCH%
echo.
echo     Key "ENTER" to proceed
pause
%STEAMPATH%\steamcmd.exe +login %STEAMLOGIN% +force_install_dir %A3serverPath% +"app_update %A3serverBRANCH%" validate +quit
echo .
echo     Your ArmA 3 server is now up to date
echo     key "ENTER" to exit
pause

Arma3_Steam_Updater.cmd

  • Full Game Package (needs game ownership on STEAM account)
  • Code:
@echo off

SETLOCAL ENABLEDELAYEDEXPANSION

       :: DEFINE the following variables where applicable to your install

    SET STEAMLOGIN=mylogin mypassword
    SET A3BRANCH=107410 -beta development
        :: For stable use 107410 -beta
        :: For Dev use 107410 -beta development
                :: Note, the missing qotation marks, these need to be wrapped around the entire "+app_data......"

    SET A3Path=D:\Games\ArmA3\A3Master
        SET STEAMPATH=D:\apps\Steam


:: _________________________________________________________

echo.
echo     You are about to update ArmA3
echo        Dir: %A3Path%
echo        Branch: %A3BRANCH%
echo.
echo     Key "ENTER" yo procede
pause
%STEAMPATH%\steamcmd.exe +login %STEAMLOGIN% +force_install_dir %A3Path% +"app_update %A3BRANCH%" validate +quit
echo .
echo     Your ArmA3 is now up to date
echo     key "ENTER" to exit
pause

CONFIG_Vanilla.cfg

//
// server.cfg
//
// comments are written with "//" in front of them.

// STEAM

steamport		=2300;
steamqueryport        	=2301;

// GLOBAL SETTINGS

hostname        	= "My Server:    My Teamspeak address";        // The name of the server that shall be displayed in the public server list
//password         	= "ServerAccessPassword";            		// Password for joining, eg connecting to the server
passwordAdmin         	= "AdminPassword";                		// Password to become server admin. When you're in Arma MP and connected to the server, type '#login xyz'
reportingIP         	= "arma3pc.master.gamespy.com";            	// This is the default setting. Leave empty for private servers if you do not want your server listed publicly
logFile            	= "A3Master.log";
verifySignatures     	= 2;

// WELCOME MESSAGE ("message of the day")
// It can be several lines, separated by comma
// Empty messages "" will not be displayed at all but are only for increasing the interval

motd[]={
    "",
    "",
    "",
    "__________     SYSTEM MESSAGES __________",
    "Welcome to My  Server",
    "IMPORTANT   Verify Signatures is enabled",
    "",
    "TS3 Server:     teamspeak.mydomain.com",
    "Web:            www.mywebsite.com",
    "TS3 Server:     teamspeak.zeus-community.net",
    "__________     END OF MESSAGE __________"
};
motdInterval 		= 5;            // Time interval (in seconds) between each message



// JOINING RULES
maxPlayers		= 40;		// Maximum amount of players. Civilians and watchers, beholder, bystanders and so on also count as player.
// VOTING
voteMissionPlayers	= 1;        	// Tells the server how many people must connect so that it displays the mission selection screen.
voteThreshold		= 0.33;     	// 33% or more players need to vote for something, for example an admin or a new map, to become effective
//voteMissionPlayers	= 0;

// INGAME SETTINGS
disableVoN		= 0;        	// If set to 1, Voice over Net will not be available
vonCodecQuality         = 8;        	// Quality from 1 to 10
persistent		= 1;        	// If 1, missions still run on even after the last player disconnected.

// MISSIONS CYCLE (see below)
class Missions
{
          class Mission1
         {
              template="co_xx_mymission.stratis";
              difficulty="Regular";
          };
};

kickDuplicate = 1;
equalModRequired = 0;
requiredSecureId = 2;
timeStampFormat = "short";

// SCRIPTING ISSUES
onUserConnected = "";					//
onUserDisconnected = "";				//
doubleIdDetected = "";					//

// SIGNATURE VERIFICATION
onUnsignedData = "kick (_this select 0)";		// unsigned data detected
onHackedData = 	"kick (_this select 0)";	//"ban (_this select 0)";			// tampering of the signature detected
onDifferentData = "";


****.Arma3Profile

version=2;

viewDistance=3000;
preferredObjectViewDistance=3000;
terrainGrid=12.5;
activeKeys[]=
{
};


class Difficulties
{
    class recruit
    {
        class Flags
        {
            Armor=1;
            FriendlyTag=0;
            EnemyTag=0;
            MineTag=1;
            HUD=1;
            HUDPerm=1;
            HUDWp=1;
            HUDWpPerm=1;
            HUDGroupInfo=1;
            AutoSpot=1;
            Map=1;
            WeaponCursor=1;
            AutoGuideAT=1;
            ClockIndicator=1;
            3rdPersonView=1;
            UltraAI=0;
            CameraShake=0;
            UnlimitedSaves=1;
            DeathMessages=1;
            NetStats=1;
            VonID=1;
            ExtendetInfoType=1;
        };
        skillFriendly=0.6;
        skillEnemy=0.6;
        precisionFriendly=0.28;
        precisionEnemy=0.28;
    };
    class regular
    {
        class Flags
        {
            Armor=1;
            FriendlyTag=1;
            EnemyTag=0;
            MineTag=1;
            HUD=1;
            HUDPerm=1;
            HUDWp=1;
            HUDWpPerm=1;
            HUDGroupInfo=1;
            AutoSpot=1;
            Map=1;
            WeaponCursor=1;
            AutoGuideAT=1;
            ClockIndicator=1;
            3rdPersonView=1;
            UltraAI=0;
            CameraShake=1;
            UnlimitedSaves=1;
            DeathMessages=1;
            NetStats=1;
            VonID=1;
            ExtendetInfoType=1;
        };
        skillFriendly=0.6;
        skillEnemy=0.6;
        precisionFriendly=0.28;
        precisionEnemy=0.28;
    };
    class veteran
    {
        class Flags
        {
            Armor=0;
            FriendlyTag=0;
            EnemyTag=0;
            MineTag=1;
            HUD=1;
            HUDWp=1;
            HUDWpPerm=1;
            HUDGroupInfo=1;
            AutoSpot=0;
            WeaponCursor=0;
            ClockIndicator=1;
            3rdPersonView=1;
            UltraAI=0;
            CameraShake=0;
            DeathMessages=0;
            NetStats=1;
            VonID=1;
            ExtendetInfoType=0;
        };
        skillFriendly=0.6;
        skillEnemy=0.6;
        precisionFriendly=0.28;
        precisionEnemy=0.28;
    };
    class mercenary
    {
        class Flags
        {
            HUD=1;
            AutoSpot=0;
            WeaponCursor=0;
            DeathMessages=0;
            NetStats=1;
            VonID=1;
        };
        skillFriendly=0.6;
        skillEnemy=0.6;
        precisionFriendly=0.28;
        precisionEnemy=0.28;
    };
};

difficulty="veteran";

Arma3.cfg

language="English";
adapter=-1;
MinBandwidth=800000;
MaxBandwidth=25000000;
MaxMsgSend=384;
MaxSizeGuaranteed=512;
MaxSizeNonguaranteed=256;
MinErrorToSend=0.003;
MaxCustomFileSize=100000;
Windowed=0;
serverLongitude=0;
serverLatitude=52;
serverLongitudeAuto=0;
serverLatitudeAuto=52;

Support & Troubleshooting

Known Issues

  1. My server has 2500ms ping in server browser (This is caused by running the steam client as Non Administrator) see http://feedback.arma3.com/view.php?id=9374
  2. MaxMsgSend default is 128, higher values can create Desync problems if the server's available processing and/or bandwidth can not support the higher value

Live Help

For Live help, join the Skype group channel

Quote Originally Posted by Dwarden 
all server hosters, we have Skype channel for collaborative work of server admins, add me on Skype and demand access, slap me on IRC, try hit me over email or so ... thanks

F.A.Q

WORK IN PROGRESS

See Also

ArmA Server Configuration

Multiplayer Server Commands

Arma3:_Startup_Parameters#Server_Options

BattlEye#RCon