Skip to navigationSkip to main contentSkip to footerScaleway DocsSparklesIconAsk our AI
SparklesIconAsk our AI

Using the NATS CLI

The NATS CLI (nats) is the official NATS tool for managing your NATS resources. It allows you to simply create and manage your streams, consumers and more.

Check out the official NATS CLI documentation for installation instructions, examples and more.

CheckCircleOutlineIcon
Tip

You can also configure Scaleway NATS with the Terraform/OpenTofu NATS Jetstream provider using our dedicated tutorial.

This page shows you how to get started with some basic actions via the NATS CLI.

Before you start

To complete the actions presented below, you must have:

Installing the NATS CLI

Follow instructions from the official NATS documentation. The installation process may differ depending on your operating system.

Define a context

To simplify your interactions with NATS hosted on Scaleway, we recommend that you use contexts. A context is a named configuration that stores the settings (such as credentials, URLs and certificates) required to connect to NATS. By creating a context, you will not need to specify your server and credentials with each new request.

Create a context

The example below creates a context named scaleway.

  • Replace {Scaleway NATS URL} with the URL of your NATS account (find this in the console on your NATS account Overview tab).
  • Replace {path to your creds file} with the path to the location where you downloaded your .creds file.
nats context save scaleway --server