Linux Dedicated Servers

Ark: Survival Evolved


Let's get your Ark: Survival Evolved Dedicated Server up and running on Linux! In this guide I'll be going through the steps required for those running Ubuntu 14.04, which at this time is the only version the developers have tested. For other distos the process will be similar, through for some of the specific OS modifications required, you'll have to consult the documentation for your specific flavor of Linux.

Downloading & Setting Up steamcmd.sh

The first thing you will need is steamcmd, which you should only download from the Official Valve Developer site. But before you actually download steamcmd, let's install the required dependencies:

sudo apt-get install lib32gcc1

Next we will create a directory for steamcmd and change to that directory:

mkdir ~/steamcmd
cd ~/steamcmd

Now we can actually download steamcmd an unpack the archive:

wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xvzf steamcmd_linux.tar.gz

You should now have everything you need to run steamcmd and install the server.

Installing & Updating The Ark Dedicated Server

Next we will download and install the files for the Ark Dedicated Server. Make sure you are in the directory where you installed steamcmd. Then enter the following command:

./steamcmd.sh +login anonymous +force_install_dir /home/ubuntu/arkdedicated +app_update 376030 validate +quit

Before executing the above command, please note the following: the directory shown is an example that would install the server files into the directory arkdedicated in the home directory for the user ubuntu. You will need to change that directory to your chosen installation location. If you simply want to install it into your own home directory you can replace ubuntu with your username.

What that command does is login to Steam anonymously, set the installation directory and the download, and validate the files for the Ark Dedicated Server.

Raising The Open File Limit

This is where it can get painful, and this process can differ, dependending on your flavor of Linux. The example here is for Ubuntu. To get the Ark Dedicated Server running you need to raise the max number of open files to 100000. Yes, that's a ton. But it is necessary.

Be aware that 99% of the server start-up problems people are having occur because this is not done correctly. Also be aware that some users are stating that they needed to set 200000 or even 500000, depending on how many other game servers or instances they are running.

First edit the file /etc/sysctl.conf and change or add the following line:

fs.file-max=100000

Next you need to edit the file /etc/security/limits.conf and set the limits to the same value you used in the previous step. Change or add the following lines as necessary:

* soft nofile 100000
* hard nofile 100000

The final setp is to edit the file /etc/pam.d/common-session and then add or edit the following line:

session required pam_limits.so

At this point you should restart the computer, so that all of the changes are applied correctly. Once you have restarted the computer, open a terminal window and enter the following command:

ulimit -a

What you want to check is where it says Open Files and make sure it says 100000, or the value you used in the steps above if you changed it to something higher.

Starting Up The Server

At this point we just need to add one little script that will make server start-up easier. In a terminal window, change to the following directory:

cd /home/ubuntu/arkdedicated/ShooterGame/Binaries/Linux
nano startserver.sh

Those two commands will place you into the directory in which you installed the ark server, and create a file in nano in that directory so that you can edit it. Remember to change the path to the directory in which you installed your server!

Paste the following text into the file:

ulimit -n 100000
./ShooterGameServer TheIsland?listen -server -log

The line ulimit -n 100000 makes sure that the open files limit is set correctly. If you have used a higher value, then you must put that value instead of the one in the example. The second line executes the server.

Now all you have to do is make that script executable with the following command and then execute it:

chmod a+x startserver.sh
./startserver.sh

Yuo only need to use the first line once. It sets your new script so that it is executable. The second line is the one that you will use to launch your server. There really is no need for additional parameters, as these are easier and simply better to setup in the configuration file.

Opening Firewall Ports

To connect to your server you'll need to open the firewall ports. By default Ubuntu is completely locked down, which is a good thing. At this time it is still unclear if you only need TCP or if you also need UDP. These commands will open your ports:

iptables -A INPUT -p tcp --dport 27015 -j ACCEPT
iptables -A INPUT -p udp --dport 27015 -j ACCEPT
iptables -A INPUT -p tcp --dport 7777 -j ACCEPT
iptables -A INPUT -p udp --dport 7777 -j ACCEPT

You will also need to setup port forwarding on your router so that people can connect to your server. This process varies depending on your router. Make sure you forward both ports, and both UDP & TCP, to your Linux server.

Important! Minor Glitch Errors & Saving Worlds!

Ok, so at this time this thing is still a bit twitchy in appearance. You may get the following, including the error:

Using binned.
4.5.1-0+UE4 7038 3077 402 3
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 346110

This is about all you will ever see in this console for now. The error can mean one of two things. First, you haven't setup the open file limit properly. If you have, then ignore the error. At this time the error can be cause by the file limit being too low, or the fact that it shouldn't even be making that call in the first place. Remember, right now it's an Alpha Early Access release.

However, even with that error on the screen, if your file limits are set right, and your ports are open, you should be good to go. For now the only way to really tell if the server is up and running, other than logging in with the game client, is to look at system performance and the memory used by the server. Yeah... I know how that sounds, but right now that is just where it is at.

In Ubuntu you'll want to open the System Monitor. Look for ShooterGameServer and if it's eating 3+ GB ofRAM, then it should be up and running. Do keep in mind that right now I've seen this server take over 20 minutes to be up and responding. Give it time. Tons of it. They have been making massive improvements in the boot speed of the server, so it should be up much faster.

The previous issues with linux autosaving on exit seem to have been corrected. Also be aware that the server now autosaves every 15 minutes.

Save yourself endless misery with the following in game commands to force the server to save. For this you will need your ServerAdminPassword and you'll have to enter the following cheat commands:
(they are admin commands, but they call them cheat commands... go figure!)

enablecheats <password>
admincheat save

Server Save & Config Files

If you would like to back-up or restore your server's save files you can find them in the server directory here:
(change the beginning of the path to point to your Ark Server's root folder!)

/home/ubuntu/arkserver/ShooterGame/Saved/SavedArks/

The settings for your server are stored in GameUserSettings.ini and this file can be located in one of the two following directories:

/home/ubuntu/arkserver/ShooterGame/Saved/Config/LinuxServer/
/home/ubuntu/arkserver/ShooterGame/Saved/Config/WindowsServer/

Importing Existing Config & Save Files

For the save files, simply copy over the folder SaveArks. And for the config files you'll only want GameUserSettings.ini. In both cases simply replace the files with the ones you want.

Warning: On Linux-based systems you must check ownership of these files after you copy them over. If the ownership on these files is not the same as the ownership of the rest of the server files you may run into problems. Also note that before you move, replace, or even touch any of the files in the server directories you should shut down your server.

If your world loads, but doesn't save, the most likely cause is that the ownership on the save files doesn't match and the server is not able to write to them. Please make sure you double check this.