ARK: Survival Evolved Wiki
Advertisement
This page discusses the installation and configuration of a dedicated ARK server. Refer to ARK Server Providers for a list of providers that rent ready-to-use servers.

Prerequisites

The server has been tested on Ubuntu 14.04[1] and should also support any Windows host where the prerequisites found in _CommonRedist can be installed.

Hardware

The server requires at least 6GB of RAM to start. Memory requirements increase as the number of connected players increases.

Network

The server listens for incoming UDP connections on the ports listed below. Ensure your network configuration allows incoming connections to these ports and directs them to the host that will be running your dedicated server.

Port Purpose
27015 Query port for Steam's server browser
7777 Game client port

Linux Prerequisites

Libraries

The game server requires glibc 2.14 or greater. Ubuntu 14.04 (and newer) and Debian 8 (Jessie) satisfy this requirement automatically, but older versions, such as Debian 7 (Wheezy), do not. To install the required version of glibc on a Debian 7 (Wheezy) host:

  1. Add the following lines to /etc/apt/sources.list:
    # Experimental/unstable (sid) repositories
    deb http://ftp.debian.org/debian experimental main
    deb http://ftp.debian.org/debian sid main
  2. To update the host's available packages list and install the updated glibc library package, run the following commands via sudo or a root shell:
    apt-get update
    apt-get -t experimental install libc6-dev

Note: this procedure does not upgrade the host to Debian Unstable (sid); only glibc itself and any packages it depends upon are updated.

For other older distributions that don't include glibc 2.14 or newer, refer to the distribution's documentation and support forums for guidance.

Open Files Limit

Note: This section doesn't apply if you'll be using systemd to launch the dedicated server (as described below in #Automatic Startup), as it can set this limit at runtime.

To ensure that the host's open files limit is high enough to support the game server:

  1. Add the following lines to /etc/sysctl.conf:
    fs.file-max=100000

    then run the following command via sudo or a root shell to apply the change:

    $ sysctl -p /etc/sysctl.conf
  2. Add the following lines to /etc/security/limits.conf:
    *               soft    nofile          1000000
    *               hard    nofile          1000000
  3. Add the following line to /etc/pam.d/common-session:
    session required pam_limits.so

Warning: Without these changes, the game server may not successfully launch. If the server appears to start, but uses a high amount of CPU time without using at least 5.5GB of RAM, it hasn't been able to open all the files it needs and the above change should be applied.

SteamCMD

The dedicated server is available for both Linux and Windows platforms. For both platforms, SteamCMD is used to download the server files. Refer to that page for detailed instructions on its installation and usage; the instructions included in the steps below are deliberately concise for space considerations.

Server Installation

  1. Install SteamCMD on your host.
  2. Create a folder to house the server files on a volume with at least 20GB of free disk space. The server files consume about 16GB of space, but it's wise to plan for saves and future content updates which will consume additional space.
  3. Launch SteamCMD on your host and use it to download the server files. Note that the Steam App ID is different for both the Linux and Windows versions of the files. For Linux:

    Steam> login anonymous
    Steam> force_install_dir <install_dir>
    Steam> app_update 376030 validate
    Steam> quit

    For Windows:

    Steam> login anonymous
    Steam> force_install_dir <install_dir>
    Steam> app_update 346110 validate
    Steam> quit

    In both examples, replace <install_dir> with the full path to the folder created in Step 2. On Linux, this will be a path like /home/steam/servers/ark. On Windows, this will be a path like c:\arkserver.

  4. (Windows only) Install the DirectX and Visual Studio 2013 Redistributable Runtime packages included with the ARK dedicated server files (in the _CommonRedist folder where the files were downloaded).
  5. Create a script to launch the server with your desired options and settings. For simplicity's sake, place it in the same folder where the server files were downloaded. On Windows, this is a batch file; on Linux, this is a shell script. Examples are provided below. For both platforms, the server options are specified with the same basic syntax.

    For Windows, create start_server.bat:

    start ShooterGameServer "TheIsland?listen?SessionName=<server_name>?ServerPassword=<join_password>?ServerAdminPassword=<admin_password>"
    exit
    

    For Linux, create server_start.sh:

    #!/bin/bash
    ./ShooterGameServer TheIsland?listen?SessionName=<server_name>?ServerPassword=<join_password>?ServerAdminPassword=<admin_password> -server -log
    

    On Linux, after creating the script, make it executable:

    $ chmod +x server_start.sh

    In both of these examples, replace <server_name> with the desired name for your server, <join_password> with whatever password players must provide to join your server and <admin_password> with the password that must be provided to gain administrator access to the server. If no player join password is desired, remove the entire option from the list (including the ?ServerPassword= parameter itself).

  6. Finally, to launch the server, run the script created in the previous step.

Automatic Startup

Linux (via systemd)

As an alternative to using a script to launch the dedicated server manually, hosts running systemd can be configured to automatically start the dedicated server when the system boots. When using this method to manage the server, using GameUserSettings.ini to specify its settings is highly recommended. Refer to Admin Game Commands for more information.

  1. Create a file named /etc/systemd/system/ark-dedicated.service with the following contents:
    [Unit]
    Description=ARK: Survival Evolved dedicated server
    Wants=network-online.target
    After=syslog.target network.target nss-lookup.target network-online.target
    
    [Service]
    ExecStart=/home/steam/servers/ark/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland?listen?SessionName=<SESSION_NAME> -server -log
    LimitNOFILE=100000
    ExecReload=/bin/kill -s HUP $MAINPID
    ExecStop=/bin/kill -s QUIT $MAINPID
    User=steam
    Group=steam
    
    [Install]
    WantedBy=multi-user.target

    The ExecStart line specifies the command to run in order to start the service. It uses the same syntax as the startup examples shown above (in #Server Installation), with all the same arguments, but here it's important to adjust it to reflect the location of your ARK dedicated server on the host. Use the full path to the server executable, as shown above.

    Be sure to replace <SESSION_NAME> with the desired session name for your server as well.

    Finally, adjust the User and Group settings for your host. Without these two options in ark-dedicated.service, the dedicated server will be run as the root user. This is unsafe, as any vulnerability in the dedicated server could result in an attacker gaining remote superuser access on the host.

    It's recommended to run the dedicated server in an unprivileged account used solely for this purpose. In the example above, the user account "steam" is used. It's a member of the "steam" group, which is generally created along with the account.

  2. Activate the new service so it starts automatically when the host boots by running the following command via sudo or a root shell:
    # systemctl enable ark-dedicated

    After running this command, the dedicated server will automatically start when the host does. The command doesn't start the server immediately, so to launch the dedicated server after enabling it, run:

    # systemctl start ark-dedicated

After following these steps, your server should be up and running, and be automatically managed by the host on startup and shutdown.

Post-Setup Management

The server can be stopped by running:

# systemctl stop ark-dedicated

and its current status can be viewed (whether it's running or not) by running:

# systemctl status ark-dedicated

Note: If you need to update the ark-dedicated.service file (to change the dedicated server's startup options or to adjust its path), run the following command to ensure your changes are applied:

# systemctl daemon-reload

Updating

To update the server when a new version is released, repeat the same SteamCMD commands shown in the previous section. Be sure to use the correct set of commands for your platform. Refer to SteamCMD's documentation for details on automating this process.

SteamCMD provides additional tools to make installation and updates easier and more seamless.

Console Commands

While running the game, the command console can be accessed with either the [~] (tilde) or [TAB] keys (depending on game version, default configuration and your keyboard layout). Once in the console, to activate administrator commands, enter:

enablecheats <admin_password>

Replace <admin_password> with the server's administrator password.

Refer to Admin Game Commands for a list of available commands.

If the console can't be opened in-game, exit the game, open the game's DefaultInput.ini file (located in your Steam library in the folder named steamapps\common\ARK\ShooterGame\Config) with a text editor and locate the line (near the bottom of the file) that reads:

;+ConsoleKeys=Tab

Remove the semicolon (;), changing the line to read:

+ConsoleKeys=Tab

Save the file and launch the game. The console should be accessible.

Backing Up Server Data

To make a backup of the server's data, simply copy the folder named ShooterGame/Saved (and its contents) to the desired backup location. This folder contains all tribe, player and world data for the server.

Performing a backup is recommended before updating a server to a new release.

Troubleshooting

Server Loses Characters or World Data Upon Restart

If your server isn't retaining characters or world data when it's restarted, it may not have full access to the folder where it's installed.

The first time the server is run, it should create a folder named ShooterGame/Saved containing various configuration and save files. If the server has run at least once but hasn't created this folder, it may not have been able to create new folders and files there. Verify that the folder where the server is installed is readable and writable by the user account that actually runs the server. (For Windows servers, check the status of User Account Control)

The server software is set-up to automaticly back up world data every 15 minutes. If your server crashes before the first 15 minutes are up, you will not have any data saved.

Linux Server Exhibits High CPU Usage and Low Memory Usage (Below 1GB)

This can occur when the server can't open all the files it needs due to an insufficient open files limit on the host. Refer to the Linux section above and follow the procedure to increase the host's open files limit.

Notes


References

External Links

Advertisement