How to setup a Corekeeper Server (Ubuntu 24.04 LTS Desktop)

  1. Get and install steamcmd
sudo apt update && sudo apt upgrade -y
	sudo apt install software-properties-common
	sudo add-apt-repository multiverse; sudo dpkg --add-architecture i386; sudo apt update
  1. Add a user called corekeeper-server with useradd:
useradd -mrU -s /usr/sbin/nologin corekeeper-server
  1. Run the following command to install the core keeper server in the /home/corekeeper-server directory. This will use steamcmd to login via the username anonymous:
$ sudo -u corekeeper-server -s /bin/bash -c "/usr/games/steamcmd +force_install_dir /home/corekeeper-server +login anonymous +app_update 1007 validate +app_update 1963720 validate +quit"
  1. IMPORTANT: Copy the file from /home/corekeeper-server/.steam/steam/steamcmd/linux64/steamclient.so $\to$ /home/corekeeper-server/.steam/skd64/steamclient.so. Make any directories in the destination that don't already exist
  2. To use an existing world, copy the .zip file from C:\Program Files (x86)\Steam\userdata\134438157\1621690\remote\worlds to /home/corekeeper-server/.config/unity3d/Pugstorm/Core Keeper/DedicatedServer/worlds
  3. To launch the server, run the following command:
sudo -u corekeeper-server -s /bin/bash -c "./_launch.sh -worldname \"Jason! Hi!\""

I have added this into a script called myLauncher.sh at the /home/corekeeper-server directory.

If everything works, you should see this output:

root@corekeeper:~# screen -r corekeeper
    "memorysetup-temp-allocator-size-audio-worker=65536"
    "memorysetup-temp-allocator-size-cloud-worker=32768"
    "memorysetup-temp-allocator-size-gfx=262144"
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86CameraAccessEnable
> Warning:          Could not resolve keysym XF86CameraAccessDisable
> Warning:          Could not resolve keysym XF86CameraAccessToggle
> Warning:          Could not resolve keysym XF86NextElement
> Warning:          Could not resolve keysym XF86PreviousElement
> Warning:          Could not resolve keysym XF86AutopilotEngageToggle
> Warning:          Could not resolve keysym XF86MarkWaypoint
> Warning:          Could not resolve keysym XF86Sos
> Warning:          Could not resolve keysym XF86NavChart
> Warning:          Could not resolve keysym XF86FishingChart
> Warning:          Could not resolve keysym XF86SingleRangeRadar
> Warning:          Could not resolve keysym XF86DualRangeRadar
> Warning:          Could not resolve keysym XF86RadarOverlay
> Warning:          Could not resolve keysym XF86TraditionalSonar
> Warning:          Could not resolve keysym XF86ClearvuSonar
> Warning:          Could not resolve keysym XF86SidevuSonar
> Warning:          Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server
Game ID: *********************

Where Game ID is printed at the end, and GameID.txt has the Game ID.

  1. Using screen (found here: [[How to set up Minecraft server (Ubuntu 24.04)]]), use the command to set up the session in the background:
screen -dmS corekeeper ./myLauncher.sh
  1. Add the following to your crontab file:
@reboot cd /home/corekeeper-server && screen -dmS corekeeper ./myLauncher.sh
  1. You do not need to port forward. This service connects to the steam relay servers, and can be accessed via the GameID at GameID.txt

Sources:

https://developer.valvesoftware.com/wiki/SteamCMD#Linux

https://core-keeper.fandom.com/wiki/Dedicated_server#Setup_on_a_Debian_based_distro_(Debian/Ubuntu/Mint/etc.)

Note:

This server leaks memory. To prevent it from eating over the system memory, the server must be restarted every so often to flush the ram. Add the following line to the crontab file to to this:

0 7 * * * cd /home/corekeeper-server && ./restartMyLauncher.sh

Where restartMyLauncher.sh has the following content:

screen -X -S corekeeper quit && wait 10s; screen -dmS corekeeper ./myLauncher.sh

To host an http server to make accessing world files and logs easier, use python3 -m http.server in a separate screen session, corekeeper-web-server. The following is a script located in the /home/corekeeper-server directory called launchWebService.sh:

python3 -m http.server

In the crontab:

@reboot cd /home/corekeeper-server && screen -dmS corekeeper ./myLauncher.sh && screen -dmS corekeeper-web-server ./launchWebService.sh

0 7 * * * cd /home/corekeeper-server && ./restartMyLauncher.sh

In the restartMyLauncher.sh script:

screen -X -S corekeeper quit && screen -X -S corekeeper-web-server quit && sleep 10s;\
    screen -dmS corekeeper ./myLauncher.sh && screen -dmS corekeeper-web-server ./launchWebService.sh

Back to Table of Contents