Updating the server via SSH
Updating the server via SSH

How to Set Up an ARK: Survival Evolved Dedicated Server on Linux

Setting up your own ARK: Survival Evolved dedicated server can significantly enhance your gaming experience, offering you and your community full control over the game environment. While you can run an ARK server on your personal computer, for optimal performance and 24/7 availability, a dedicated server or cloud server is highly recommended. Linux is widely recognized as the best operating system for hosting game servers due to its stability, efficiency, and robustness.

This guide will walk you through the process of installing and configuring an ARK: Survival Evolved dedicated server on a Linux system, specifically focusing on maximizing performance and ensuring a smooth gaming experience. We’ll cover everything from initial server setup to launching your server and connecting to it.

Why Choose a Linux Dedicated Server for ARK?

Before we dive into the installation process, let’s understand why Linux is the preferred choice for hosting ARK dedicated servers:

  • Performance and Stability: Linux is renowned for its efficiency and stability, which are crucial for running resource-intensive applications like game servers. It minimizes overhead, allowing more resources to be dedicated to the game server itself.
  • Cost-Effectiveness: Linux distributions are generally free, reducing the overall cost of server operation. This is a significant advantage compared to commercial operating systems.
  • Customization and Control: Linux offers extensive customization options, giving you fine-grained control over server settings and configurations. This allows for tailored optimization for ARK server requirements.
  • Community and Support: A vast and active Linux community provides extensive online resources, tutorials, and support forums, making troubleshooting and server management easier.

For those seeking a reliable and affordable hosting solution, consider providers like ServerMania, which offer dedicated servers and cloud servers optimized for game server hosting.

Prerequisites for Your ARK Linux Server

To get started, you’ll need the following:

  • A Linux Server: This guide is tailored for CentOS 7, but the general steps are applicable to other distributions like Ubuntu or Debian with minor adjustments. Ensure you have root access to this server.
  • Sufficient RAM: ARK servers are memory-intensive. At least 8GB of RAM is recommended for a basic server, but 16GB or more is ideal for larger player counts and modded servers.
  • Broadband Internet Connection: A stable and fast internet connection with sufficient bandwidth is essential to minimize latency and ensure smooth gameplay for all players.

Step-by-Step Guide to Install ARK Dedicated Server on Linux

Follow these steps to install your ARK: Survival Evolved dedicated server on a CentOS 7 Linux server. Adapt commands accordingly if using a different distribution.

Step 1: Initial Server Login and System Update

First, log in to your Linux server using SSH. It’s crucial to start with a system update to ensure all packages are up to date and secure.

For CentOS:

yum update -y

For Ubuntu/Debian:

apt-get update && apt-get upgrade -y

This process might take some time depending on your server’s current state.

Updating the server via SSHUpdating the server via SSH

Step 2: Creating a Dedicated User for the ARK Server

For security and organizational purposes, it’s best practice to create a separate user account to run the ARK server, rather than using the root user directly.

Add a new user named arkserver:

adduser arkserver

Set a strong password for this new user:

passwd arkserver

Adding a new user 'arkserver' in LinuxAdding a new user 'arkserver' in Linux

Step 3: Firewall Configuration – Opening Necessary Ports

ARK servers communicate over specific network ports. You need to open these ports in your server’s firewall to allow players to connect.

On CentOS using firewall-cmd:

firewall-cmd --permanent --zone=public --add-port=27015/udp
firewall-cmd --permanent --zone=public --add-port=7777/udp
firewall-cmd --permanent --zone=public --add-port=32330/udp
firewall-cmd --reload

These commands open the default ports for game traffic (7777), query (27015), and RCON (32330), all using UDP protocol. Adjust port numbers if you plan to use different ports for your server.

Step 4: Installing Required Libraries

SteamCMD, the command-line tool from Steam we’ll use to download the ARK server files, requires certain 32-bit libraries to be installed on a 64-bit Linux system.

For CentOS:

yum install nano wget screen glibc.i686 libstdc++.i686 ncurses-libs.i686 -y

For Ubuntu/Debian:

apt-get install nano wget screen lib32gcc1 libstdc++6 libstdc++6:i386 -y

These commands install essential utilities like nano (a text editor), wget (for downloading files), screen (for running server processes in the background), and the necessary 32-bit compatibility libraries.

Step 5: Optimizing System Settings

To ensure SteamCMD and the ARK server run optimally, we need to adjust some system settings, particularly the maximum number of files that can be opened by a process.

Increase the fs.file-max value:

echo "fs.file-max=100000" >> /etc/sysctl.conf
sysctl -p /etc/sysctl.conf

Alt text: Command line showing commands to modify sysctl.conf to increase the maximum number of open files for improved server performance.

Step 6: Modifying Security Limits

Similar to system settings, user limits also need adjustment to allow the ARK server to handle a large number of connections and files.

Modify the limits.conf file:

echo -e "* soft nofile 1000000n* hard nofile 1000000" >> /etc/security/limits.conf

Alt text: Command line displaying commands to append to limits.conf, increasing soft and hard nofile limits for the ‘arkserver’ user.

Step 7: Switching to the arkserver User

Now, switch to the newly created arkserver user to proceed with the installation.

su - arkserver
cd ~

Alt text: Command line showing the ‘su – arkserver’ command to switch user and ‘cd ~’ to navigate to the user’s home directory.

Step 8: Downloading and Installing SteamCMD

SteamCMD is essential for downloading and updating the ARK Dedicated Server files. Create directories and download SteamCMD.

mkdir -p ~/SteamCMD
cd ~/SteamCMD
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar xzf -

This will download and extract SteamCMD into the SteamCMD directory within the arkserver user’s home directory.

Downloading and extracting SteamCMD on LinuxDownloading and extracting SteamCMD on Linux

Step 9: Installing and Updating ARK Server Files

Use SteamCMD to download the ARK: Survival Evolved Dedicated Server files. App ID for ARK Dedicated Server is 376030.

./steamcmd.sh +login anonymous +force_install_dir ~/ark +app_update 376030 validate +quit

This command does the following:

  • ./steamcmd.sh: Executes the SteamCMD script.
  • +login anonymous: Logs into Steam anonymously (required for downloading public game server files).
  • +force_install_dir ~/ark: Sets the installation directory to ark directory in the arkserver user’s home directory.
  • +app_update 376030 validate: Downloads or updates the ARK Dedicated Server files (App ID 376030) and validates the installation.
  • +quit: Closes SteamCMD after completion.

This process can take a considerable amount of time depending on your internet speed as it downloads the entire ARK server package.

Running SteamCMD to download ARK server filesRunning SteamCMD to download ARK server files

Step 10: Creating an Update Script for ARK Server

To easily update your ARK server in the future, create a script that automates the update process using SteamCMD.

Create a file named updatearkserver.sh in the arkserver user’s home directory:

nano ~/updatearkserver.sh

Paste the following content into the file:

#!/bin/bash
cd ~/SteamCMD
./steamcmd.sh +login anonymous +force_install_dir ~/ark +app_update 376030 validate +quit

Save and exit the file (Ctrl+X, Y, Enter in nano). Make the script executable:

chmod +x ~/updatearkserver.sh

Now you can update your ARK server anytime by simply running:

~/updatearkserver.sh

Alt text: Text editor (nano) showing the content of the ‘updatearkserver.sh’ script with commands for updating the ARK server through SteamCMD.

Step 11: Creating a Start Script for ARK Server

Similarly, create a script to easily start your ARK server with your desired configurations.

Create a file named startarkserver.sh inside the ~/ark directory:

nano ~/ark/startarkserver.sh

Paste the following example content into the file, customizing it to your server preferences:

#!/bin/bash

SessionName="Your Server Name"
port="7777"
queryport="27015"
rconport="32330"
ServerAdminPassword="YourAdminPassword"
maxplayers="50"
TheIslandMap="TheIsland" # Change to your desired map e.g., "ScorchedEarth_P", "Aberration_P", "Extinction_P", "Genesis_P", "Genesis2_P", "CrystalIsles_P", "LostIsland_P", "Fjordur_P"

screen -dmS arkserver ./ShooterGame/Binaries/Linux/ShooterGameServer "$TheIslandMap"?listen?Multihome=0.0.0.0?SessionName="$SessionName"?MaxPlayers="$maxplayers"?QueryPort="$queryport"?RCONPort="$rconport"?Port="$port"?ServerAdminPassword="$ServerAdminPassword" -server -log

Customize the following parameters:

  • SessionName: The name of your server as it will appear in the server list.
  • port: The game port (default: 7777).
  • queryport: The query port (default: 27015).
  • rconport: The RCON port for remote server administration (default: 32330).
  • ServerAdminPassword: Set a strong admin password to protect your server settings.
  • maxplayers: The maximum number of players allowed on your server.
  • TheIslandMap: The map to be played. Change "TheIsland" to the desired map name.

Save and exit the file. Make the script executable:

chmod +x ~/ark/startarkserver.sh

Now you can start your ARK server by running:

~/ark/startarkserver.sh

To stop the server gracefully, use:

screen -S arkserver -X quit

Creating a start script for ARK server with server configurationsCreating a start script for ARK server with server configurations

Step 12: Connecting to Your ARK Server

Your ARK: Survival Evolved dedicated server should now be up and running. To connect:

  1. Open Steam.
  2. Go to View -> Servers.
  3. Click on Favorites and then Add a Server.
  4. Enter your server’s IP address and query port (e.g., your_server_ip:27015).
  5. Add the server to your favorites.
  6. Launch ARK: Survival Evolved.
  7. Go to Join ARK and filter for Favorites or search for your server name in the Unofficial server list.
  8. Connect to your server and enjoy!

Conclusion

Congratulations! You have successfully set up an ARK: Survival Evolved dedicated server on Linux. By following these steps, you’ve created a robust and customizable gaming environment for you and your community. Remember to regularly update your server using the update script and customize the start script further to tailor your server to your specific needs and preferences. Hosting your ARK server on a Linux dedicated server provides a superior gaming experience, ensuring performance, stability, and full control over your ARK world.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *