Download

Server

The current version is v2.9.19.

The server is written in Go and compiles to a ~16MB native binary. A notable feature is the sparse set of dependencies the server relies on.

There are several ways to download and install the NATS server depending on the environment you are targeting.

If you are looking to design and run a production deployment of NATS, refer to the deployment section.

Builds

Standalone builds for all supported operating systems and CPU architectures are available as downloadable assets on the GitHub releases page. For convenience, here is a matrix of with direct links:

LinuxmacOSWindowsFreeBSD
amd64zip, tgzzip, tgzzip, tgzzip, tgz
arm64zip, tgzzip, tgzzip, tgz-
arm6zip, tgz-zip, tgz-
arm7zip, tgz-zip, tgz-
386zip, tgz-zip, tgz-
mips64lezip, tgz---
s390xzip, tgz---

Need a build for a different operating system or architecture? Feel free to open an issue to propose it be integrated in the release process.

Packages

The nats-server package is available in a variety of repositories, however they may be significantly outdated. Repology is a useful tool to check whether the version is up-to-date for a handful of common package repositories and distribution versions.

Linux

Official builds are packaged for Debian and Red Hat-based distributions.

DebianRedHat
amd64debrpm
arm64debrpm
arm6debrpm
arm7debrpm
386debrpm
mips64ledebrpm
s390xdebrpm

Debian/Ubuntu

Install it using apt install with the appropriate permissions (i.e. sudo).

apt install ./nats-server-<version>-<arch>.deb

CentOS/RedHat

Install it using rpm with the appropriate permissions (i.e. sudo).

rpm -i ./nats-server-<version>-<arch>.rpm

macOS

Homebrew

Homebrew is updated via community contribution, but the Formulae is often updated the same day that a new release is made.

brew install nats-server

Windows

Scoop

scoop bucket add main
scoop install main/nats-server

Docker

Official Docker images are availble. To run the server locally and expose it for client connections, run the following command.

docker run -p 4222:4222 -ti nats:2.9.19

Nightly builds

Synadia hosts repositories for nightly Docker image builds off the main branch and the dev branch. The main branch tracks the next patch release, e.g. 2.9.17 → 2.9.18, while the dev branch tracks the next minor release, e.g. 2.9.x → 2.10.0.

Main

docker run -p 4222:4222 -ti synadia/nats-server:nightly-main

Dev

docker run -p 4222:4222 -ti synadia/nats-server:nightly

Kubernetes

A Helm chart is available to delpoy to Kubernetes. This can be accomplished by registering the repo with Helm and ensuring it is up-to-date.

helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm repo update

Prior to installing, refer to the configuration options available for the values.yaml file. To install the chart, run the following command.

helm install nats nats/nats -f values.yaml

Source

Building from source requires a recent version of the Go compiler. Once installed, it can be built and installed from source using the go tool.

go get github.com/nats-io/nats-server/v2
Previous
Quick Tour