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:
Linux | macOS | Windows | FreeBSD | |
---|---|---|---|---|
amd64 | zip, tgz | zip, tgz | zip, tgz | zip, tgz |
arm64 | zip, tgz | zip, tgz | zip, tgz | - |
arm6 | zip, tgz | - | zip, tgz | - |
arm7 | zip, tgz | - | zip, tgz | - |
386 | zip, tgz | - | zip, tgz | - |
mips64le | zip, tgz | - | - | - |
s390x | zip, 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.
Debian | RedHat | |
---|---|---|
amd64 | deb | rpm |
arm64 | deb | rpm |
arm6 | deb | rpm |
arm7 | deb | rpm |
386 | deb | rpm |
mips64le | deb | rpm |
s390x | deb | rpm |
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