Heroic Labs Documentation

Deploy on Digital Ocean #

Running Nakama in a Digital Ocean droplet is a great way to develop using Nakama without needing to install it locally.

Droplet configuration #

Your droplet should have the following configuration:

  • Linux distribution: Ubuntu 20.04 x64
  • RAM: 4GB RAM / 80GB SSD Disk
  • Region: To minimize latency, choose a region close to you.
  • Add a new SSH Key: Create a new SSH key and store the key safely. This is the way you’ll login to your server.

Follow Digital Ocean’s guide if you need help setting up a public key.

Accessing the droplet #

Once the droplet is running, make a note of its IP address from within your Digital Ocean console.

Digital Ocean Dashboard
Digital Ocean Dashboard

For the next steps, you need to SSH into the droplet. There isn’t a need for username/password as you’ve pre-authorized yourself using a public key in the previous step.

1
2
3
ssh root@<IP ADDRESS>
# you are now connected to the droplet through an SSH session.
# you can type `exit` to close the session.

Installing Docker and Docker Compose #

To prepare for installing Nakama, you’ll need to install both Docker and Docker Compose on your droplet.

To do this, run the following commands:

1
2
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

Running Nakama #

Now that you’ve installed Docker and Docker Compose you’ll need to create a docker-compose.yml file. The easiest way to do this is to use the one from the nakama repo itself.

1
curl -fsSL https://raw.githubusercontent.com/heroiclabs/nakama/master/docker-compose.yml -o docker-compose.yml

Then run Docker Compose to launch Nakama.

1
docker compose up

Alternatively to the above, you can follow our guide to installing Nakama using Docker.