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.
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.
|
|
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:
|
|
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.
|
|
Then run Docker Compose to launch Nakama.
|
|
Alternatively to the above, you can follow our guide to installing Nakama using Docker.