Install natsio

nats.io server can be installed in different way. Here we are focusing to setup it on docker and nats.io 2.2.2 version.

To install natsio on your host system follow this guide

Install

docker run --detach --name mc_natsio \
    --publish 4222:4222 \
    --env TZ="Asia/Kolkata" \
    --restart unless-stopped \
    nats:2.2.2-alpine

To see the logs

  • Prints all available logs
    docker logs mc_natsio
    
  • Prints and tails the logs, to get exit do Ctrl+C
    docker logs --follow mc_natsio
    

Stop

docker stop mc_natsio

Restart

docker restart mc_natsio

Uninstall

docker stop mc_natsio
docker rm mc_natsio
Last modified June 14, 2021: update installation guide (2fd41a2)