Install and Run CodeCombat Multiplayer Game on Ubuntu 16.04

CodeCombat is a multiplayer programming game for learning how to code. It’s a platform for students to learn computer science while playing through a real game.

It’s both a startup and a community project, completely open source under the MIT and Creative Commons licenses. Furthermore, it’s the largest open source CoffeeScript project by lines of code, and since it’s a game, it’s really fun to hack on.

To install CodeCombat, we need to first setup our database. The database used will be MongoDB


Install MongoDB

  • Import public key, create source list file and install database
sudo apt-key adv --keyserver hkp:// --recv EA312927
echo "deb "$(lsb_release -sc)"/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update && sudo apt-get install -y mongodb-org
  • Create the service file for mongodb
cd /lib/systemd/system/
vim mongod.service
  • Paste below into the file
Description=High-performance, schema-free document-oriented database

ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

  • Reload systemd service with following command
systemctl daemon-reload
  • Start mongodb service and add as a service on startup
systemctl start mongod
systemctl enable mongod

Install and run CodeCombat Multiplayer Game on Ubuntu 16.04

  • Install some needed packages
sudo apt-get install build-essential python2.7 git curl npm nodejs-legacy
  • If your default Python version is 3, then run this also
npm config set python `which python2.7`
  • Next let’s setup Git
git config --global "YOUR_NAME"
git config --global "YOUR_EMAIL_ADDRESS"
  • Next we start cloning the game from the repository
git clone
cd codecombat
git remote add -f upstream
  • Install Dependencies
npm install
  • Let’s import the latest development database and overwrite the current development database
(cd $(mktemp -d /tmp/coco.XXXXXXXX) && curl | tar xzf - && mongorestore --drop --host
  • Run following command to startup brunch and nodemon
npm run dev
  • Open your browser and enter following URL

Now we have our game environment running on Ubuntu 16.04


About the author


A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.


  • HI, i have a problem when run npm run dev

    [email protected]:/lib/systemd/system/codecombat# npm run dev

    > [email protected] dev /lib/systemd/system/codecombat
    > brunch watch –server –env fast

    Loaded brunch static stuff
    Got 560 coffee files and 266 jade files (bundled 126 of them together).
    06 Mar 09:58:11 – error: { [Error: Component must have “/lib/systemd/system/codecombat/bower_components/jquery/bower.json”] code: ‘NO_ BOWER_JSON’ }
    06 Mar 09:58:11 – info: custom server started, initializing watcher
    6 Mar 09:58:12 – [nodemon] v1.6.1
    6 Mar 09:58:12 – [nodemon] reading config /lib/systemd/system/codecombat/nodemon.json
    6 Mar 09:58:12 – [nodemon] to restart at any time, enter `rs`
    6 Mar 09:58:12 – [nodemon] ignoring: /lib/systemd/system/codecombat/.git/**/* /lib/systemd/system/codecombat/node_modules/**/* bower_c omponents .sass-cache
    6 Mar 09:58:12 – [nodemon] watching: server_config.js /lib/systemd/system/codecombat/app/schemas/**/* /lib/systemd /system/codecombat/server/**/* app/assets/main.html
    6 Mar 09:58:12 – [nodemon] watching extensions: js,coffee
    6 Mar 09:58:12 – [nodemon] starting `node .`
    6 Mar 09:58:12 – [nodemon] child pid: 7514
    WARNING: You are using Node v4. Please upgrade to Node v5. Your version: 4.2.6
    6 Mar 09:58:12 – [nodemon] watching 311 files
    throw err;

    6 Mar 09:58:15 – [nodemon] app crashed – waiting for file changes before starting…
    06 Mar 09:58:30 – info: compiled 5 files into 2 files, copied 7 in 19610ms
    I feel the need, the need… for speed.
    Compile app/templates/static/about.static.pug /lib/systemd/system/codecombat/app
    Wrote to app/templates/static/about.html [ ‘’, undefined ]
    Compile app/templates/static/home.static.pug /lib/systemd/system/codecombat/app
    Wrote to app/templates/static/home.html [ ‘’, undefined ]
    Compile app/templates/static/legal.static.pug /lib/systemd/system/codecombat/app
    Wrote to app/templates/static/legal.html [ ‘’, undefined ]
    Compile app/templates/static/layout.static.pug /lib/systemd/system/codecombat/app
    Wrote to app/templates/static/layout.html [ ‘’ ]
    Compile app/templates/static/mock.static.pug /lib/systemd/system/codecombat/app
    Wrote to app/templates/static/mock.html [ ‘’,
    ‘app/templates/static/layout.static.pug’ ]
    Compile app/templates/static/overworld.static.pug /lib/systemd/system/codecombat/app
    Wrote to app/templates/static/overworld.html [ ‘’, undefined ]
    Compile app/templates/static/main.static.pug /lib/systemd/system/codecombat/app
    Wrote to app/templates/static/main.html [ ‘’,
    ‘app/templates/static/layout.static.pug’ ]
    Compile app/templates/static/privacy.static.pug /lib/systemd/system/codecombat/app
    Wrote to app/templates/static/privacy.html [ ‘’, undefined ]
    Compile app/templates/static/premium-features.static.pug /lib/systemd/system/codecombat/app
    Wrote to app/templates/static/premium-features.html [ ‘’, undefined ]

    please help me

Leave a Comment