Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

NATS on Autopilot

This image uses ContainerPilot to register NATS with Consul. As you scale out the number of NATS containers they will be automatically clustered together. Furthermore, a health check is also performed in the container to ensure that each NATS instance is healthy.

Environment Variables

  • CONSUL hostname where consul can be found
  • CONSUL_AGENT determines if the consul agent is executed in the container
  • LOG_LEVEL ContainerPilot specific log level to use, defaults to INFO
  • NATS_USER username to use for cluster authorization, defaults to ruser
  • NATS_PASSWORD password to user for cluster authorization, defaults to T0pS3cr3t


Please either run to create a _env file or create one manually. The script expects that the triton-cli is installed and a profile is setup for docker to connect to a Triton datacenter.

Example Usage

docker-compose -f local-compose.yml up -d
docker-compose -f local-compose.yml scale nats=3

Look at the monitoring page for routez for one of the NATS servers and observe that they are clustered.