# 使用 Homebrew, apk, apt, Nix, scoop, winget 安装 nats-server

查看 nats-server 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:nats-server
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install nats-server
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add nats-server
```

  证据: Alpine Linux edge package indexes: nats-server from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install nats-server
```

  证据: Debian stable package indexes: nats-server from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#nats-server
```

  证据: nixpkgs package indexes: pkgs/by-name/na/nats-server/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- Scoop (92%):

```sh
scoop install main/nats-server
```

  证据: Scoop official bucket manifest trees: bucket/nats-server.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id NATSAuthors.NATSServer -e
```

  证据: Windows Package Manager source index: NATSAuthors.NATSServer from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:nats-server
- **软件包管理器:** Homebrew
- **版本:** 2.14.4
- **来源摘要:** Lightweight cloud messaging system
- **主页:** <https://nats.io>
- **仓库:** <https://github.com/nats-io/nats-server>
- **最后更新:** 2026-07-30T15:53:24Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- nats-server (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.14.4
## 项目历史与用法

NATS Server is the Go server for NATS, a subject-based connective messaging system for distributed systems, microservices, edge, IoT, command/control, and event or stream processing.

### 项目历史

NATS was created by Derek Collison. NATS documentation says the acronym stands for Neural Autonomic Transport System and that Collison conceived it as a central-nervous-system-like messaging platform. A 2016 NATS blog post explains that it began as a central nervous system for a cloud control plane, initially without higher QoS guarantees beyond TCP/IP.

The nats-io/nats-server repository was created on 2012-10-29. NATS Streaming was announced on 2016-07-19 to add persistence and delivery guarantees as a layered service; later NATS Server 2.2 made JetStream the recommended persistence, streaming, and higher-guarantee option, while NATS Streaming became deprecated.

CNCF announced hosting NATS on 2018-03-15 at incubating maturity. The NATS FAQ says maintainership follows a governance process as part of CNCF, with Synadia engineers and community maintainers maintaining the server, streaming server, and official client libraries.

### 采用历史

GitHub API data fetched on 2026-07-01 showed 20,126 stars and 1,856 forks, the largest upstream community signal in this batch. Homebrew's formula JSON generated on 2026-07-01 reported 8,660 installs over 365 days and 8,658 installs-on-request over 365 days, indicating that most Homebrew installs are direct requests rather than incidental dependencies.

NATS adoption is broader than the Homebrew formula because it is commonly run via Docker, Kubernetes, release archives, and cloud/edge deployments. The official install docs list command-line installer, Docker, Kubernetes, package managers, release zips, and source builds as normal installation paths.

### 使用方式

Developers run `nats-server` locally for development, as a service for production messaging, or in clusters. Core NATS handles publish/subscribe, request/reply, queueing, service/microservice communication, and subject-based addressing; JetStream adds persistence, replay, key/value, object-store-like patterns, and stronger delivery semantics.

Package nerds use the Homebrew package when they want a local broker-like service without container overhead: `brew install nats-server`, then run the binary and connect clients on the default client port. For production, the same binary is more often wrapped in service managers, Docker images, Helm charts, or managed deployment automation.

### 为什么软件包爱好者会关心

nats-server is significant because it is both the reference server and the operational heart of the NATS ecosystem. Unlike a client-only package, installing it gives developers a working messaging substrate for local integration tests, demos, and small deployments, while the same project scales into clustered cloud-native infrastructure.

### 时间线

- 2012-10-29: nats-io/nats-server repository created on GitHub.
- 2016-07-19: NATS Streaming announced to add persistence and delivery guarantees.
- 2018-03-15: CNCF announced NATS as an incubating hosted project.
- NATS Server 2.2: JetStream became the recommended persistence and streaming option, while NATS Streaming was deprecated.
- 2026-06-29: nats-server v2.14.3 release published.
- 2026-07-01: Homebrew formula JSON listed stable version 2.14.3 and 8,660 installs over 365 days.

### Related projects

- JetStream
- NATS Streaming
- Synadia
- CNCF
- NATS clients

### 来源

- <https://api.github.com/repos/nats-io/nats-server>
- <https://api.github.com/repos/nats-io/nats-server/releases?per_page=8>
- <https://docs.nats.io/nats-concepts/overview>
- <https://docs.nats.io/reference/faq>
- <https://docs.nats.io/running-a-nats-service/introduction/installation>
- <https://formulae.brew.sh/api/formula/nats-server.json>
- <https://formulae.brew.sh/formula/nats-server>
- <https://github.com/nats-io/nats-server>
- <https://nats.io/blog/introducing-nats-streaming/>
- <https://www.cncf.io/blog/2018/03/15/cncf-to-host-nats/>


## 安全说明

formula declares a Homebrew service. infrastructure mutation or orchestration signal.

- **Geiger 风险:** orange / 中
- formula declares a Homebrew service
- infrastructure mutation or orchestration signal

## 其他软件包管理器记录

- Debian apt - golang-github-nats-io-nats-server-dev - 2.10.27-1: normalized package name match | Debian stable package indexes: golang-github-nats-io-nats-server-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | High-Performance server for NATS.io (library) | https://github.com/nats-io/nats-server
- Debian apt - nats-server - 2.10.27-1+b2: normalized package name match | Debian stable package indexes: nats-server from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | High-Performance server for NATS.io (program) | https://github.com/nats-io/nats-server
- Nix - nats-server: normalized package name match | nixpkgs package indexes: pkgs/by-name/na/nats-server/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - golang-github-nats-io-nats-server-dev - 2.10.7-1: normalized package name match | Ubuntu 24.04 LTS package indexes: golang-github-nats-io-nats-server-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | High-Performance server for NATS.io (library) | https://github.com/nats-io/nats-server
- Ubuntu apt - nats-server - 2.10.7-1: normalized package name match | Ubuntu 24.04 LTS package indexes: nats-server from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | High-Performance server for NATS.io (program) | https://github.com/nats-io/nats-server
- apk - nats-server - 2.14.3-r1: normalized package name match | Alpine Linux edge package indexes: nats-server from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | High-Performance server for NATS.io | https://github.com/nats-io/nats-server
- Scoop - main/nats-server: normalized package name match | Scoop official bucket manifest trees: bucket/nats-server.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - NATSAuthors.NATSServer: normalized package name match | Windows Package Manager source index: NATSAuthors.NATSServer from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/nats-server.yml](https://github.com/mxcl/pkgdb/blob/main/combined/nats-server.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
