Take snapshots, remove, and re-install Nakama without affecting your primary operating system
Enjoy a quick and simplified installation experience regardless of your OS
Following this guide, you will use Docker Compose to quickly and easily define all the necessary services and run your local development instance of Nakama.
Copy and paste the contents of your preferred option into your docker-compose.yml file.
Windows Users
You must edit the nakama:volumes: entry in your docker-compose.yml file so that it looks like the following: /c/Users/<username>/projects/docker:/nakama/data.
Open a Terminal window and navigate to your Nakama directory. For example:
1
cd desktop/nakama
To pull all required images and start your application, run the following:
1
docker compose up
Congratulations! Your Nakama server is now up and running, available at 127.0.0.1:7350.
Use the Open in Visual Studio Code button (or that for your IDE) to edit your docker-compose.yml file directly.
There are many configuration options available that you can customize for your Nakama server. You can create a YML file for all configurations you want to set, and pass that file to your Docker containers.
First you will need to make a local storage volume available to Docker:
Open your docker-compose.yml file in your preferred text editor.
Edit the nakama:volumes: entry to specify your desired volume. For example, to create a /data folder in our desktop/nakama directory used above, which would be available at nakama/data in the Docker container, it would look like the following:
1
2
volumes:- ./data:/nakama/data
Save the changed file and restart your Docker containers for the change to take effect. From your Terminal:
1
docker compose restart
Next, create your custom configuration file, for example my-config.yml, and place it in the /data folder that you made available to Docker, above.
Open your docker-compose.yml file again, this time to edit the nakama:entrypoint entry to add the --config flag pointing to your configuration file. It should look like this: