> For the complete documentation index, see [llms.txt](https://docs.k9.io/key9-identity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.k9.io/key9-identity/maxmind-api-proxy/getting-started/installation.md).

# Installation

There are two ways to get `maxmind-api-proxy` running: build it from source or download a pre-built binary.

***

## Option 1 — Build from source

### Prerequisites

* [Go 1.21 or later](https://go.dev/dl/)
* Git
* A running Redis instance (see [How Caching Works](/key9-identity/maxmind-api-proxy/caching/overview.md))

### Steps

```bash
# Clone the repository
git clone https://github.com/k9io/maxmind-api-proxy.git
cd maxmind-api-proxy

# Download dependencies
go mod tidy

# Build the binary
go build -o maxmind-api-proxy
```

The resulting `maxmind-api-proxy` binary is statically linked with `CGO_ENABLED=0` and has no runtime dependencies.

### Building for a different platform

The build script in `scripts/build-all` cross-compiles for every platform Go supports. To build for a specific target manually:

```bash
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o maxmind-api-proxy-linux-amd64
```

Common `GOOS`/`GOARCH` combinations:

| OS      | Architecture     | `GOOS`    | `GOARCH` |
| ------- | ---------------- | --------- | -------- |
| Linux   | 64-bit Intel/AMD | `linux`   | `amd64`  |
| Linux   | ARM 64-bit       | `linux`   | `arm64`  |
| macOS   | Apple Silicon    | `darwin`  | `arm64`  |
| macOS   | Intel            | `darwin`  | `amd64`  |
| Windows | 64-bit           | `windows` | `amd64`  |
| FreeBSD | 64-bit           | `freebsd` | `amd64`  |

***

## Option 2 — Pre-built binaries

Pre-compiled binaries for Linux, macOS, Windows, FreeBSD, NetBSD, Solaris, and multiple CPU architectures are published at:

<https://github.com/k9io/k9-binaries/tree/main/maxmind-api-proxy>

Each binary is distributed as a `.gz` archive alongside a `sha256` checksum file. Always verify the checksum before running a downloaded binary.

```bash
# Example: Linux amd64
wget https://github.com/k9io/k9-binaries/raw/main/maxmind-api-proxy/linux/maxmind-api-proxy.amd64.gz
wget https://github.com/k9io/k9-binaries/raw/main/maxmind-api-proxy/linux/maxmind-api-proxy.amd64.gz-sha256.txt

# Verify integrity
sha256sum -c maxmind-api-proxy.amd64.gz-sha256.txt

# Extract and make executable
gunzip maxmind-api-proxy.amd64.gz
chmod +x maxmind-api-proxy.amd64
```

***

## Next step

Once you have the binary, [configure the proxy](/key9-identity/maxmind-api-proxy/configuration/configuration.md) before running it.
