# macOS Binary

**URL:** https://heroiclabs.com/docs/nakama/getting-started/install/macos/
**Summary:** How to setup and run Nakama binary and its prerequisites on macOS. The binary setup allows you to install and manage Nakama without Docker.
**Keywords:** installing nakama, install nakama, nakama mac, nakama mac os, nakama binary, installation, mac os, postgres, migration
**Categories:** nakama, macos, install

---


# Install Nakama Binary for macOS

This tutorial will show you how to setup and run Nakama binary and its prerequisites on macOS.

The binary setup allows you to install and manage Nakama without [Docker](../docker/) but it requires extra steps to setup and manage:

- Installing CockroachDB or PostgreSQL
- Manually applying database migrations
- Manually upgrading Nakama and its database to newer versions
- Configuring services or manually starting Nakama and its database

## Prerequisites

### Operating system

Before proceeding ensure that you are running macOS 10.9 (Mavericks) or higher.

Next, install a supported database engine.

### CockroachDB

Nakama officially supports CockroachDB v20.0 or higher, with queries optimised for its storage engine.

Install CockroachDB via one the [official supported methods](https://www.cockroachlabs.com/docs/stable/install-cockroachdb.html):

- Homebrew
- Binary
- Build from source

### PostgreSQL

Nakama unofficially supports PostgreSQL 9.6 or higher for development environments only.

Install PostgreSQL via:

- [Official PostgreSQL macOS packages](https://www.postgresql.org/download/macosx/)
- [Postgres.app](https://postgresapp.com/)
- [Homebrew](https://wiki.postgresql.org/wiki/Homebrew)

## Download Nakama

Get the latest binary release of Nakama server for macOS:

1. Download a release from the Nakama GitHub repo [releases page](https://github.com/heroiclabs/nakama/releases)
2. Extract the archive, optionally rename and move the folder to a suitable location

## Running Nakama

Before starting Nakama server you will need to run:

1. Your chosen database, CockroachDB or PostgreSQL.
2. Nakama database migrations if it is your first time running Nakama or you have upgraded Nakama versions.

### Nakama migrations

If this is your first time running Nakama or you have upgraded Nakama versions, you may need to run Nakama database migrations. If you are unsure, running migrations again is safe.

If you are running CockroachDB with the default configuration, running migrations is straightforward with no additional options necessary.

If you are using PosgreSQL you will need to supply your database server address, user and password.

To run Nakama migrations, navigate to your Nakama directory and run the following:

**CockroachDB**

```sh
./nakama migrate up
```

**PostgreSQL**

```sh
./nakama migrate up --database.address postgres:password@127.0.0.1:5432
```

### Nakama server

To start Nakama server with CockroachDB or PostgreSQL, navigate to your Nakama directory and run the following:

**CockroachDB**

```sh
./nakama
```

**PostgreSQL**

```sh
./nakama --database.address postgres:password@127.0.0.1:5432
```

You will need to provide the same `database.address` value used for running [Nakama PostgreSQL database migrations](#nakama-migrations).

## 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:password`. These can be changed via configuration file or command-line flags.

## Configuration file

There are many [configuration options](../../configuration/) available that you can customize for your Nakama server.

## Next steps

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