NATS Notification Settings

This page documents settings for configuring an NATS service as a target for Bucket Notifications. See Publish Events to NATS for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Multiple NATS Targets

You can specify multiple NATS service endpoints by appending a unique identifier _ID for each set of related NATS settings on to the top level key.

Example

For example, the following commands set two distinct NATS service endpoints as PRIMARY and SECONDARY respectively:

export MINIO_NOTIFY_NATS_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_NATS_ADDRESS_PRIMARY="nats-endpoint.example.net:4222"

export MINIO_NOTIFY_NATS_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_NATS_ADDRESS_SECONDARY="nats-endpoint.example.net:4222"

With these settings, MINIO_NOTIFY_NATS_ENABLE_PRIMARY indicates the environment variable is associated to an NATS service endpoint with ID of PRIMARY.

mc admin config set notify_nats:primary \
   address="nats-endpoint.example.com:4222" \
   subject="minioevents" \
   [ARGUMENT=VALUE ...]

mc admin config set notify_nats:secondary \
   address="nats-endpoint.example.com:4222" \
   subject="minioevents" \
   [ARGUMENT=VALUE ...]

Settings

Enable

Required

MINIO_NOTIFY_NATS_ENABLE

envvar

Specify on to enable publishing bucket notifications to an NATS service endpoint.

Defaults to off.

notify_nats

mc-conf

The top-level configuration key for defining an NATS service endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an NATS service endpoint. The address and subject arguments are required for each target. Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_nats \
  address="nats-endpoint.example.com:4222" \
  subject="minioevents" \
  [ARGUMENT="VALUE"] ... \

Address

Required

MINIO_NOTIFY_NATS_ADDRESS

envvar

notify_nats address

mc-conf

Specify the NATS service endpoint to which MinIO publishes bucket events. For example, nats-endpoint.example.com:4222.

Subject

Required

MINIO_NOTIFY_NATS_SUBJECT

envvar

notify_nats subject

mc-conf

Specify the subscription to which MinIO associates events published to the NATS endpoint.

Username

Optional

MINIO_NOTIFY_NATS_USERNAME

envvar

notify_nats username

mc-conf

Specify the username for connecting to the NATS service endpoint.

Password

Optional

MINIO_NOTIFY_NATS_PASSWORD

envvar

notify_nats password

mc-conf

Specify the passport for connecting to the NATS service endpoint.

Token

Optional

MINIO_NOTIFY_NATS_TOKEN

envvar

notify_nats token

mc-conf

Specify the token for connecting to the NATS service endpoint.

User Credentials File

Optional

MINIO_NOTIFY_NATS_USER_CREDENTIALS

envvar

notify_nats user_credentials

mc-conf

Specify the to the user credentials file <https://docs.nats.io/using-nats/developer/connecting/creds> to use to connect to the NATS service endpoint.

TLS

Optional

MINIO_NOTIFY_NATS_TLS

envvar

notify_nats tls

mc-conf

Specify on to enable TLS connectivity to the NATS service endpoint.

TLS Skip Verify

Optional

MINIO_NOTIFY_NATS_TLS_SKIP_VERIFY

envvar

notify_nats tls_skip_verify

mc-conf

Enables or disables TLS verification of the NATS service endpoint TLS certificates.

  • Specify on to disable TLS verification (Default).
  • Specify off to enable TLS verification.

Ping Interval

Optional

MINIO_NOTIFY_NATS_PING_INTERVAL

envvar

notify_nats ping_interval

mc-conf

Specify the duration interval for client pings to the NATS server. MinIO supports the following time units:

  • s - seconds, "60s"
  • m - minutes, "5m"
  • h - hours, "1h"
  • d - days, "1d"

Jetstream

Optional

MINIO_NOTIFY_NATS_JETSTREAM

envvar

notify_nats jetstream

mc-conf

Specify on to enable JetStream support for streaming events to a NATS JetStream service endpoint.

Streaming

Deprecated

Optional

MINIO_NOTIFY_NATS_STREAMING

envvar

notify_nats streaming

mc-conf

Specify on to enable asynchronous publishing of events to the NATS service endpoint.

Streaming Async

Deprecated

Optional

MINIO_NOTIFY_NATS_STREAMING_ASYNC

envvar

notify_nats streaming_async

mc-conf

Specify on to enable asynchronous publishing of events to the NATS service endpoint.

Max ACK Responses In Flight

Deprecated

Optional

MINIO_NOTIFY_NATS_STREAMING_MAX_PUB_ACKS_IN_FLIGHT

envvar

notify_nats streaming_max_pub_acks_in_flight

mc-conf

Specify the number of messages to publish without waiting for an ACK response from the NATS service endpoint.

Streaming Cluster ID

Deprecated

Optional

MINIO_NOTIFY_NATS_STREAMING_CLUSTER_ID

envvar

notify_nats streaming_cluster_id

mc-conf

Specify the unique ID for the NATS streaming cluster.

Cert Authority

Optional

MINIO_NOTIFY_NATS_CERT_AUTHORITY

envvar

notify_nats cert_authority

mc-conf

Specify the path to the Certificate Authority chain used to sign the NATS service endpoint TLS certificates.

Client Cert

Optional

MINIO_NOTIFY_NATS_CLIENT_CERT

envvar

notify_nats client_cert

mc-conf

Specify the path to the client certificate to use for performing mTLS authentication to the NATS service endpoint.

Client Key

Optional

MINIO_NOTIFY_NATS_CLIENT_KEY

envvar

notify_nats client_key

mc-conf

Specify the path to the client private key to use for performing mTLS authentication to the NATS service endpoint.

Queue Directory

Optional

MINIO_NOTIFY_NATS_QUEUE_DIR

envvar

notify_nats queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the NATS server/broker is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_NATS_QUEUE_LIMIT

envvar

notify_nats queue_limit

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

Comment

Optional

MINIO_NOTIFY_NATS_COMMENT

envvar

notify_nats comment

mc-conf

Specify a comment to associate with the NATS configuration.

Last modified August 2, 2026: init commit (8338d5b)

Portions of this page are adapted from the MinIO Object Storage Documentation, © 2020–Present MinIO, Inc., licensed under CC BY 4.0, converted and maintained by the Silo project. Attribution