# Docker Compose

**URL:** https://heroiclabs.com/docs/nakama/getting-started/install/docker/
**Summary:** See the prerequisites and installation procedure for running Nakama via Docker.
**Keywords:** installing nakama, install nakama, nakama docker, nakama docker compose, nakama container, installation, docker, docker compose, postgres
**Categories:** nakama, docker, install

---


# Install Nakama with Docker Compose

[Docker](https://www.docker.com/) is the quickest way to download and start developing with Nakama. By using Docker you are able to:

- Install to a pristine environment
- Easily install and run the [PostgreSQL](https://www.postgresql.org/) database for Nakama
- 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](https://docs.docker.com/compose/) to quickly and easily define all the necessary services and run your local development instance of Nakama.

{{< sample-projects-banner title="Prefer hands-on learning?" >}}

## Prerequisites

Before proceeding ensure that you have [installed Docker Desktop](https://docs.docker.com/get-docker/).

{{< note "important" "Linux Users" >}}
Docker Desktop is only available for Mac and Windows. You must install [Docker Engine](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/) individually for your distribution.
{{< / note >}}

## Running Nakama

1. Start by creating a directory where your Nakama server will live, for example `desktop/nakama`.
2. Download or copy the `docker-compose.yml` file, and place it in the directory you just created.
{{< code src="https://raw.githubusercontent.com/heroiclabs/nakama/master/docker-compose-postgres.yml" type="server" filename="docker-compose.yml" url="https://raw.githubusercontent.com/heroiclabs/nakama/master/docker-compose-postgres.yml" hideable="false" >}}
{{< /code >}}

{{< note "important" "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`.
{{< / note >}}

3. Open a Terminal window and navigate to your Nakama directory. For example:

```sh
cd desktop/nakama
```

4. To pull all required images and start your application, run the following:

```sh
docker compose up
```

5. Congratulations! Your Nakama server is now up and running, available at `127.0.0.1:7350`.

{{< screenshot
  src="/images/pages/nakama/getting-started/install/docker-nakama-run.png"
  alt="Terminal output from docker compose up showing the Nakama server and CockroachDB containers starting successfully and Nakama listening on port 7350"
  caption="Nakama containers running"
  border-style="none"
>}}

Use the **Open in Visual Studio Code** button (or that for your IDE) to edit your `docker-compose.yml` file directly.

## Nakama Console

You can access the [Nakama Console](../../console/) by navigating your browser to [127.0.0.1:7351](http://127.0.0.1:7351).

When prompted to login, the default credentials are `admin` for username and `password` for password. These can be changed via configuration file or command-line flags.

## Configuration

Nakama reads settings from a YAML configuration file. If no file is supplied, Nakama starts with built-in defaults. Start with the [Server configuration](../../configuration/) guide to learn how to supply a config file, which options to change first, and how to override values at startup.

When running in Docker, mount the file into the Nakama container and reference it with the `--config` flag in `docker-compose.yml` so the server reads it at startup. For step-by-step instructions and examples, see the [Docker configuration](../../configuration/docker-configuration/) guide.

## Next steps

With your Nakama server now up and running with the desired configuration, you can get started with your preferred client SDK.
