nodeGame on DigitalOcean - nodeGame/nodegame GitHub Wiki

Create an Account on Digital Ocean

Please create an account on Digital Ocean using this referral link: https://m.do.co/c/77e0cad8a86b.

You will get 100USD credit to spend during the first two month and you will also contribute to cover nodeGame's hosting expenses at no extra costs for you (please notify us if the amount of credit is different).

Create a nodeGame Droplet Using the Marketplace App

After having registered, you can create a new Digital Ocean server ("droplet") for nodeGame with just a few clicks using the Marketplace app. On the side menu on the right, under the Discover header, click on Marketplace, then type nodeGame in the search box.

The Digital Ocean Marketplace search interface.

In the next page, select "Create NodeGame Droplet."

The Digital Ocean nodeGame App.

Next, you need to specify your droplet's settings. If unsure, you can follow the guidelines below.

Droplet Setup

  1. Choose the cheapest Droplet (5USD per month). Remember, you will be charged only for the time you actually use it. For instance, if you use it for one day and then dispose it, you will be charged approximately 16 cents.

  2. Choose the hosting data center according to your targeted population. For instance, If you plan to mainly reach an American audience, you could pick the NYC data center.

  3. Add additional services, such as backup, as needed (extra charges may occur).

  4. Choose if you want to use a password or a SSH key to login into your Droplet. Using a password requires no additional configuration, but using an SSH key is safer and faster. If you decide to go for the SSH key please follow this guide.

Activate the Droplet

Once created, you need to ssh into your droplet once to activate it. Open a terminal (e.g., Git Bash) and type:

ssh root@DROPLET_ADDRESS

(where DROPLET_ADDRESS is the ip address of your droplet that you can find in the dashboad).

If successful, you should see something like:

The nodeGame droplet's login screen.

Upload Your Game

After you created your nodeGame droplet, you may upload your game inside the games/ directory of the nodeGame server. You have two options:

  • If your game is on an online git repository (e.g., GitHub): open a terminal (e.g., Git Bash) and login into your Droplet. Navigate to the games/ folder inside the nodeGame installation directory and type:

    git clone GIT_ADDRESS

    (where GIT_ADDRESS is the address of your git repository).

  • If your game is on your local computer: open a terminal (e.g., Git Bash) and navigate to the games/ folder inside your local nodegame installation directory and type:

    scp -r YOUR_GAME root@DROPLET_ADDRESS:nodegame-vXXX/games/

    (where YOUR_GAME is the name of the directory containing your game, DROPLET_ADDRESS is the address of your Droplet, and XXX is the actual nodegame version number).

Start Your Game

  • Stop the server: pm2 stop launcher

  • Start your game as default: pm2 start launcher.js -- --default YOUR_GAME

Create a nodeGame Droplet from Scratch

If you feel adventurous, you can manually install nodeGame from scratch.

⚠️ **GitHub.com Fallback** ⚠️