The NATS team maintains a lightweight Docker image with many of the NATS
utilities called nats-box where nsc is
included. You can mount a local volume to get nsc accounts, nkeys, and other
config back on the host using Docker as follows:
docker run --rm -it -v $(pwd)/nsc:/nsc natsio/nats-box:latest
# In case NSC not initialized already:
nats-box:~# nsc init
nats-box:~# chown -R 1000:1000 /nsc
$ tree -L 2 nsc/
nsc/
├── accounts
│ ├── nats
│ └── nsc.json
└── nkeys
├── creds
└── keys
5 directories, 1 file
NSC
A tool for creating NATS account and user access configurations
Install
This script downloads the latest released binary to the current working directory:
With Python:
Without Python and with a more cautious mindset:
With Homebrew:
Direct Download:
Download your platform binary from GitHub releases.
Updates are easy
nsc updatewill download and install the latest version. If you installed using Homebrew,brew updatewill update.Documentation
Documentation is here.
Running with Docker
The NATS team maintains a lightweight Docker image with many of the NATS utilities called nats-box where
nscis included. You can mount a local volume to getnscaccounts, nkeys, and other config back on the host using Docker as follows: