ARK: Survival Evolved Wiki
Register
m (Changes for CentOS7 Setup)
Tag: Visual edit
m (clean up)
(48 intermediate revisions by 32 users not shown)
Line 1: Line 1:
 
{{cleanup}}
 
{{cleanup}}
''This page discusses the installation and configuration of a dedicated ARK server. Refer to [[Dedicated Server Providers]] for a list of providers that rent ready-to-use servers.''
+
''This page discusses the installation and configuration of a dedicated ARK server.''
   
''For scripts that you can run on your own dedicated server, see [[Dedicated Server Scripts]].''
+
''For scripts that you can run on your own dedicated server, see [[Dedicated server scripts]].''
   
 
== Prerequisites ==
 
== Prerequisites ==
Your OS '''<u>must</u>''' be a <u>64-bit</u> OS (ShooterGameServer is a 64-bit executable and as such will not run on a 32-bit install of Ubuntu or Windows). The server has been tested on [http://www.ubuntu.com/download/desktop Ubuntu 14.04]<ref name="steamcommunity_linuxpost">http://steamcommunity.com/app/346110/discussions/0/594820656471833280/</ref> and should also support any Windows host where the prerequisites found in <tt>_CommonRedist</tt> can be installed.
+
Your OS '''<u>must</u>''' be a <u>64-bit</u> OS (ShooterGameServer is a 64-bit executable and as such will not run on a 32-bit install of Ubuntu or Windows). The server has been tested on [https://ubuntu.com/download/desktop Ubuntu 14.04]<ref name="steamcommunity_linuxpost">http://steamcommunity.com/app/346110/discussions/0/594820656471833280/</ref> and should also support any Windows host where the prerequisites found in <code>_CommonRedist</code> can be installed.
   
== Hardware ==
+
=== Hardware ===
The server requires at least 6GB of RAM to start. Memory requirements increase as the number of connected players increases.
+
The server requires at least 6GB of RAM to start. Memory requirements increase as the number of connected players increases. This is also dependant on your settings/mods and configurable options. Some mods increase RAM more than others.
On Windows Server 2012 R2, the client uses 2.3GB of RAM without any clients. On Linux, the installation uses 3.2GB of RAM without any clients.
+
On Windows Server 2012 R2, the server uses 2.3GB of RAM without any clients. On Linux, the installation uses 3.2GB of RAM without any clients.
   
== Network ==
+
=== Network ===
 
The server listens for incoming 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.
 
The server listens for incoming 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.
   
Line 27: Line 27:
 
|}
 
|}
   
You can host multiple dedicated servers on the same host, however be aware that CPU and memory should be monitored carefully if they are busy servers rather than test servers.
+
You can host multiple dedicated servers on the same host, however be aware that CPU and memory should be monitored carefully if they are busy servers rather than test servers. For example:
 
For example:
 
   
 
{| class="wikitable"
 
{| class="wikitable"
Line 41: Line 39:
 
| Server game instance 3 || 7781 || 7782 || 27017 || 27022
 
| Server game instance 3 || 7781 || 7782 || 27017 || 27022
 
|-
 
|-
| Server game instance 4<br/>completly different ports || 9999 || 10000 || 37015 || 37016
+
| Server game instance 4<br/>completely different ports || 9999 || 10000 || 37015 || 37016
|-
 
 
|}
 
|}
   
  +
:'''Note:''' Query Port cannot be between 27020 and 27050 due to Steam using those ports.
== Prerequisites ==
 
   
=== Windows ===
+
=== Operating system ===
  +
==== Windows ====
   
 
Microsoft Visual C++ 2013 Redistributable (can be found in the Steam Ark game folder under _CommonRedist/vcredist/folder).
 
Microsoft Visual C++ 2013 Redistributable (can be found in the Steam Ark game folder under _CommonRedist/vcredist/folder).
Line 53: Line 51:
 
DirectX (DXSETUP, can be found in the Steam Ark game folder under _CommonRedist/DirectX/June2010/ folder).
 
DirectX (DXSETUP, can be found in the Steam Ark game folder under _CommonRedist/DirectX/June2010/ folder).
   
=== Linux ===
+
==== Linux ====
   
 
64bit Linux servers will require 32 bit binaries to install/run steamcmd.
 
64bit Linux servers will require 32 bit binaries to install/run steamcmd.
Line 63: Line 61:
   
 
<ol>
 
<ol>
<li> Add the following lines to <tt>/etc/apt/sources.list</tt>:
+
<li> Add the following lines to <code>/etc/apt/sources.list</code>:
 
<pre># Experimental/unstable (sid) repositories
 
<pre># Experimental/unstable (sid) repositories
 
deb http://ftp.debian.org/debian experimental main
 
deb http://ftp.debian.org/debian experimental main
Line 75: Line 73:
 
</ol>
 
</ol>
   
'''Note:''' this procedure does ''not'' upgrade the host to Debian Unstable (sid); only ''glibc'' itself and any packages it depends upon are updated.
+
:'''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.
 
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 ====
+
===== 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.''
+
:'''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:
 
To ensure that the host's open files limit is high enough to support the game server:
   
 
<ol>
 
<ol>
<li> Add the following lines to <tt>/etc/sysctl.conf</tt>:
+
<li> Add the following lines to <code>/etc/sysctl.conf</code>:
 
<pre>fs.file-max=100000</pre>
 
<pre>fs.file-max=100000</pre>
 
then run the following command via ''sudo'' or a root shell to apply the change:
 
then run the following command via ''sudo'' or a root shell to apply the change:
Line 91: Line 89:
 
</li>
 
</li>
   
<li> Add the following lines to <tt>/etc/security/limits.conf</tt>:
+
<li> Add the following lines to <code>/etc/security/limits.conf</code>:
 
<pre>* soft nofile 1000000
 
<pre>* soft nofile 1000000
 
* hard nofile 1000000</pre>
 
* hard nofile 1000000</pre>
 
</li>
 
</li>
   
<li> Add the following line to <tt>/etc/pam.d/common-session</tt>:
+
<li> Add the following line to <code>/etc/pam.d/common-session</code>:
 
<pre>session required pam_limits.so</pre>
 
<pre>session required pam_limits.so</pre>
 
</li>
 
</li>
 
</ol>
 
</ol>
   
'''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.
+
:'''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.
   
 
'''Tuned''' is a daemon that monitors the use of system components and dynamically tunes system settings, currently only on RHEL7, CentOS7.x and Fedora.
'''Tuned'''
 
 
is a daemon that monitors the use of system components and dynamically tunes system settings, currently only on RHEL7, CentOS7.x, and Fedora.
 
   
 
Note: You need to set tuned to „throughput-performance“. Otherwise all changes in /etc/security/limits.conf will ignored!
 
Note: You need to set tuned to „throughput-performance“. Otherwise all changes in /etc/security/limits.conf will ignored!
   
== SteamCMD ==
+
=== SteamCMD ===
 
The dedicated server is available for both Linux and Windows platforms. For both platforms, [https://developer.valvesoftware.com/wiki/SteamCMD 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.
 
The dedicated server is available for both Linux and Windows platforms. For both platforms, [https://developer.valvesoftware.com/wiki/SteamCMD 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.
   
'''Warning''': [Linux-specific | Windows: report missing] If you want to use a SSD to run the server, but your normal steam folder is on your main HDD, check the soft-links of the folders located in '.steam'
+
:'''Warning:''' [Linux-specific | Windows: report missing] If you want to use a SSD to run the server, but your normal steam folder is on your main HDD, check the soft-links of the folders located in '.steam'
   
= Server Installation =
+
== Server Installation ==
   
 
<ol>
 
<ol>
 
<li>Install ''SteamCMD'' on your host.</li>
 
<li>Install ''SteamCMD'' on your host.</li>
<li>Create a folder to house the server files on a volume with at least 15GB of free disk space. The server files consume about 7.5GB of space (Sep 2016), but it's wise to plan for saves and future content updates which will consume additional space.</li>
+
<li>Create a folder to house the server files on a volume with at least 15GB of free disk space. The server files consume about 10.4GB of space (Feb 2020 after Genesis 1 launch), but it's wise to plan for saves and future content updates which will consume additional space.</li>
 
<li>Launch ''SteamCMD'' on your host and use it to download the server files. (Remove the < > and replace them with double quotes, for example, force_install_dir "C:\Program Files (x86)\Ark Server")
 
<li>Launch ''SteamCMD'' on your host and use it to download the server files. (Remove the < > and replace them with double quotes, for example, force_install_dir "C:\Program Files (x86)\Ark Server")
  +
<li>
<li><p>Use app id 376030 for Survival Evolved or use 445400 for Survival of The Fittest
 
  +
 
Use app id 376030 for Survival Evolved or use 445400 for Survival of The Fittest.
   
 
<pre>Steam> login anonymous
 
<pre>Steam> login anonymous
Steam> force_install_dir &lt;install_dir&gt;
+
Steam> force_install_dir <install_dir>
 
Steam> app_update 376030 validate
 
Steam> app_update 376030 validate
Steam> exit</pre></p>
+
Steam> exit</pre>
</li></li><li>'''OR''', run from command line:<pre>steamcmd +login anonymous +force_install_dir <install_dir> +app_update 376030 +quit</pre>
 
   
<p>Replace '''<tt>&lt;install_dir&gt;</tt>''' with the full path to the folder created in Step 2. On Linux, this will be a path like <tt>/home/steam/servers/ark</tt>. On Windows, this will be a path like <tt>c:\arkserver</tt>.</p></li>
 
   
 
</li><li>'''Or''', run from command line:<pre>steamcmd +login anonymous +force_install_dir <install_dir> +app_update 376030 +quit</pre>
<li><p>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.</p>
 
   
<p>For Windows, create <tt>start_server.bat</tt>: and place it in '''YOUR_ARK_SERVER_FOLDER'''/ShooterGame/Binaries/Win64/ (remove the '<' '>' symbols!)
 
   
  +
<pre>start ShooterGameServer.exe TheIsland?listen?SessionName=&lt;server_name&gt;?ServerPassword=&lt;join_password&gt;?ServerAdminPassword=&lt;admin_password&gt;?Port=<port>?QueryPort=<query_port>?MaxPlayers=<max_players>
 
 
Replace '''<code><install_dir></code>''' with the full path to the folder created in Step 2. On Linux, this will be a path like <code>/home/steam/servers/ark</code>. On Windows, this will be a path like <code>c:\arkserver</code>.
  +
  +
</li>
  +
  +
<li>
  +
 
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 <code>start_server.bat</code> and place it in '''YOUR_ARK_SERVER_FOLDER'''/ShooterGame/Binaries/Win64/ (remove the '<' '>' symbols!)
  +
 
<pre>start ShooterGameServer.exe TheIsland?listen?SessionName=<server_name>?ServerPassword=<join_password>?ServerAdminPassword=<admin_password>?Port=<port>?QueryPort=<query_port>?MaxPlayers=<max_players>
 
exit
 
exit
</pre></p>
+
</pre>
   
  +
<p>For Linux, create <tt>server_start.sh</tt>: (remove the '<' '>' symbols!)
 
  +
  +
  +
 
For Linux, create <code>server_start.sh</code> and place it in '''YOUR_ARK_SERVER_FOLDER'''/ShooterGame/Binaries/Linux/ (remove the '<' '>' symbols!)
   
 
<pre>
 
<pre>
 
#! /bin/bash
 
#! /bin/bash
./ShooterGameServer TheIsland?listen?SessionName=&lt;server_name&gt;?ServerPassword=&lt;join_password&gt;?ServerAdminPassword=&lt;admin_password&gt; -server -log
+
./ShooterGameServer TheIsland?listen?SessionName=<server_name>?ServerPassword=<join_password>?ServerAdminPassword=<admin_password> -server -log
</pre></p>
+
</pre>
  +
  +
  +
  +
  +
 
On Linux, after creating the script, make it executable:
  +
 
<pre>$ chmod +x server_start.sh</pre>
  +
  +
  +
  +
   
 
In both of these examples, replace '''<code><server_name></code>''' with the desired name for your server, '''<code><join_password></code>''' with whatever password players must provide to join your server and '''<code><admin_password></code>''' 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 '''<code>?ServerPassword=</code>''' parameter itself).
<p>On Linux, after creating the script, make it executable:
 
   
<pre>$ chmod +x server_start.sh</pre></p>
 
   
<p>In both of these examples, replace '''<tt>&lt;server_name&gt;</tt>''' with the desired name for your server, '''<tt>&lt;join_password&gt;</tt>''' with whatever password players must provide to join your server and '''<tt>&lt;admin_password&gt;</tt>''' 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 '''<tt>?ServerPassword=</tt>''' parameter itself).</p>
 
 
</li>
 
</li>
   
Line 155: Line 179:
 
</ol>
 
</ol>
   
  +
=== Run a Beta Branch ===
= Port Forwarding and Firewall =
 
  +
  +
Sometimes events are not implemented in the main game but into a so called branch. To run this event you change to this branch.
  +
  +
Add -beta with the branch name to the app_update command, like
  +
  +
Steam> app_update 376030 -beta branchname validate
  +
  +
Additionally start the server with <code>-branchname</code>.
  +
  +
Of course change the branchname to whatever the name of the branch is. When the event is or should be finished, just remove the additions.
  +
 
== Port Forwarding and Firewall ==
 
For your server to become visible in both the Ark server lists and the Steam lists, do the following:
 
For your server to become visible in both the Ark server lists and the Steam lists, do the following:
   
== Windows (Firewall and Allow Rules) ==
+
=== Windows (Firewall and Allow Rules) ===
# If you're on Windows 10, click on the search box in the lower left corner and type in "Firewall". Click on "Windows Firewall".
+
# If you're on Windows 10, click on the search box in the lower left corner and type in "wf.msc" without the quotes. Click the "Run as administrator" option.
# Once Firewall opens, click "Advanced settings" on the left panel.
 
 
# Click "Inbound Rules" on the left panel, then click "New Rule..." on the right panel.
 
# Click "Inbound Rules" on the left panel, then click "New Rule..." on the right panel.
# When the New Inbound Rule Wizard opens up, select Port, then next.
+
# When the New Inbound Rule Wizard opens up, select Port, then Next.
# The setup will now ask you if you want to allow TCP or UDP, and what port it will be. Select TCP. Then, make sure you have "Specific local ports" selected and then put the port you plan to forward into the box (default 27020 for RCON).
+
# The wizard will present options for choosing the protocol and specifying ports. Leave the default selection of the TCP protocol and "Specific local ports". List the ports you plan to forward into the box (default 27020 for RCON). Use a comma to separate multiple ports. Select Next to continue.
# Select "Allow the connection", and continue with the wizard.
+
# Select "Allow the connection" and continue with the wizard.
 
# Make sure all of the boxes are selected for where the rule applies.
 
# Make sure all of the boxes are selected for where the rule applies.
# Enter a name (required) and a description (optional).
+
# Enter a name (required) and a description (optional). It is recommended to append the protocol (TCP or UDP) to the rule name.
# Repeat these steps, but instead of allowing TCP allow UDP. Make sure to enter your steam browser/query port (27015 default) and game port (7777 default). You also need the raw udp socket port (7778 default, always your game port +1) if using ?bRawSockets.
+
# Repeat these steps, but choose UDP on the "Protocol and Ports" page. Make sure to enter your steam browser/query port (27015 default) and game port (7777 default). You also need the raw udp socket port (7778 default, always your game port +1) if using ?bRawSockets.
# You should have 3 port rules now in the Inbound Rules section.
+
# When finished, you should have a rule for TCP and a rule for UDP in the Inbound Rules section.
 
# This section and the port forwarding section go hand in hand.
 
# This section and the port forwarding section go hand in hand.
# Close the advanced firewall window, and open Windows Firewall again.
+
# Close the advanced firewall window and open Windows Firewall again.
 
# Click "Allow an app or feature through Windows Firewall". Scroll down to ShooterGame. Make sure all apps named ShooterGame have the Private and Public boxes checked.
 
# Click "Allow an app or feature through Windows Firewall". Scroll down to ShooterGame. Make sure all apps named ShooterGame have the Private and Public boxes checked.
# You're done, and if your ports don't work when you forward them, you can edit your Firewall inbound rules by going back to the advanced tab, selecting the Inbound Rules tab, right-clicking the rules you created, then clicking properties.
+
# You're done. If your ports don't work when you forward them, you can edit your Firewall inbound rules by going back to the advanced tab, selecting the Inbound Rules tab, right-clicking the rules you created, then clicking properties.
   
== OS X (firewall application) ==
+
=== OS X (firewall application) ===
 
Input needed.
 
Input needed.
   
== Linux ==
+
=== Linux ===
 
For most Linux distros, if there is a firewall at all it will be iptables based. Most modern distributions will use a different interface, it's a good idea to use that instead of direct iptables commands.
 
For most Linux distros, if there is a firewall at all it will be iptables based. Most modern distributions will use a different interface, it's a good idea to use that instead of direct iptables commands.
   
All firewall changes must be made either as root or with sudo. These open ports 7777 7778 and 27015 for UDP and optionally 27020 for TCP. You may want to adjust the list of ports you need by editing the "for port in..." line.
+
All firewall changes must be made either as root or with sudo. These open ports 7777 7778 and 27015 for UDP and optionally 27020 for TCP. You may want to adjust the list of ports you need by editing the "for port in..." line.
   
=== UFW ===
+
==== UFW ====
 
This script will open the ports in a way that will persist across reboots. UFW is the firewall on Ubuntu
 
This script will open the ports in a way that will persist across reboots. UFW is the firewall on Ubuntu
 
<pre>
 
<pre>
Line 197: Line 232:
 
</pre>
 
</pre>
   
=== FirewallD ===
+
==== FirewallD ====
This script will open the ports in a way that will persist across reboots. FirewallD is the firewall on RHEL7, CentOS7.x, and Fedora.
+
This script will open the ports in a way that will persist across reboots. FirewallD is the firewall on RHEL7, CentOS7.x and Fedora.
 
<pre>
 
<pre>
 
#!/bin/sh
 
#!/bin/sh
Line 213: Line 248:
 
</pre>
 
</pre>
   
=== iptables ===
+
==== iptables ====
Keep in mind that this is only a temporary solution, and should only be used if neither of the other scripts apply for your system. To make it safe for reboots see the documentation of your distribution, how to add firewall ports to the existing configuration files - or how to add scripts to the boot process.
+
Keep in mind that this is only a temporary solution and should only be used if neither of the other scripts apply for your system. To make it safe for reboots see the documentation of your distribution, how to add firewall ports to the existing configuration files - or how to add scripts to the boot process.
 
<pre>
 
<pre>
 
#!/bin/sh
 
#!/bin/sh
Line 228: Line 263:
 
</pre>
 
</pre>
   
== Port Forwarding ==
+
=== Port Forwarding ===
 
There are many websites with tutorials on port forwarding. It is highly suggested you visit portforward.com, which offers tutorials for the majority of routers.
 
There are many websites with tutorials on port forwarding. It is highly suggested you visit portforward.com, which offers tutorials for the majority of routers.
   
What ports work depends on you. Try forwarding 27015 as the port, and 27016 as the query port. 27015, 27016, and 7777 are the most common ports that work.
+
What ports work depends on you. Try forwarding 27015 as the port and 27016 as the query port. 27015, 27016 and 7777 are the most common ports that work.
   
You <u>'''MUST'''</u> forward both TCP and UDP for your server to show up on any lists. You can make sure your ports are open by using the tool from portforward.com, that is, after you
+
You <u>'''must'''</u> forward both TCP and UDP for your server to show up on any lists. You can make sure your ports are open by using the tool from portforward.com, that is, after you enter the ports that you have forwarded in the start_server.bat file you should have created earlier.
   
 
For example, start ShooterGameServer.exe TheIsland?listen?SessionName=<server_name>?ServerPassword=<join_password>?ServerAdminPassword=<admin_password>?Port=7777?QueryPort=27015?MaxPlayers=<max_players></max_players>
Enter the ports that you have forwarded in the start_server.bat file you should have created earlier. For example,
 
 
start ShooterGameServer.exe TheIsland?listen?SessionName=&lt;server_name&gt;?ServerPassword=&lt;join_password&gt;?ServerAdminPassword=&lt;admin_password&gt;?Port=7777?QueryPort=27015?MaxPlayers=<max_players>
 
   
 
Good luck, port forwarding is not very easy.
 
Good luck, port forwarding is not very easy.
   
== Finding Your Server in Lists ==
+
=== Finding Your Server in Lists ===
You can access your server via the Steam servers list or the Ark unofficial list. Just search for you name in the Ark list, or find your IP address in the Steam server list.
+
You can access your server via the Steam servers list or the Ark unofficial list. Just search for your name in the Ark list, or find your IP address in the Steam server list. It is best to add your servers IP:PORT to your Steam favorites and joining using the 'favorites' tab in game. The in game list has a limit on the servers it will show at one time. There is no guarantee your server will appear in the unofficial lists all the time.
   
 
Good luck!
 
Good luck!
   
= Automatic Startup =
+
== Automatic Startup ==
 
=== Windows (via Scheduled Task) ===
 
 
You can configure a scheduled task to automatically run a batch file and start the dedicated server when the system boots.
== Windows (via Scheduled Task) ==
 
You can configure a scheduled task to automatically run a batch file and start the dedicated server when the system boots.
 
 
<ol>
 
<ol>
 
<li>Open 'Task Scheduler'</li>
 
<li>Open 'Task Scheduler'</li>
Line 263: Line 295:
 
</ol>
 
</ol>
   
== Linux (via ''systemd'') ==
+
=== Linux (via ''systemd'') ===
'''NOTE: systemd is not available for Ubuntu 14.04'''
+
:'''Note:''' systemd is not available for Ubuntu 14.04.
   
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 <tt>GameUserSettings.ini</tt> to specify its settings is highly recommended. Refer to [[Admin Game Commands]] for more information.
+
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 <code>GameUserSettings.ini</code> to specify its settings is highly recommended. Refer to [[Admin Game Commands]] for more information.
   
 
<ol>
 
<ol>
<li>Create a file named <tt>/etc/systemd/system/ark-dedicated.service</tt> with the following contents:
+
<li>Create a file named <code>/etc/systemd/system/ark-dedicated.service</code> with the following contents:
 
<pre>[Unit]
 
<pre>[Unit]
 
Description=ARK: Survival Evolved dedicated server
 
Description=ARK: Survival Evolved dedicated server
Line 276: Line 308:
   
 
[Service]
 
[Service]
  +
ExecStartPre=/home/steam/steamcmd +login anonymous +force_install_dir /home/steam/servers/ark +app_update 376030 +quit
ExecStart=/home/steam/servers/ark/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland?listen?SessionName=<SESSION_NAME> -server -log
+
ExecStart=/home/steam/servers/ark/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland?listen?SessionName=<session_name> -server -log
  +
WorkingDirectory=/home/steam/servers/ark/ShooterGame/Binaries/Linux
 
LimitNOFILE=100000
 
LimitNOFILE=100000
 
ExecReload=/bin/kill -s HUP $MAINPID
 
ExecReload=/bin/kill -s HUP $MAINPID
Line 286: Line 320:
 
WantedBy=multi-user.target</pre>
 
WantedBy=multi-user.target</pre>
   
The <tt>ExecStart</tt> 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.
+
The <code>ExecStart</code> 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 <tt>&lt;SESSION_NAME&gt;</tt> with the desired session name for your server as well.
+
Be sure to replace <code><SESSION_NAME></code> with the desired session name for your server as well.
   
Finally, adjust the <tt>User</tt> and <tt>Group</tt> settings for your host. Without these two options in <tt>ark-dedicated.service</tt>, 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.''
+
Finally, adjust the <code>User</code> and <code>Group</code> settings for your host. Without these two options in <code>ark-dedicated.service</code>, 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.
 
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.
  +
  +
'''WorkingDirectory''' option is required to fix some issues. (For example not having '''WorkingDirectory''' set will fail to download mods (if using with -automanagedmods))
   
 
</li>
 
</li>
Line 306: Line 342:
 
</ol>
 
</ol>
   
After following these steps, your server should be up and running, and be automatically managed by the host on startup and shutdown.
+
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 ===
+
==== Post-Setup Management ====
 
The server can be stopped by running:
 
The server can be stopped by running:
 
<pre># systemctl stop ark-dedicated</pre>
 
<pre># systemctl stop ark-dedicated</pre>
Line 314: Line 350:
 
<pre># systemctl status ark-dedicated</pre>
 
<pre># systemctl status ark-dedicated</pre>
   
'''Note:''' If you need to update the <tt>ark-dedicated.service</tt> file (to change the dedicated server's startup options or to adjust its path), run the following command to ensure your changes are applied:
+
:'''Note:''' If you need to update the <code>ark-dedicated.service</code> file (to change the dedicated server's startup options or to adjust its path), run the following command to ensure your changes are applied:
 
<pre># systemctl daemon-reload</pre>
 
<pre># systemctl daemon-reload</pre>
   
= Updating =
+
== 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 [https://developer.valvesoftware.com/wiki/SteamCMD#Automating_SteamCMD ''SteamCMD'''s documentation] for details on automating this process.
 
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 [https://developer.valvesoftware.com/wiki/SteamCMD#Automating_SteamCMD ''SteamCMD'''s documentation] for details on automating this process.
  +
  +
If you use the systemd startup file you can easily integrate the update-mechanism to be run before every start of the game.
   
 
SteamCMD provides [https://developer.valvesoftware.com/wiki/SteamCMD#Windows_Software.2FScripts additional tools] to make installation and updates easier and more seamless.
 
SteamCMD provides [https://developer.valvesoftware.com/wiki/SteamCMD#Windows_Software.2FScripts additional tools] to make installation and updates easier and more seamless.
   
= Console Commands =
+
== Console Commands ==
While running the game, the command console can be accessed with either the <tt>[~]</tt> (tilde) or <tt>[TAB]</tt> keys (depending on game version, default configuration and your keyboard layout). Once in the console, to activate administrator commands, enter:
+
While running the game, the command console can be accessed with either the <code>[~]</code> (tilde) or <code>[TAB]</code> keys (depending on game version, default configuration and your keyboard layout). Once in the console, to activate administrator commands, enter:
   
<pre>enablecheats <admin_password></pre>
+
<pre>enablecheats <admin_password></admin_password></pre>
   
Replace '''<tt>&lt;admin_password&gt;</tt>''' with the server's administrator password.
+
Replace '''<code><admin_password></code>''' with the server's administrator password.
   
 
Refer to [[Admin Game Commands]] for a list of available commands.
 
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 <tt>DefaultInput.ini</tt> file (located in your Steam library in the folder named <tt>steamapps\common\ARK\ShooterGame\Config</tt>) with a text editor and locate the line (near the bottom of the file) that reads:
+
If the console can't be opened in-game, exit the game, open the game's <code>DefaultInput.ini</code> file (located in your Steam library in the folder named <code>steamapps\common\ARK\ShooterGame\Config</code>) with a text editor and locate the line (near the bottom of the file) that reads:
   
 
<pre>;+ConsoleKeys=Tab</pre>
 
<pre>;+ConsoleKeys=Tab</pre>
Line 342: Line 380:
 
Save the file and launch the game. The console should be accessible.
 
Save the file and launch the game. The console should be accessible.
   
= Backing Up Server Data =
+
== Backing Up Server Data ==
To make a backup of the server data, simply copy the folder named <tt>ShooterGame/Saved</tt> (and his content) to the desired backup location. This folder contains all tribe, player and world data for the server.
+
To make a backup of the server data, simply copy the folder named <code>ShooterGame/Saved</code> (and his content) 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.
 
Performing a backup is recommended before updating a server to a new release.
   
= Troubleshooting =
+
== Troubleshooting ==
  +
=== Server loses characters or world data upon restart ===
 
== 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.
 
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 <tt>ShooterGame/Saved</tt> 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 first time the server is run, it should create a folder named <code>ShooterGame/Saved</code> 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, by default, is set-up to automatically save world data every 15 minutes. If your server crashes before the first 15 minutes are up, you will not have any data saved.
 
The server software, by default, is set-up to automatically save 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) ==
+
=== 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|Linux]] section above and follow the procedure to increase the host's open files limit.
 
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|Linux]] section above and follow the procedure to increase the host's open files limit.
   
  +
== Tool - ARK Server Manager ==
= Notes =
 
  +
You can also use this tool to manage your server when it is installed: https://steamcommunity.com/sharedfiles/filedetails/?id=468312476
  +
  +
[[File:ASM.png|400px]]
  +
  +
The Ark Server Manager is designed to help you set up and maintain your own Ark: Survival Evolved (tm) dedicated servers. It provides a simple user interface allowing you to create and edit server profiles containing all of the settings you need to customize the playing experience for you and your friends.
  +
  +
'''<u>What it does:</u>'''
  +
* ''Manages the SteamCMD tool and Server installations/updates.''
  +
* ''Organizes settings and writes INI files and command-line arguments automatically.''
  +
* ''Tracks server status and allows direct control of server state.''
  +
* ''Save and load server profiles - even import directly from an existing server deployment.''
  +
* ''Scheduled updates server files and mods.''
  +
* ''Works with Survival of the fittest.''
  +
  +
  +
  +
  +
 
== Notes ==
 
<references group="note" />
 
<references group="note" />
  +
If you're planning to have players join from the EpicGames version of [[ARK]] you <u>must</u> have the <code>-crossplay</code> command line option set.
   
= References =
+
== References ==
 
<references />
 
<references />
   
= External Links =
+
== External links ==
* This material is partially based on a [https://steamcommunity.com/sharedfiles/filedetails/?id=454319195 Guide] posted on the Steam Community forums by [https://steamcommunity.com/profiles/76561198126075794 ShuwA].
+
* This material is partially based on a [https://steamcommunity.com/sharedfiles/filedetails/?id=454319195 Server Setup guide] by ShuwA.
* http://gameserversetup.com/ark-survival-evolved-dedicated-server-setup/
+
* [http://gameserversetup.com/ark-survival-evolved-dedicated-server-setup/ gameserversetup.com] guide
* https://survivalservers.com/wiki/index.php?title=How_to_Create_an_ARK:_Survival_Evolved_Dedicated_Server_Guide
+
* [https://survivalservers.com/wiki/index.php?title=How_to_Create_an_ARK:_Survival_Evolved_Dedicated_Server_Guide survivalservers.com] guide
 
* http://steamcommunity.com/app/346110/discussions/0/615086038673139870/
 
* http://steamcommunity.com/app/346110/discussions/0/615086038673139870/
  +
* [https://hostnoc.com/ark-dedicated-server/ hostnoc.com] guide
 
  +
* [https://www.bestarkhosting.com/guides/how-to-host-an-ark-dedicated-server/ bestarkhosting.com] guide
  +
* [https://comparegamehosting.com/reviews/how-to-find-the-perfect-ark-survival-evolved-server-hosting-company/ comparegamehosting.com] guide
  +
* [https://comparegameservers.com comparegameservers.com] list of hosts
  +
* [https://findgameserverhosting.com/ark-dedicated-server-setup/ findgameserverhosting.com] list of providers with guides and tips
 
{{Nav technical}}
 
{{Nav technical}}
   
[[Category: Guides]]
+
[[Category:Guides]]
[[Category: Private Servers]]
+
[[Category:Servers]]
  +
  +
[[es:Servidor Dedicado]]
  +
[[fr:Réglage de serveur dédié]]
  +
[[it:Impostazione server dedicato]]
  +
[[ja:Dedicated Server Setup]]
  +
[[ru:Настройка Выделенного Сервера]]
  +
[[th:Dedicated server setup]]
  +
{{MissingTranslations|de|pl|pt-br}}

Revision as of 16:00, 21 October 2021

Spoiled Meat This article may need cleanup to meet quality standards.
Please help improve this if you can. The talk page may contain suggestions.

This page discusses the installation and configuration of a dedicated ARK server.

For scripts that you can run on your own dedicated server, see Dedicated server scripts.

Prerequisites

Your OS must be a 64-bit OS (ShooterGameServer is a 64-bit executable and as such will not run on a 32-bit install of Ubuntu or Windows). 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. This is also dependant on your settings/mods and configurable options. Some mods increase RAM more than others. On Windows Server 2012 R2, the server uses 2.3GB of RAM without any clients. On Linux, the installation uses 3.2GB of RAM without any clients.

Network

The server listens for incoming 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
UDP 27015 Query port for Steam's server browser
UDP 7777 Game client port
UDP 7778 Raw UDP socket port (always Game client port +1)
TCP 27020 RCON for remote console server access (optional)

You can host multiple dedicated servers on the same host, however be aware that CPU and memory should be monitored carefully if they are busy servers rather than test servers. For example:

Server instance Game port Raw UDP port Query port RCON port
Server game instance 1 7777 7778 27015 27020
Server game instance 2 7779 7780 27016 27021
Server game instance 3 7781 7782 27017 27022
Server game instance 4
completely different ports
9999 10000 37015 37016
Note: Query Port cannot be between 27020 and 27050 due to Steam using those ports.

Operating system

Windows

Microsoft Visual C++ 2013 Redistributable (can be found in the Steam Ark game folder under _CommonRedist/vcredist/folder).

DirectX (DXSETUP, can be found in the Steam Ark game folder under _CommonRedist/DirectX/June2010/ folder).

Linux

64bit Linux servers will require 32 bit binaries to install/run steamcmd.

sudo apt-get install lib32gcc1

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.

Tuned is a daemon that monitors the use of system components and dynamically tunes system settings, currently only on RHEL7, CentOS7.x and Fedora.

Note: You need to set tuned to „throughput-performance“. Otherwise all changes in /etc/security/limits.conf will ignored!

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.

Warning: [Linux-specific | Windows: report missing] If you want to use a SSD to run the server, but your normal steam folder is on your main HDD, check the soft-links of the folders located in '.steam'

Server Installation

  1. Install SteamCMD on your host.
  2. Create a folder to house the server files on a volume with at least 15GB of free disk space. The server files consume about 10.4GB of space (Feb 2020 after Genesis 1 launch), 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. (Remove the < > and replace them with double quotes, for example, force_install_dir "C:\Program Files (x86)\Ark Server")
  4. Use app id 376030 for Survival Evolved or use 445400 for Survival of The Fittest.
    Steam> login anonymous
    Steam> force_install_dir <install_dir>
    Steam> app_update 376030 validate
    Steam> exit


  5. Or, run from command line:
    steamcmd +login anonymous +force_install_dir <install_dir> +app_update 376030 +quit


    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.

  6. 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 and place it in YOUR_ARK_SERVER_FOLDER/ShooterGame/Binaries/Win64/ (remove the '<' '>' symbols!)
    start ShooterGameServer.exe TheIsland?listen?SessionName=<server_name>?ServerPassword=<join_password>?ServerAdminPassword=<admin_password>?Port=<port>?QueryPort=<query_port>?MaxPlayers=<max_players>
    exit
    



    For Linux, create server_start.sh and place it in YOUR_ARK_SERVER_FOLDER/ShooterGame/Binaries/Linux/ (remove the '<' '>' symbols!)

    #! /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).


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

Run a Beta Branch

Sometimes events are not implemented in the main game but into a so called branch. To run this event you change to this branch.

Add -beta with the branch name to the app_update command, like

Steam> app_update 376030 -beta branchname validate

Additionally start the server with -branchname.

Of course change the branchname to whatever the name of the branch is. When the event is or should be finished, just remove the additions.

Port Forwarding and Firewall

For your server to become visible in both the Ark server lists and the Steam lists, do the following:

Windows (Firewall and Allow Rules)

  1. If you're on Windows 10, click on the search box in the lower left corner and type in "wf.msc" without the quotes. Click the "Run as administrator" option.
  2. Click "Inbound Rules" on the left panel, then click "New Rule..." on the right panel.
  3. When the New Inbound Rule Wizard opens up, select Port, then Next.
  4. The wizard will present options for choosing the protocol and specifying ports. Leave the default selection of the TCP protocol and "Specific local ports". List the ports you plan to forward into the box (default 27020 for RCON). Use a comma to separate multiple ports. Select Next to continue.
  5. Select "Allow the connection" and continue with the wizard.
  6. Make sure all of the boxes are selected for where the rule applies.
  7. Enter a name (required) and a description (optional). It is recommended to append the protocol (TCP or UDP) to the rule name.
  8. Repeat these steps, but choose UDP on the "Protocol and Ports" page. Make sure to enter your steam browser/query port (27015 default) and game port (7777 default). You also need the raw udp socket port (7778 default, always your game port +1) if using ?bRawSockets.
  9. When finished, you should have a rule for TCP and a rule for UDP in the Inbound Rules section.
  10. This section and the port forwarding section go hand in hand.
  11. Close the advanced firewall window and open Windows Firewall again.
  12. Click "Allow an app or feature through Windows Firewall". Scroll down to ShooterGame. Make sure all apps named ShooterGame have the Private and Public boxes checked.
  13. You're done. If your ports don't work when you forward them, you can edit your Firewall inbound rules by going back to the advanced tab, selecting the Inbound Rules tab, right-clicking the rules you created, then clicking properties.

OS X (firewall application)

Input needed.

Linux

For most Linux distros, if there is a firewall at all it will be iptables based. Most modern distributions will use a different interface, it's a good idea to use that instead of direct iptables commands.

All firewall changes must be made either as root or with sudo. These open ports 7777 7778 and 27015 for UDP and optionally 27020 for TCP. You may want to adjust the list of ports you need by editing the "for port in..." line.

UFW

This script will open the ports in a way that will persist across reboots. UFW is the firewall on Ubuntu

 #!/bin/sh
 if [[ $EUID -ne 0 ]]; then
     echo "This must be run as root"
     exit 1
 fi
 for port in 7777 7778 27015; do
     ufw allow $port/udp
 done
 #Uncomment the next if you want to open the default rcon port
 #ufw allow 27020/tcp

FirewallD

This script will open the ports in a way that will persist across reboots. FirewallD is the firewall on RHEL7, CentOS7.x and Fedora.

 #!/bin/sh
 if [[ $EUID -ne 0 ]]; then
     echo "This must be run as root"
     exit 1
 fi
 for port in 7777 7778 27015; do
     firewall-cmd --permanent --add-port $port/udp
 done
 #Uncomment the next if you want to open the default rcon port
 #firewall-cmd --permanent --add-port 27020/tcp
 firewall-cmd --reload

iptables

Keep in mind that this is only a temporary solution and should only be used if neither of the other scripts apply for your system. To make it safe for reboots see the documentation of your distribution, how to add firewall ports to the existing configuration files - or how to add scripts to the boot process.

 #!/bin/sh
 if [[ $EUID -ne 0 ]]; then
     echo "This must be run as root"
     exit 1
 fi
 for port in 7777 7778 27015; do
   iptables -t filter -I INPUT -p udp --dport $port -j ACCEPT
 done
 #Uncomment the next if you want to open the default rcon port
 #iptables -t filter -I INPUT -p tcp --dport 27020 -j ACCEPT

Port Forwarding

There are many websites with tutorials on port forwarding. It is highly suggested you visit portforward.com, which offers tutorials for the majority of routers.

What ports work depends on you. Try forwarding 27015 as the port and 27016 as the query port. 27015, 27016 and 7777 are the most common ports that work.

You must forward both TCP and UDP for your server to show up on any lists. You can make sure your ports are open by using the tool from portforward.com, that is, after you enter the ports that you have forwarded in the start_server.bat file you should have created earlier.

For example, start ShooterGameServer.exe TheIsland?listen?SessionName=<server_name>?ServerPassword=<join_password>?ServerAdminPassword=<admin_password>?Port=7777?QueryPort=27015?MaxPlayers=<max_players></max_players>

Good luck, port forwarding is not very easy.

Finding Your Server in Lists

You can access your server via the Steam servers list or the Ark unofficial list. Just search for your name in the Ark list, or find your IP address in the Steam server list. It is best to add your servers IP:PORT to your Steam favorites and joining using the 'favorites' tab in game. The in game list has a limit on the servers it will show at one time. There is no guarantee your server will appear in the unofficial lists all the time.

Good luck!

Automatic Startup

Windows (via Scheduled Task)

You can configure a scheduled task to automatically run a batch file and start the dedicated server when the system boots.

  1. Open 'Task Scheduler'
  2. Create Basic Task
  3. The 'Create Basic Task Wizard' will appear, name the task whatever you want
  4. Set the Trigger to 'When the computer starts'
  5. Set the Action to 'Start a program'.
  6. You will need to browse to the program/script you wish to start (which is your .BAT batch file that starts your server).
  7. Depending on how your batch file works, you may need to set the "Start in (optional)" path, so the working directory of your batch file is correct. (If your batch file simply contains the "start ShooterGame ..." command, then you should set the "Start in (optional)" path of your scheduled task to the directory that contains the batch file)
  8. Before you create the scheduled task, click the checkbox to "open properties window" after it's created
  9. In the General Tab under the Security Options frame, you probably want to choose "Run whether user is logged on or not"
  10. I personally checked "run with highest privileges" just in case. This might not be necessary.

Linux (via systemd)

Note: systemd is not available for Ubuntu 14.04.

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]
    ExecStartPre=/home/steam/steamcmd +login anonymous +force_install_dir /home/steam/servers/ark +app_update 376030 +quit
    ExecStart=/home/steam/servers/ark/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland?listen?SessionName=<session_name> -server -log
    WorkingDirectory=/home/steam/servers/ark/ShooterGame/Binaries/Linux
    LimitNOFILE=100000
    ExecReload=/bin/kill -s HUP $MAINPID
    ExecStop=/bin/kill -s INT $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.

    WorkingDirectory option is required to fix some issues. (For example not having WorkingDirectory set will fail to download mods (if using with -automanagedmods))

  2. To install systemd:
    apt-get install systemd systemd-sysv

    You will need to reboot after installation to initialize systemd.

    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.

If you use the systemd startup file you can easily integrate the update-mechanism to be run before every start of the game.

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></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 data, simply copy the folder named ShooterGame/Saved (and his content) 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, by default, is set-up to automatically save 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.

Tool - ARK Server Manager

You can also use this tool to manage your server when it is installed: https://steamcommunity.com/sharedfiles/filedetails/?id=468312476

ASM

The Ark Server Manager is designed to help you set up and maintain your own Ark: Survival Evolved (tm) dedicated servers. It provides a simple user interface allowing you to create and edit server profiles containing all of the settings you need to customize the playing experience for you and your friends.

What it does:

  • Manages the SteamCMD tool and Server installations/updates.
  • Organizes settings and writes INI files and command-line arguments automatically.
  • Tracks server status and allows direct control of server state.
  • Save and load server profiles - even import directly from an existing server deployment.
  • Scheduled updates server files and mods.
  • Works with Survival of the fittest.



Notes

If you're planning to have players join from the EpicGames version of ARK you must have the -crossplay command line option set.

References

External links