Home / Server / Getting started / Linux Server

Welcome to the JC2-MP Linux server tutorial. This page will explain the very basics of setting up a Linux server. This tutorial assumes you already have some basic Linux knowledge.

64-bit servers

SteamCMD and their libraries are currently 32-bit only, so our server is limited to 32-bit. You can still run it on a 64-bit server by installing the required packages shown below.

Debian, Ubuntu, Mint

dpkg --add-architecture i386
apt-get update
apt-get install libc6-i386 lib32gcc1 lib32stdc++6

CentOS, RHEL, Fedora

yum install glibc.i686 libstdc++.i686

Downloading SteamCMD

First we need to download SteamCMD. For more information on SteamCMD please click here
Login to your server with SSH, then head over to the home directory, we will make our Steam folder there.
cd ~/
mkdir steam
cd steam

Now we can download SteamCMD and unpack it.
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar -xvf steamcmd_linux.tar.gz
rm steamcmd_linux.tar.gz

Running SteamCMD and downloading the server

Now we need to run SteamCMD.
./steamcmd.sh

SteamCMD will now update and it might download some files, wait until it finishes.
Then it's time to login with an anonymous Steam account to get access to the server
login anonymous

Now let's download the latest server version!
force_install_dir ./jcmp
app_update 261140

To install the public beta. Keep in mind, only players who opt-in to the public beta will be able to join this server
force_install_dir ./jcmp
app_update 261140 -beta publicbeta

If you get problems with the installation, you may try validating the server files.
app_update 261140 validate

It will now download the latest server version. Once it is done downloading we can safely exit SteamCMD.
quit

Changing the server options

First, let's move to the JC2-MP server directory.
cd jcmp

By default, your server will not come with a config.lua - instead, it comes with a default config. To use it, simply move it into place:
mv default_config.lua config.lua

Now, use your favorite editor to edit the server's configuration file. For most people, nano will be sufficient:
nano config.lua

Every possible server option is explained in the configuration file. Simply follow the instructions.

Starting up the server in screen

Now that we have successfully downloaded the server and configured it, we can now start it up. We will do this in a screen.
If you do not have screen installed type:
apt-get install screen

on Debian based systems or:
yum install screen

on Redhat based systems.
And follow the instructions.
Now start the screen and the server.
screen -dmS jcmp ./Jcmp-Server

This will run a silent screen in the background.
To access the screen / JC2-MP server type the following:
screen -x jcmp

It should now say that the server has successfully started.
Your server may say something along the lines of "[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed." - this is perfectly normal. As long as your server says "Server started up successfully", your server is fine.
You can press CTRL + A then CTRL + D to exit the screen safely without stopping the server.
You are now ready to play on your own server and you can start adding scripts and gamemodes.
To stop the server and kill the screen type:
screen -S jcmp -X quit

Updating the server

To update the server to the latest version we will need to run SteamCMD again.
First cd to your Steam directory.
cd /home/steam

Now run SteamCMD.
./steamcmd.sh

Then it's time to login with an anonymous Steam account to get access to the server
login anonymous

Now let's update to the latest server version!
force_install_dir ./jcmp
app_update 261140

If you get problems with the install, try validating the server files.
app_update 261140 validate

You can now quit SteamCMD.
quit

Congratulations, your server is now updated to the latest version!

FAQ

Q) When I try to run the server, I get the following error:
Jcmp-Server: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15` not found (required by ./libsteam_api.so)

A) This either means that you are running an older version of Debian, or you're running CentOS. To solve this, copy libstdc++.so.6 from the linux32 folder where your steamcmd.sh script is into the folder where your Jcmp-Server binary is located.
Q) One of the default scripts are not working on my linux server.
A) This is caused most likely because the scripts that you downloaded with the server are outdated, so you will need to download and install the updated ones from GitHub.