User Tools

Site Tools


arma3:linux-dedicated-server-steam-install

ArmA 3 Linux Dedicated Server Steam Install

ArmA 3 Linux Dedicated Server Steam Install instructions.

The good thing about ArmA 3 using Steam is that you can now download the full linux dedicated server data package from steam with single command. No more packing your arma dir and uploading it to your server. You can handle everything from the linux shell.

Alright here is the ArmA 3 Linux dedicated server steam install tutorial.

Go to your home directory. Make “steam/” directory there.

mkdir steam

Make “arma3/” directory there.

mkdir arma3

Go to steam directory and download the steam client.

wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz

Unpack it.

tar xvf steamcmd_linux.tar.gz

And run it the first time when it should upgrade itself automatically.

./steamcmd.sh

Exit steam shell by using “quit” command.

Go to your arma3 directory and create upgrade-arma-3 file there.

nano upgrade-arma-3

Write the following line there.

/home/<NAME>/steam/steamcmd.sh +runscript /home/<NAME>/arma3/update-arma-3.txt

Where you obviously replace <NAME> with your name or fix the path with where ever you installed steam/ dir.

Now create permissions for that file.

chmod 755 upgrade-arma-3

Now open the update-arma-3.txt file and write there the following.

// Stop the script if any commands fail
@ShutdownOnFailedCommand 1

// Do not prompt for a password, use the one specified in the login command
@NoPromptForPassword 1

// Login to the given steam account
login <steam login> <steam password>

// Set the directory where A3 is/will be installed
force_install_dir /home/<NAME>/arma3

// Install or update the files for App ID 233780, the A3 server
app_update 233780 validate

// Exit the Steam shell
quit

Again you obviously replace <steam login> <steam password> with your login/password and <NAME> with the proper directory.

Take a note that if you are using your normal steam login to do this, steam will kick you out from your windows steam client. Its recommended that you register brand new account just for installing / upgrading linux server(s), its free in steam and they don't mind if you have two accounts.

Now install ArmA 3 files from steam using upgrade-arma-3 command.

./upgrade-arma-3

At this time it will download whole ArmA 3 game/server files for you. Some of the files have been already prepared for specific linux server use which is nice.

At the time this tutorial was written, the ArmA 3 development branch “beta” is not available for Linux Steam install.

ArmA 3 Dedicated Server Configs

Here are some config files. These config files are not really an good examples of how you should set your server up, they aren't meant for that, they are here just to complete this tutorial so you can copy paste (and change few parts) and get your server up and running with as little fuss as possible. You definitely should go through and learn how to make proper server configuration files for your own unique server.

Basic.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;

This following is the basic server config file, we call it pmc.cfg here, often its named server.cfg file name.

pmc.cfg:

// STEAM
steamport               = 8766;  //default 8766, needs to be unique if multiple serves on same box
steamqueryport          = 27016; //default 27016, needs to be unique if multiple servers on same box
 
// GLOBAL SETTINGS
 
hostname                = "PMC Tactical";       // 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           = "MyPassword";             // 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                 = "logs_pmc/server_console_pmc.log";
verifySignatures        = 2;
equalModRequired        = 0;    // kick if data/mods aren't equal
requiredSecureId        = 2;    // was used to define type of secureID
 
// 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[]={
"PMC Tactical",
"http://www.pmctactical.org/",
"Enjoy"
};
motdInterval            = 30;   // Time interval (in seconds) between each message
 
// JOINING RULES
maxPlayers              = 32;   // Maximum amount of players. Civilians and watchers, beholder, bystanders and so on also count as player.
kickDuplicate           = 1;    // Each ArmA version has its own ID. If kickDuplicate is set to 1, a player will be kicked
//requiredBuild         = 12345 // Require clients joining to have at least build 12345 of game, preventing obsolete clients to connect
 
// 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         = 11;   // supports range 1-30 //8kHz is 0-10 (narrowband), 16kHz is 11-20 (wideband), 32kHz is 21-30 (ultrawideband)
persistent              = 1;    // If 1, missions still run on even after the last player disconnected.
timeStampFormat         = "full";       // Set the timestamp format used on each report line in server-side RPT file. Possible values are "none" (default),"short","full".
BattlEye                = 1;    // Server to use BattlEye system
allowedLoadFileExtensions[] = {"txt", "hpp"};   // only allow files with ".txt" and ".hpp" extension to be loaded via loadFile command (since Arma 3 1.19.124216)
 
localClient[]           = {127.0.0.1};  // To indicate clients with unlimited bandwidth
 
// 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         = "";

pmc.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;
            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;
        };
        skillFriendly=0.6;
        skillEnemy=0.6;
        precisionFriendly=0.28;
        precisionEnemy=0.28;
    };
};
 
difficulty="veteran";

This is the server starting script, with this you start, stop and check the server status. This is key for getting your server up (or down heh).

pmc-arma3-server:

#!/bin/bash
#
#=======================================================================
#========               CONFIGURATION PARAMETERS                ========
#======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ========
#=======================================================================
ARMA_DIR=/home/<NAME>/arma3
CONFIG=pmc.cfg
PORT=2502
NAME=pmc
PIDFILE=${ARMA_DIR}/${PORT}.pid
RUNFILE=${ARMA_DIR}/${PORT}.run
LOGFILE=${ARMA_DIR}/logs_pmc/log.pmc.${PORT}.txt
SERVER=${ARMA_DIR}/arma3server
OTHERPARAMS="-cpucount=2"
#=======================================================================
ulimit -c 1000000
 
case "$1" in
 
 
    start)
        if [ -f ${RUNFILE} ]; then
            $0 stop
        fi
        echo "Starting ArmA 3 server..."
        # file to mark we want server running...
        echo "go" >${RUNFILE}
        # launch the background watchdog process to run the server
        nohup </dev/null >/dev/null $0 watchdog &
        ;;
 
    stop)
        echo "Stopping ArmA 3 server..."
        if [ -f ${RUNFILE} ]; then
        # ask watcher process to exit by deleting its runfile...
            rm -f ${RUNFILE}
        fi
        # and terminate ArmA 3 server process
        if [ -f ${PIDFILE} ]; then
            kill -TERM $(< ${PIDFILE})
            if [ -f ${PIDFILE} ]; then
                rm -f ${PIDFILE}
            fi
        fi
        ;;
 
    status)
        if [ -f ${RUNFILE} ]; then
            echo "Server should be running..."
        else
            echo "Server should not be running..."
        fi
        if [ -f ${PIDFILE} ]; then
            PID=$(< ${PIDFILE})
            echo "PID file exists (PID=${PID})..."
            if [ -f /proc/${PID}/cmdline ]; then
                echo "Server process seems to be running..."
            fi
                echo "Server process seems to be running..."
            fi
        fi
        ;;
 
    check)
        echo -n "ArmA 3 directory: ${ARMA_DIR} "
        if [ -d ${ARMA_DIR} ]; then
            echo "OK"
        else
            echo "MISSING!"
        fi
 
        echo -n "Server executable: ${SERVER} "
        if [ -x ${SERVER} ]; then
            echo "OK"
        else
            echo "ERROR!"
        fi
 
        echo "Port number: ${PORT}"
 
        echo -n "Config file: ${CONFIG} "
        if [ -f ${CONFIG} ]; then
            echo "OK"
        else
            echo "MISSING!"
        fi
 
        echo "PID file: ${PIDFILE}"
        echo "RUN file: ${RUNFILE}"
 
        ;;
 
    restart)
        $0 stop
        $0 start
        ;;
 
    watchdog)
        # this is a background watchdog process. Do not start directly
        while [ -f ${RUNFILE} ]; do
        # launch the server...
            cd ${ARMA_DIR}
            echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Starting server (port ${PORT})..."
            ${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -name=${NAME} -port=${PORT} -pid=${PIDFILE} ${OTHERPARAMS}
            if [ -f ${RUNFILE} ]; then
                echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server died, waiting to restart..."
                sleep 5s
            else
                echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server shutdown intentional, watchdog terminating"
            fi
        done
        ;;
    *)
        echo "$0 (start|stop|restart|status|check)"
        ;;
esac

Here you also replace <NAME> with whatever directory you are using. Also note the “logs_pmc/” directory this example uses, you should change this to what directory you prefer.

All done. Hopefully this tutorial was helpful :)

Note: You don't have to refresh linux dedicated server with admin #missions command after you have uploaded new missions, they show up immediately.

arma3/linux-dedicated-server-steam-install.txt · Last modified: 2016-11-13 05:11 by snakeman