Personal tools

Server/Getting started/FreeBSD Server

From JC2-MP Documentation

< Server
Revision as of 14:06, 9 February 2014 by Pricetx (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Update 2014-02-09:

It appears that the LANG requirement no longer exists, so I have removed it. Also, due to a change on Valve's part, you now need a slightly modified, which I have provided below.


This is a guide to running the server software for JC2:MP under FreeBSD. This is NOT an area to discuss the pros/cons of FreeBSD over Linux.

NOTE: If/when the wiki becomes publicly editable, I may move this guide over there, so it doesn't get lost amongst other threads.

Package requirements:

[list] [li]bash[/li] [li]linux_base-c6[/li] [li]tmux (if you want to use my script in step 5)[/li] [/list]

Part 1: Setting up the Linux compatibility layer:

First, we need to load the linux kernel module, and tell it to start automatically on boot: [code]kldload linux[/code] [code]echo linux_enable=\"YES\" >> /etc/rc.conf[/code]

We also need to change the compatability layer OS release sysctl to allow us to use the newer CentOS 6 base (instead of the old Fedora 10 base) [code]sysctl compat.linux.osrelease=2.6.18[/code]

And also add this to /etc/sysctl.conf to remember across reboots [code]echo compat.linux.osrelease=2.6.18 >> /etc/sysctl.conf[/code]

Now, we need to install [code]emulators/linux_base-c6[/code] To do this, run the following two commands: [code]cd /usr/ports/emulators/linux_base-c6[/code] [code]make install clean/[/code]

Finally, we need to mount linprocfs. First, add the following line to /etc/fstab: [code]linproc /compat/linux/proc linprocfs rw,late 0 0[/code]

Then run the following commands: [code]mkdir -p /usr/compat/linux/proc[/code] [code]ln -s /usr/compat /compat[/code] [code]mount linproc[/code]

Part 2: Installing SteamCMD

First, we need to set up SteamCMD. First make a directory for it somewhere, and run the following command: [code]fetch[/code]

Next, we need to extract it: [code]tar -xvf steamcmd_linux.tar.gz[/code]

SteamCMD needs a few edits to work under FreeBSD (mainly changing the path to bash, and forcing it to linux32). I have provided a working script below: [url=][/url]

now, run [code]./[/code] Once it has finished loading, run [code]login anonymous[/code]

Now we need to set a directory for the server to install to. Personally I always lay out SteamCMD installations as follows. If my username was "server" I would have /home/server/steamcmd containing, and /home/server/jcmp containing the actual jcmp server. This means that the jcmp folder is one folder up from the steamcmd folder.

To do this, you would enter the following: [code]force_install_dir ../jcmp[/code] However, you can install it wherever you like, as long as you have sufficient permissions.

Now we need to download the game itself, this is also the command used to update the game. [code]app_update 261140[/code]

NOTE: if it hangs during the download, simply exit (ctrl+c), and re-run

Once this has finished, type the following to exit: [code]quit[/code]

Step 3: Acquiring

We need to get a working (up-to-date enough) copy of to be used by The easiest way is to go to the folder where you downloaded SteamCMD, and go into the "linux32" folder. There you will find the file. Run the following command to copy into the folder containing "Jcmp-Server"

[code]cp /path/to/jcmp/[/code]

Step 4: Running JC2:MP

I have written a script to easily manage the operation of the JC2:MP server, you can find the thread for it here:,4059.msg30179.html

If you attempt this and have any issues, please reply to this thread and I will get back to you as soon as possible.