In this tutorial, we will show you how to set up a Core Keeper Dedicated Server on Linux.
Core Keeper is a 2D multiplayer survival sandbox game. It takes inspiration from other hit sandbox games such as Minecraft, Terraria, and Stardew Valley. You can mine, craft, farm. and explore a procedurally generated underground world.
Best of all, you can do all of these things with up to 8 players within the one game world. Setting up a dedicated server allows you to have a core location where all your players can connect without you having to keep the game running on your main machine.
Linux is a great operating system for hosting game servers like the Core Keeper dedicated server. It has significantly lower overhead than Windows, for example, which means you can get more out of your hardware.
The game server is actually fairly light, so you can even get away with a relatively inexpensive Digital Ocean droplet.
As you will soon see over the next few steps, setting up a dedicated server for Core Keeper on Linux is a straightforward process.
Installing and Running a Core Keeper Server on Linux
Over the next few sections, we will walk you through setting up a Core Keeper Dedicated Server on your Linux-based system.
These steps are run entirely within your device’s terminal, but they are all fairly straightforward to follow. We tested these steps on Ubuntu, but they should work fine on all Debian-based systems. They will also work on other systems; you will just need to install “xvfb
.”
Please note if you are running this server from your home network, you will likely need to port forward port 27016
. Likewise, you will also need to allow this port through your firewall if you have one configured.
Preparing your System
1. The main thing we require to set up the Core Keeper dedicated server on our Linux system is SteamCMD.
If you don’t already have this software installed, we highly recommend following our SteamCMD installation guide.
https://pimylifeup.com/linux-steamcmd/
2. With SteamCMD installed, we need one other piece of software before we can continue installing the server.
Before installing this package, update your package list cache using the command below.
sudo apt update
3. After updating the package list cache, use the command below to install the “xvfb
” and “libxi6
” packages on to your system.
The “xvfb
” package allows your system to create a virtual frame buffer for display without needing any screen output. The Core Keeper server will not function without this package.
sudo apt install xvfb libxi6
Creating a User to Run the Core Keeper Linux Dedicated Server
4. Once you have SteamCMD and “xvfb
” installed, we can move on to our next task. In this step, we will create a user on our Linux system under which the Core Keeper dedicated server will run.
Having the server run under a different user is good practice as it helps isolate it from the rest of your system and helps with resource management.
Use the useradd command below to create a user called “corekeeper
” on your system. The “-m
” option tells the tool to create a home directory for our new user.
sudo useradd -m corekeeper
5. To help prevent permission issues later, let us change to our new “corekeeper
” user using the following command. We only need to use this user while downloading the Core Keeper server files.
sudo -u corekeeper -s
6. Since we have changed our user, we must change to its home directory by using the cd command.
cd ~
Downloading the Core Keeper Server
7. We can finally begin downloading the Core Keeper Dedicated Server to our Linux system. The SteamCMD tool we installed at the start of this tutorial makes the whole process simple.
Run the following command within the terminal to download the server files to the “/home/corekeeper/server
” directory.
/usr/games/steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir /home/corekeeper/server +login anonymous +app_update 1963720 +quit
8. With the Core Keeper Server now downloaded and installed, we must also download the “Steamworks SDK Redistributable
” using the following command.
Without this, you will run into issues when you start the server.
/usr/games/steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir "/home/corekeeper/Steamworks SDK Redist/" +login anonymous +app_update 1007 +quit
Writing a Service to Manage your Core Keeper Dedicated Server on Linux
9. We are now done with the “corekeeper
” user and can return to your main user. To exit, simply use “exit
” within the terminal.
exit
10. Our next step is to write a service on our system. This service will start the Core Keeper dedicated server when our Linux system starts. In addition, if the server crashes for any reason, the service manager will attempt to restart it.
By running the following command, we can begin writing this service file using the nano text editor.
sudo nano /etc/systemd/system/corekeeperserver.service
11. You will want to fill out the following lines within this file.
We have one special addition that we added to this file, and that is the “ExecStartPre
” line. With this line, we are ensuring the Core Keeper server is up to date before it is started. Remove it if you would prefer only to upgrade when you want.
[Unit]
Description=Core Keeper Dedicated Server
After=network.target
[Service]
Type=simple
User=corekeeper
Group=corekeeper
WorkingDirectory=/home/corekeeper/server
ExecStartPre=/usr/games/steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir /home/corekeeper/server +login anonymous +app_update 1963720 +quit
ExecStart=/home/corekeeper/server/_launch.sh
KillMode=process
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
12. Once you have finished filling out this file, you can save and quit by pressing CTRL + X, Y, and then ENTER.
Starting your Core Keeper Dedicated Server on Linux
13. Now that the service file has been written, you will want to enable it so that the Core Keeper server is started when your Linux system powers on.
You can enable the new service using the following terminal command.
sudo systemctl enable corekeeperserver
14. Even though we have enabled the service, the server itself will not have started yet.
You can start up your game server by running the command below.
sudo systemctl start corekeeperserver
Getting the Game ID for your Server
15. Once your Core Keeper Dedicated server is up and running, you will need to know the server’s game ID so that you can actually connect.
Run the following command to output the contents of the “GameID.txt
” file where your game ID is stored.
sudo cat /home/corekeeper/server/GameID.txt; echo
Below, you can see the game ID that was assigned to our server.
WRzngFnLmIRcMRdmUcGHfWGhegp2
Conclusion
By this point in the tutorial, you should hopefully have managed to set up a dedicated server for Core Keeper on your Linux device.
Core Keeper is a multiplayer sandbox survival game where you can farm, craft, and explore with your friends.
Please feel free to post a comment below if you have run into any issues with getting this game server to run on your machine.
If you liked setting up Core Keeper on your machine, we highly recommend checking out the many other game server tutorials we have on offer.