Rough guide to setting up a dedicated CentOS ARK: Survival Evolved server

Warning: unfinished

This is a rough guide for setting up a CentOS 7.* based server for ARK: Survival Evolved. It assumes you are familiar with SSH and are using Virtualmin for managing the server, although it requires minimal changes to use with a different setup.

We'll install the server using LinuxGSM to make managing it easy. See their page on LGSM for ARK for more info.

Create a user for the game server

As mentioned, I'm using Virtualmin to manage my server, so I'll go ahead and create a new Virtual site for the server so that it has a web-page that users can connect from, as well as setting up user and groups easily.

  • Create a new Virtual Site at the domain/subdomain you want: eg: ark.mydomain.com
  • Following commands assume username ark from now on

Update sysctl.conf to allow more files to be open:

By default CentOS won't allow the ARK server to open the number of files needed. We can change this by making some adjustments to the system.

Source: https://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/

Change the limit, and make it permanent:

sudo sysctl -w fs.file-max=100000
sudo vi /etc/sysctl.conf

This will open sysctl.conf in Vi. Append the following line to the end of the file:

fs.file-max = 100000

Save and close the file. In Vi this is done by pressing Esc and typing :wq, followed by Enter. Users will need to re-log for changes take effect, or just type the following command:

sudo sysctl -p

Verify your settings have taken affect with this command:

sysctl fs.file-max

Now we need to increase the hard and soft limits for the user we created:

sudo vi /etc/security/limits.conf

Add in the following entries, adjust your username as appropriate:

ark soft nofile 100000
ark hard nofile 100000

Give the account the right permissions

From a sudo/root account, give the ark user sudo priveledges:

sudo usermod -aG wheel ark

On CentOS, if adding the user to the group does not work immediately, you may have to edit the /etc/sudoers file to uncomment the group name:

sudo visudo

Find and ensure the following is not commented out:

%wheel ALL=(ALL) ALL

Setup SteamCMD

Now we want to make a directory for the SteamCMD client and download it. From our ark home ~/:

mkdir ~/steam && cd ~/steam
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
chmod +x ./steamcmd.sh

Before we run Steam, we're going to open all the ports required for it, as well as the extra ports needed by the ARK server:

sudo firewall-cmd --zone=public --add-port=27015/tcp --permanent
sudo firewall-cmd --zone=public --add-port=27015/udp --permanent
sudo firewall-cmd --zone=public --add-port=27016/tcp --permanent
sudo firewall-cmd --zone=public --add-port=27016/udp --permanent
sudo firewall-cmd --zone=public --add-port=27020/tcp --permanent
sudo firewall-cmd --zone=public --add-port=7777/udp --permanent
sudo firewall-cmd --zone=public --add-port=7778/tcp --permanent
sudo firewall-cmd --zone=public --add-port=7778/udp --permanent
sudo firewall-cmd --zone=public --add-port=32330/tcp --permanent
sudo firewall-cmd --reload

Run steam once to set it up:

./steamcmd.sh

Once that's done we're going to install the ARK server itself. We're going to use LinuxGSM to do this.

Installing LinuxGSM

LinuxGSM has some dependencies. One of thee is Postfix which you may already have installed if you're using Virtualmin. Go ahead and run the following command to make sure we have everything we need:

sudo yum install mailx postfix curl wget bzip2 gzip unzip python binutils bc jq tmux glibc.i686 libstdc++ libstdc++.i686

Once the dependencies are installed we can go ahead and wget the install script and make it executable

mkdir ~/ark_install && cd ~/ark_install 
wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh arkserver

Now that LinuxGSM is installed lets use it to setup the ARK server.

./arkserver install

Wait patiently. This can take some time. Once it has installed, you need to configure it.

Configuring LinuxGSM

The main game configuration files are located at:

  • serverfiles/ShooterGame/Saved/Config/LinuxServer/Game.ini
  • serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini

Adjust these as you see fit, notes on the various settings are available on the Ark Wiki and there is also this config generator.

You will also need to copy the file located at lgsm/config-lgsm/arkserver/_default.cfg to a new file in the same directory called arkserver.cfg.

Do not edit the _default.cfg file, as this will be over-written. Instead make sure you copy this file and make your changes there.

If you want LinuxGSM to manage your mods this will need a few things. Examples of these can be seen in the sample config files linked below.

  • Add -automanagedmods to the end of the startup parameters in arkserver.cfg.
  • Add ActiveMods=633215081,731604991,... to GameUserSettings.ini
  • Add the following to the bottom of Game.ini:
    [ModInstaller]
    ModIDS=633215081
    ModIDS=731604991

Sample config files:

Here are the config files I use for running a Ragnarok server:

Game.ini GameUserSettings.ini arkserver.cfg

Notes on these config files:

  • Player and Dino max level set to 1000
  • Roughly 50x the normal rates. That includes XP rewards, Taming Speeds and resources.
  • Halved the resource respawn delay
  • Tamed dinos do triple damage, have triple resistance
  • Reduced the StructurePreventResourceRadiusMultiplier to 0.25
  • The day/night cycle has been adjusted so that a full cycle takes 1 hour, with the night lasting for apprimately 10 minutes.
  • Cave flying is enabled, as is Cave Building.
  • Water and Food drains set to half the default amount.
  • Difficulty is set to 0.5
  • Autosaves every 15 minutes
  • Swim speed stats doubled

Includes the following mods:

  • Structures Plus S+ - More flexible structures as well as useful additional automation parts.
  • Re-usable Grappling Hook - Exactly what it says on the tin. No more stacks fo grappling hooks when exploring.
  • Ultra Stacks - With 50x the normal amount of resources being spawned your chest will overflow in no time at all. This increases the default stack sizes considerably, as well as adjusting their weights.
  • Classic Flyers - Brings back speed levelling, amongst other things.

Notes on increasing resources:

There is a significant bug in ARK that can occur when increasing the Harvest Multiplier rates. It can result in harvesting with Dinos causing the entire server to lag out, making movement impossible for everyone until the server catches up. This can be heavily exploited in a PvP environment and needs some additional work to rectify.

Do not increase the HarvestAmountMultiplier or HarvestHealthMultiplier settings in GameUserSettings.ini. This will cause the bug mentioned above. Instead use the HarvestResourceItemAmountClassMultipliers setting in Game.ini for each individual resource.

Admittedly this method results in a much larger Game.ini file, although it does give you individual control of each resource's multiplier. An example Game.ini can be found here where I have set all resources in the game to spawn at 50x their default rates. This method keeps the server nice and quick and stops the potential for exploitation.

Running your server

Once you've configured your server you can run it with:

./arkmanager start

Refer to the LinuxGSM documentation for more information on controlling your server. The steps covered so far in this guide should be enough to get you started with a modded server.

Good luck!