Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":2294,"date":"2019-11-26T07:22:55","date_gmt":"2019-11-26T07:22:55","guid":{"rendered":"https:\/\/support.aklwebhost.com\/?post_type=manual_kb&p=2294"},"modified":"2019-12-08T23:36:12","modified_gmt":"2019-12-08T23:36:12","slug":"setting-up-a-jc2mp-game-server-on-debian","status":"publish","type":"manual_kb","link":"https:\/\/support.aklwebhost.com\/knowledgebase\/setting-up-a-jc2mp-game-server-on-debian\/","title":{"rendered":"Setting Up A JC2:MP Game Server On Debian"},"content":{"rendered":"

In this guide, we will be setting up a Just\u00a0Cause 2: Multiplayer Linux server.<\/strong><\/p>\n

These commands were tested on\u00a0Debian 7 x64<\/strong>, but they should also work on the current version of Ubuntu.<\/p>\n

The first step is logging into our server as root. We need to install a few packages before we can run the JC2 : MP server.<\/p>\n

If you’re running x64, execute these commands:<\/strong><\/p>\n

dpkg --add-architecture i386\r\napt-get update\r\napt-get install -y libc6-i386 lib32gcc1 lib32stdc++6 screen\r\n<\/code><\/pre>\n

If you’re running x86, execute these commands:<\/strong><\/p>\n

apt-get update \r\napt-get install -y screen\r\n<\/code><\/pre>\n

If you get a warning about “Setting locale failed”, execute the following commands:<\/strong><\/p>\n

export LANGUAGE=en_US.UTF-8\r\nexport LANG=en_US.UTF-8\r\nexport LC_ALL=en_US.UTF-8\r\nlocale-gen en_US.UTF-8\r\ndpkg-reconfigure locales\r\n<\/code><\/pre>\n

(Full credit goes to “Werner Fischer” for the locale commands)<\/p>\n

When you get to the configuration screen, press\u00a0ENTER<\/strong>, select\u00a0en_US<\/code>\u00a0and press\u00a0ENTER<\/strong>\u00a0again. After that, restart your SSH session.<\/p>\n

Now, we need to create a user for our JC2:MP server, since running things as root is a bad idea. To do that:<\/p>\n

adduser steam\r\n<\/code><\/pre>\n

Follow the prompts to set a password for your user. Press\u00a0ENTER<\/strong>\u00a0to skip entering user information.<\/p>\n

Next, we want to execute commands as the user\u00a0steam<\/code>. Switch to the\u00a0steam<\/code>\u00a0user by executing following command:<\/p>\n

su steam\r\n<\/code><\/pre>\n

Make a folder and grab the\u00a0steamcmd<\/code>\u00a0software to download JC2:MP. This is done by running:<\/p>\n

mkdir ~\/steamcmd\r\ncd ~\/steamcmd\r\nwget http:\/\/media.steampowered.com\/client\/steamcmd_linux.tar.gz\r\ntar -xf steamcmd_linux.tar.gz\r\nrm steamcmd_linux.tar.gz\r\n<\/code><\/pre>\n

We’re ready to download the JC2:MP server software! Execute the following command and wait while the files are downloaded:<\/p>\n

.\/steamcmd.sh +login anonymous +force_install_dir ~\/jc2mp +app_update 261140 validate +quit\r\n<\/code><\/pre>\n

If the download fails for some reason, you can just re-issue the command again and it will pick up where it left off. The download shouldn’t take too long since it just contains the server files.<\/p>\n

Once the download is finished, we need to configure our JC2:MP server:<\/p>\n

cd ~\/jc2mp\r\nmv default_config.lua config.lua\r\nnano config.lua\r\n<\/code><\/pre>\n

How you configure this file is up to you, however you should probably change:<\/p>\n

MaxPlayers<\/strong>\u00a0– A cap of 5000 players isn’t needed, a more reasonable limit of 200 would probably be enough.<\/p>\n

Name<\/strong>\u00a0– Name your server something nice, if you leave it as the default “JC2-MP Server”, then you might not be able to find it.<\/p>\n

Password<\/strong>\u00a0– If you want your server to be private, you should set the password.<\/p>\n

There are tons of options in this config file that you can change if you need\/want to experiment. Once you’re done editing it, you can save the file by pressing\u00a0CTRL + X<\/strong>\u00a0and then\u00a0Y<\/strong>.<\/p>\n

After you’ve configured your server’s options, you will need to start a new SSH session and login as the\u00a0steam<\/code>\u00a0user that we created before. After logging in, launch your server by running:<\/p>\n

cd ~\/jc2mp\r\nscreen -S jc2mp .\/Jcmp-Server\r\n<\/code><\/pre>\n

Or if you prefer not to create a new SSH session and launch it silently:<\/p>\n

screen -dmS jc2mp .\/Jcmp-Server\r\n<\/code><\/pre>\n

If you choose the first option, you can “detach” from that screen by pressing\u00a0CTRL<\/strong>,\u00a0A + D<\/strong>\u00a0at the same time. You may reattach to that screen anytime by typing:<\/p>\n

screen -r jc2mp\r\n<\/code><\/pre>\n

To start your server in the future, log in as the\u00a0steam<\/code>\u00a0user and execute:<\/p>\n

cd ~\/jc2mp\r\nscreen -S jc2mp .\/Jcmp-Server\r\n<\/code><\/pre>\n

Congratulations! Your JC2:MP server is now up and running! Now you can invite your friends to it or start adding scripts.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[105,233,242],"manual_kb_tag":[202],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2294"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2294"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2294\/revisions"}],"predecessor-version":[{"id":2295,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2294\/revisions\/2295"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2294"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2294"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}