Jump to content

Sample systemd-config for ARK Server on Debian 10


TheHooly

Recommended Posts

Because most guides on this that I found were usually not up to date or involved killing the PID of the ARK server, I am sharing my configuration with you. If you find any issues with this, please let me know, I am open for improvements.

 

Here is a sample systemd configuration for running an ARK server in Linux (tested with Debian 10):

 

/etc/systemd/system/ark-aberration.service

[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/ark/ARK-Aberration/ark-aberration.sh                   # start script
LimitNOFILE=100000
KillMode=none
ExecStop=/home/ark/RCON SaveWorld
ExecStop=/home/ark/RCON DoExit
User=ark
Group=ark

[Install]
WantedBy=multi-user.target

 

/home/ark/ARK-Aberration/ark-aberration.sh

#!/bin/bash

/home/ark/ARK-Aberration/ShooterGame/Binaries/Linux/ShooterGameServer Aberration_P?listen?bRawSockets?RCONServerGameLogBuffer=600 -server -servergamelog -NoBattlEye -culture=en

Side note: I disabled BattlEye because otherwise i couldn't play ARK in Proton from my Linux PC, my server is password-protected

 

This implicits having created a user called "ark" to run the server with. Remember to change the ownership and permission bits when doing this, I used ark:ark and 770. My SSH login account is in the "ark" group so I can make changes without using "sudo su ark".

I use an RCON tool for Linux to shut the server down nicely, the source code is in the attachments, you just need to change the following parameters starting at line 180:

...
  
int main(int argc, char **argv)
{
  struct sockaddr_in a;
  int sock;
  int ret, i;
  char password[512]="YOUR_PASSWORD_HERE";
  short port = 27015;
  char address[512] = "127.0.0.1";
  
...

 

Replace:

YOUR_PASSWORD_HERE with your ServerAdminPassword
27015 with your RCON-port (by default 27020)
127.0.0.1 does not need to be changed (localhost)

Then run this from the directory where rcon.c is located:
gcc -o /home/ark/RCON ./rcon.c

rcon.c

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...