Deploy a Just Cause 2 Multiplayer Server on Ubuntu 14.04
Traducciones al EspañolEstamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
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 Linode, install SteamCMD and then install and configure Just Cause 2’s multiplayer mod.
Before You Begin
Complete our guide: Install SteamCMD for a Steam Game Server. This will get SteamCMD installed and running on your Linode and this guide will pick up where the SteamCMD page leaves off.
NoteThis guide is written for a non-root user. Commands that require elevated privileges are prefixed with
sudo. If you’re not familiar with the
sudocommand, you can check our Users and Groups guide.
Prerequisites for Just Cause 2
From the SteamCMD guide, two additional steps are needed specifically for JC2.
Add two iptables firewall rules. These commands assume that you have only the iptables rules in place from the SteamCMD guide. These insert a rules after the pre-existing iptables rules for SteamCMD.
sudo iptables -I INPUT 7 -p udp -m udp --sport 10999 --dport 1025:65355 -j ACCEPT sudo iptables -I INPUT 8 -p udp -m udp --dport 7777 -j ACCEPT sudo iptables -I INPUT 9 -p udp -m udp --dport 7778 -j ACCEPT
After entering the above rules, run iptables-persistent again. You’ll be asked if you want to save the current IPv4 and IPv6 rules. Answer
yesfor IPv4 and
sudo dpkg-reconfigure iptables-persistent
Install Just Cause 2
Be sure you are in the directory
~/Steam, then access the
cd ~/Steam && ./steamcmd.sh
From the SteamCMD prompt, login anonymously:
Or log in with your Steam username:
Install JC2 to the
Steamuser’s home directory:
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. Once the download is complete, you should see this output:
Success! App '261140' fully installed. Steam>
NoteTo update JC2, run the above 4 commands again.
Configure Just Cause 2 - Multiplayer (JC2-MP)
Before you configure JC2-MP, make a copy of the default configuration file:
cd ~/Steam/jc2mp-server cp default_config.lua config.lua
config.luawith your preferred text editor. Every possible server option is explained in the configuration file. Simply follow the instructions and when finished, be sure to save your changes. At minimum, you’ll want to set a server name and access password.
Before starting up the server for the first time, it is good to symlink a library file to avoid a possible error:
ln -s ~/Steam/linux32/libstdc++.so.6 libstdc++.so.6
Create a startup script for JC2 with the following contents:
- File: ~/startjc2.sh
1 2 3 4
#!/bin/sh cd ./Steam/jc2mp-server screen -S "Just Cause 2 Muliplayer Server" ./Jcmp-Server
When run, the script will change directories to
~/Steam/jc2mp-serverand execute JC2 in a Screen session.
Make the script executable:
chmod +x ~/startjc2.sh
Start the Server
Now that your server is installed and configured, it can be launched by running the
startjc2.shscript from your
steamuser’s home directory.
cd ~/ && ./startjc2.sh
CautionFrom this point, do not press the Control+C keys while in the console unless you want to stop JC2.
To detach from the screen session running the server console, press these two key combinations in succession:
To bring the console back, type the following command:
To stop the server, bring back the JC2 console and press CONTROL + C.
Enter The Server
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.
This page was originally published on