Install and Configure a Just Cause 2 Multiplayer Server on Ubuntu 14.04

Just Cause 2 is a single-player game published by Square Enix. Because it has no multiplayer mode, the modding community has created a multiplayer mod for the game that is quite popular. This guide will explain how to prepare your VPS, install SteamCMD and then install and configure Just Cause 2’s multiplayer mod.

Before You Begin

Have the following items available:

  • Steam account.
  • A copy of Just Cause 2 that you have purchased on Steam.
  • A copy of the Just Cause 2 Multiplayer Mod that has been added to your steam library.
  • An up-to-date VPS running Ubuntu 14.04. We suggest you follow our Getting Started guide for help configuring your VPS.

This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo.

Preparing your VPS

Just Cause 2 is sold on Steam, along with its multiplayer mod. To download and maintain servers for the game, we will use SteamCMD.

Because current generation VPS machines run a 64-bit operating system, we need to download a few extra libraries in order to run SteamCMD.

  1. Configure the package manager to include packages for i386 architecture:

    1
    sudo dpkg --add-architecture i386
    
  2. Update the system:

    1
    sudo apt-get update && sudo apt-get upgrade
    
  3. Install the 32-bit libraries required:

    1
    sudo apt-get install lib32gcc1 lib32stdc++6 libc6-i386 libcurl4-gnutls-dev:i386 screen
    

    If you’re running a legacy VPS on a 32-bit kernel, install these packages instead:

    1
    sudo apt-get install libcurl4-gnutls-dev:i386 libc6-i386 libgcc1 screen
    

If you have a firewall running on your VPS, add exceptions for SteamCMD:

1
2
3
sudo iptables -A INPUT -p udp- m udp --sport 4380 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --sport 10999 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --sport 7777 --dport 1025:65355 -j ACCEPT

If you’ve configured your firewall according to our Securing Your Server guide, be sure to add these port ranges to your /etc/iptables.firewall.rules file.

Install SteamCMD and Just Cause 2

  1. From your user’s home folder, download SteamCMD into its own directory:

    1
    2
    3
    mkdir steamcmd
    cd steamcmd
    wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz
    
  2. Extract the package and remove the archive file:

    1
    2
    tar -xvzf steamcmd_linux.tar.gz
    rm steamcmd_linux.tar.gz
    
  3. Run the SteamCMD Installer:

    1
    ./steamcmd.sh
    

    This command will display output similar to this:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    Redirecting stderr to '/home/VPS/Steam/logs/stderr.txt'
    [  0%] Checking for available updates...
    [----] Downloading update (0 of 7,013 KB)...
    [  0%] Downloading update (1,300 of 7,013 KB)...
    [ 18%] Downloading update (3,412 of 7,013 KB)...
    [ 48%] Downloading update (5,131 of 7,013 KB)...
    [ 73%] Downloading update (6,397 of 7,013 KB)...
    [ 91%] Downloading update (7,013 of 7,013 KB)...
    [100%] Download complete.
    [----] Installing update...
    [----] Extracting package...
    [----] Extracting package...
    [----] Extracting package...
    [----] Installing update...
    [----] Installing update...
    [----] Installing update...
    [----] Cleaning up...
    [----] Update complete, launching Steam...
    Redirecting stderr to '/home/VPS/Steam/logs/stderr.txt'
    [  0%] Checking for available updates...
    [----] Verifying installation...
    Steam Console Client (c) Valve Corporation
    -- type 'quit' to exit --
    Loading Steam API...OK.
    
    Steam>
    

    The Steam> prompt is similar to the Linux command prompt, with the exception of its not being able to execute normal Linux commands.

  4. Install JC2-MP from the SteamCMD prompt:

    1
    2
    3
    login anonymous
    force_install_dir ../jc2mp-server
    app_update 261140 validate
    

    This can take some time. If the download looks as if it has frozen, be patient; it may take about 10 minutes. Once the download is complete, you should see this output:

    1
    2
    3
    Success! App '261140' fully installed.
    
    Steam>
    
  5. Finally, exit SteamCMD:

    1
    quit
    

Configuring Just Cause 2 - Multiplayer (JC2-MP)

  1. Before you configure JC2-MP, make a copy of the default configuration file:

    1
    2
    cd ~/jc2mp-server
    cp default_config.lua config.lua
    
  2. Open the configuration file with nano to edit the configuration. Every possible server option is explained in the configuration file. Simply follow the instructions:

    1
    nano config.lua
    
  3. When you are finished, exit nano and save your changes.

Using the Server

  1. Before starting up the server for the first time, it is good to symlink a library file to avoid a possible error:

    1
    2
    cd ~/jc2mp-server
    ln -s ~/steamcmd/linux32/libstdc++.so.6 libstdc++.so.6
    
  2. To start the server, simply run the executable: screen ./Jcmp-server

  3. To detach from the screen session running the server console, press these two key-combinations in succession:

    CONTROL + A
    CONTROL + D

  4. To bring the console back, type the following command:

    1
    screen -r
    
  5. To stop the server, either bring back the console or type quit.

Entering The Server

JC2-MP Server with users on it

Now that you have installed and configured Just Cause 2 - Multiplayer, you have your very own Just Cause 2 server for you and your friends to play on. Your users can access the server by opening the server list, finding your server’s name, clicking Connect, and then entering a password - if you choose to set one.

Source: +

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Install a Counter Strike: Global Offensive (CS:GO) server on Ubuntu 14.04

Counter Strike: Global Offensive (CS:GO) is a first-person shooter by Valve. By hosting your own...

Running a Spigot Minecraft Server on Ubuntu 14.04 and 14.10

This guide shows you how to setup your own Minecraft server on a Linode running Ubuntu...

Host a Terraria Server on Your Linode

Terraria is a two-dimensional sandbox game similar to Minecraft which allows players to explore,...

Install and Configure Don’t Starve Together Server on Ubuntu 14.04

Don’t Starve Together is a multiplayer game written and published by Klei Entertainment, and is a...

Installing Multicraft on Debian

Multicraft is a control panel for single or multiple Minecraft servers Free and paid versions are...