Core Keeper Wiki
Advertisement

Why a dedicated server?[]

Running a dedicated server can be a great way to play games like Core Keeper with friends. When playing with multiple people, one person typically hosts the game session on their PC. However, this can be problematic if that person is unable to keep their computer running 24/7 or if they experience technical difficulties that prevent others from connecting at any given time. By running a dedicated server, you can ensure that your game is always available for others to join, regardless of whether the host is online or experiencing issues.

Note about crossplay:[]

While hosting a map within the game itself does support crossplay between Steam <> Xbox for Windows/Windows Store <> GOG.com versions, the dedicated server setup currently only support Steam versions of the game. Attempts to connect to the Game ID via non-Steam versions of the game will result in the error message "Host does not allow crossplay".

Updates on progress with this issue may be posted via their discord, but for now you can submit a bug report through via their official bug report form.

Setup on an Arch-based distro[]

If you are planning to set up a server on an Arch-based distribution, there are a few things you should know. Arch Linux is a popular rolling release distribution that provides a lightweight and customizable base system. However, it may not be the most obvious choice for a server, as rolling release distributions are generally considered less stable than standard release distributions like Debian. That being said, if you're comfortable with Linux and would like to install Arch, you can find a guide here. Do note that Arch is notoriously difficult to install, so it's recommended that you have some experience with Linux beforehand.

This guide will continue with the assumption you have successfully connected to your server through ssh.

Housekeeping[]

Assuming that you have successfully installed Arch and connected to your server, the first step in setting up your server would be to update your system. You can do this by running the following command in the terminal:

# pacman -Syu

This command will update all of the installed packages on your system to their latest versions. It's important to keep your system up-to-date to ensure that you have the latest security patches and bug fixes.

Packages[]

You will need to install the following: git (to download SteamCMD), xvfb (to run the server)

You can use:

# pacman -S git xorg-server-xvfb

SteamCMD[]

Without AUR helper[]

Assuming you don't have an AUR helper like yay or paru installed, we will install SteamCMD from the AUR manually.

First, clone SteamCMD with git and cd into it.

$ git clone https://aur.archlinux.org/steamcmd.git && cd steamcmd

Make the package with makepkg.

$ makepkg -si

System user[]

It's generally considered good practice to create new user accounts for services running on your server, especially for a dedicated game server like Core Keeper. This is because running services under the same user account as the rest of the system can pose a security risk. In the event that the service is compromised, running under a privileged user account could allow an attacker to gain full access to the system. By creating a separate user account for the service, you can limit the potential damage that can be done in case of a security breach.

To create a new user account named corekeeper-server specifically for the Core Keeper game server, you can use the adduser command in the terminal. First, log in to the server as the root user and then run the following command:

# useradd -mrU -s /usr/sbin/nologin corekeeper-server

This creates a new system user that cannot login.

Installing the server[]

SteamCMD[]

Now we can install the server using steamcmd. Here is a command using sudo that will execute the command as the corekeeper-server user.

$ sudo -u corekeeper-server -s /bin/bash -c "steamcmd +force_install_dir /home/corekeeper-server +login anonymous +app_update 1007 validate +app_update 1963720 validate +quit"

If you are having trouble, you might interactively use SteamCMD following commands:

$ sudo -u corekeeper-server -s /bin/bash -c steamcmd

Steam>force_install_dir /home/corekeeper-server

Steam>login anonymous
...
...
Waiting for user info...OK

Steam>app_update 1007 validate
...
...
Success! App '1007' fully installed.

Steam>app_update 1963720 validate
...
...
Success! App '1963720' fully installed.

Steam>quit

Modifying launch scripts[]

The included launch.sh and _launch.sh have problems. They are unhelpful for servers, and not meant for Arch, respectively. We need to make some modifications.

Copy _launch.sh to myLaunch.sh (to avoid it being overwritten on updates) and open it in your favorite text editor. For example, to open in vim, use:

$ sudo -u corekeeper-server -s /bin/bash -c "vim /home/corekeeper-server/myLaunch.sh"

Delete the part that checks and installs requirements:

for r in "${requirements[@]}" 
do 
        echo "Checking for required package: $r" 
        if ! (dpkg -l $r >/dev/null); then 
                echo "Installing missing package: $r" 
                sleep 1 
                $sudo apt-get update -yy && $sudo apt-get install -yy "$r" 
        fi 
done

You should be able to launch the server now using myLaunch.sh

Systemd service[]

At this point, you can can run your server, but usually people want to have the server restart automatically on failure and on startup. We can make a Systemd service to do both.

Edit a new file /etc/systemd/system/corekeeper-server.service.

Again, using vim, the command would be:

# vim /etc/systemd/system/corekeeper-server.service

Put the following in the file:

[Unit]
Description=CoreKeeper Dedicated Server
After=network.target

[Service]
Type=simple
User=corekeeper-server
WorkingDirectory=/home/corekeeper-server
ExecStart=/home/corekeeper-server/myLaunch.sh
KillMode=process
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Execute the following:

# systemctl daemon-reload

Execute the following to start the service:

# systemctl start corekeeper-server.service

Execute the following to make the service autostart on boot:

# systemctl enable corekeeper-server.service

Connecting[]

If you are using a Systemd service, you will be able to check the output for the server with

# journalctl -u corekeeper-server.service -f

Though, if the server is running correctly, you will be able to find the game ID to connect to in the server directory in GameID.txt

Setup on RedHat based distro (Centos/Rocky/etc.)[]

This was tested on RHEL 9.x based distro, it may or may not work on older ones.

Housekeeping[]

Assuming you are using a very barebones installation, such as server or container image, you will need to make sure that your system is up to date and that some prerequisite packages are installed. Update with:

# sudo dnf update -y

Packages[]

Some additional packages are required in order for server to run, mainly Xvfb and mesa drivers for OpenGL (OpenGL is being used to compute a continuous infinite world after the initial world is generated the first time) Install with:

# sudo dnf install glibc.i686 libstdc++.i686 tar mesa-dri-drivers mesa-filesystem mesa-libEGL mesa-libGL mesa-libgbm mesa-libglapi mesa-libxatracker mesa-vulkan-drivers xorg-x11-server-Xvfb libXi -y

And if your install doesn't come with ssh server:

# sudo dnf install openssh-server -y && systemctl enable --now sshd

System user[]

It's generally considered good practice to create new user accounts for services running on your server, especially for a dedicated game server like Core Keeper. This is because running services under the same user account as the rest of the system can pose a security risk. In the event that the service is compromised, running under a privileged user account could allow an attacker to gain full access to the system. By creating a separate user account for the service, you can limit the potential damage that can be done in case of a security breach.

To create a new user account named corekeeper-server specifically for the Core Keeper game server, you can use the adduser command in the terminal. First, log in to the server as the root user and then run the following command:

# useradd -mrU -s /usr/sbin/nologin corekeeper-server

This creates a new system user that cannot login.

SteamCMD[]

As per valve official docs, steamCMD for RHEL has to be downloaded manually. First open console as the newly created user:

# sudo -u corekeeper-server /bin/bash

Run command cd to get to your home directory

And download steamCMD:

# curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

Finally type exit to exit from this user console

Installing the server[]

SteamCMD[]

Now we can install the server using steamcmd. Here is a command using sudo that will execute the command as the corekeeper-server user.

$ sudo -u corekeeper-server -s /bin/bash -c "steamcmd +force_install_dir /home/corekeeper-server +login anonymous +app_update 1007 validate +app_update 1963720 validate +quit"

If you are having trouble, you might interactively use SteamCMD following commands:

$ sudo -u corekeeper-server -s /bin/bash -c steamcmd

Steam>force_install_dir /home/corekeeper-server

Steam>login anonymous
...
...
Waiting for user info...OK

Steam>app_update 1007 validate
...
...
Success! App '1007' fully installed.

Steam>app_update 1963720 validate
...
...
Success! App '1963720' fully installed.

Steam>quit

Modifying launch scripts[]

The included launch.sh and _launch.sh have problems. They are unhelpful for servers, and not meant for Arch, respectively. We need to make some modifications.

Copy _launch.sh to myLaunch.sh (to avoid it being overwritten on updates) and open it in your favorite text editor. For example, to open in vim, use:

$ sudo -u corekeeper-server -s /bin/bash -c "vim /home/corekeeper-server/myLaunch.sh"

Delete the part that checks and installs requirements:

for r in "${requirements[@]}" 
do 
        echo "Checking for required package: $r" 
        if ! (dpkg -l $r >/dev/null); then 
                echo "Installing missing package: $r" 
                sleep 1 
                $sudo apt-get update -yy && $sudo apt-get install -yy "$r" 
        fi 
done

As well as part where it says

DISPLAY=:99 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$installdir/../Steamworks SDK Redist/linux64/" \

change it to

DISPLAY=:99 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$installdir/linux64/" \

You should be able to launch the server now using myLaunch.sh

Systemd service[]

At this point, you can can run your server, but usually people want to have the server restart automatically on failure and on startup. We can make a Systemd service to do both.

Edit a new file /etc/systemd/system/corekeeper-server.service.

Again, using vim, the command would be:

# vim /etc/systemd/system/corekeeper-server.service

Put the following in the file:

[Unit]
Description=CoreKeeper Dedicated Server
After=network.target

[Service]
Type=simple
User=corekeeper-server
WorkingDirectory=/home/corekeeper-server
ExecStart=/home/corekeeper-server/myLaunch.sh
KillMode=process
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Execute the following:

# systemctl daemon-reload

Execute the following to start the service:

# systemctl start corekeeper-server.service

Execute the following to make the service autostart on boot:

# systemctl enable corekeeper-server.service

Connecting[]

If you are using a Systemd service, you will be able to check the output for the server with

# journalctl -u corekeeper-server.service -f

Though, if the server is running correctly, you will be able to find the game ID to connect to in the server directory in GameID.txt

Setup on a Debian based distro (Debian/Ubuntu/Mint/etc.)[]

This section has been copied from the 'Arch-based' install guide, with some relevant parts modified.

Housekeeping[]

Assuming that you have successfully installed Debian or one of its derivative distributions and connected to your server, the first step in setting up your server would be to update your system. You can do this by running the following command in the terminal:

# apt-get update && apt-get upgrade

This command will update all of the installed packages on your system to their latest versions. It's important to keep your system up-to-date to ensure that you have the latest security patches and bug fixes.

Packages[]

The launch script for the server will install any missing dependencies. The only thing you will need to install is SteamCMD. The official documentation can be found here:
https://developer.valvesoftware.com/wiki/SteamCMD#Linux

System user[]

It's generally considered good practice to create new user accounts for services running on your server, especially for a dedicated game server like Core Keeper. This is because running services under the same user account as the rest of the system can pose a security risk. In the event that the service is compromised, running under a privileged user account could allow an attacker to gain full access to the system. By creating a separate user account for the service, you can limit the potential damage that can be done in case of a security breach.

To create a new user account named corekeeper-server specifically for the Core Keeper game server, you can use the adduser command in the terminal. First, log in to the server as the root user and then run the following command:

# useradd -mrU -s /usr/sbin/nologin corekeeper-server

This creates a new system user that cannot login.

Installing the server[]

SteamCMD[]

First, install SteamCMD by adding the appropriate repo, then apt install steamcmd.

Now we can install the server using steamcmd. Here is a command using sudo that will execute the command as the corekeeper-server user.

$ sudo -u corekeeper-server -s /bin/bash -c "steamcmd +force_install_dir /home/corekeeper-server +login anonymous +app_update 1007 validate +app_update 1963720 validate +quit"

If you are having trouble, you might interactively use SteamCMD following commands:

$ sudo -u corekeeper-server -s /bin/bash -c steamcmd

Steam>force_install_dir /home/corekeeper-server

Steam>login anonymous
...
...
Waiting for user info...OK

Steam>app_update 1007 validate
...
...
Success! App '1007' fully installed.

Steam>app_update 1963720 validate
...
...
Success! App '1963720' fully installed.

Steam>quit

You should be able to launch the server now using _launch.sh

Systemd service[]

At this point, you can can run your server, but usually people want to have the server restart automatically on failure and on startup. We can make a Systemd service to do both.

Edit a new file /etc/systemd/system/corekeeper-server.service.

Again, using vim, the command would be:

# vim /etc/systemd/system/corekeeper-server.service

Put the following in the file:

[Unit]
Description=CoreKeeper Dedicated Server
After=network.target

[Service]
Type=simple
User=corekeeper-server
WorkingDirectory=/home/corekeeper-server
ExecStart=/home/corekeeper-server/_launch.sh
KillMode=process
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Execute the following:

# systemctl daemon-reload

Execute the following to start the service:

# systemctl start corekeeper-server.service

Execute the following to make the service autostart on boot:

# systemctl enable corekeeper-server.service

Connecting[]

If you are using a Systemd service, you will be able to check the output for the server with

# journalctl -u corekeeper-server.service -f

Though, if the server is running correctly, you will be able to find the game ID to connect to in the server directory in GameID.txt

Steam Launcher[]

Installation[]

Another method of running a dedicated server is through the steam launcher itself.

Within steam library, search "core keeper dedicated server", Install the file in your desired location and run it.


Note: Whenever you are going to shut down the server, ensure that you shut it through the server cmd file. (Otherwise to shut it down, you will have to go in your task manager shut it)

Tweaks[]

Server location: Folder C / Users / (your user) / AppData / LocalLow / Pugstorm / Core Keeper / DedicatedServer.

(If you are not seeing AppData in your users, turn on hidden files by pressing "view" at the top and checking on the "hide files" option)


From the server location, to change stuff about your server, open the "Server.Config" file in Notepad. (whatever change you make, ensure that you save it before crossing off notepad.)

Server Modding[]

Modding your dedicated server is easy, if a bit tedious; each mod you want installed on your dedicated server will need to be manually downloaded & extracted into its own folder in the Core Keeper Dedicated Server directory in Steam.

  1. Navigate to the following folder:
    ...\SteamLibrary\Common\Core Keeper Dedicated Server\CoreKeeperServer_Data\StreamingAssets
  2. Create a new folder called "Mods".
  3. Download your desired mods manually (for mod.io, open the mod page, and there's a "Download Files Manually" section at the bottom of the sidebar on the right).
  4. Create a folder for each mod in the "Mods" folder
    • Example:
      ...\StreamingAssets\Mods\Enemy Health Bars\
    • Note: Folder names don't need to exactly match the mod names.
  5. Extract each zipped mod file into its respective folder

Once all mods are installed, re-launch your server.


Linux[]

Create folder

(installdir)/CoreKeeperServer_Data/StreamingAssets/Mods

And inside Mods folder, extract every mod zip file into it's own folder, easy way to do it is put all the zip files there, navigate to the Mods folder in terminal and run the following command:

find . -mindepth 1 -maxdepth 1 -type d -exec rm -fr {} \; ; for i in *.zip; do fldName=$(echo $i|cut -d'.' -f1); mkdir $fldName && unzip $i -d $fldName; done

This will delete all existing mod folders and extract the zip files

Advertisement