Before touching NATS, you need to master basic networking concepts, publish/subscribe and queue patterns, and distributed systems concepts such as at-least-once, idempotency, and backpressure. In this episode you will also set up nats-server, the nats CLI, and your first client library.

Welcome to the Learn NATS series! This series will take you from the fundamental concepts all the way to production readiness with NATS — a cloud-native messaging system used to build inter-service communication, event-driven architecture, and streaming with JetStream. There are 23 episodes in total, organized into six phases.
But before touching nats-server, there are some basic skills and software you must have. Why are these pre-requisites important? Because NATS is a messaging system: all of its operations revolve around delivering messages between separate components, whether within a single process, a single machine, or across data centers. If you don't yet understand how TCP and ports work, or what a subscriber is, all the concepts that follow will feel abstract.
Episode 0 is your roadmap: we'll make sure you have the basic skills, set up the software, install the server and CLI, and then perform the first verification. Once this episode is done, you'll be able to follow the rest of the series comfortably.
NATS communicates over TCP/IP on the default port 4222. You must understand three basic things: what a TCP connection is, what a port is, and how a hostname or IP address is used to reach a service. If you've ever ssh-ed into a server or run a local web server, you already have most of these concepts.
Beyond networking, understand the two main communication patterns:
This basic networking is the foundation: NATS simply orchestrates the message traffic between them.
NATS is used in distributed systems, so a few terms are worth knowing from the start:
Don't worry if these aren't deeply familiar yet. Episodes 11 and 16 will cover idempotency and backpressure in depth. What matters now: you know these terms exist and why they're discussed.
NATS Server is the main daemon that runs the messaging. The latest stable version at the time of writing is 2.14.x. Install it via the official binary, a package manager, or Docker. For a quick check, verify the binary:
nats-server -vIf the output shows nats-server: v2.14.3 or another 2.14.x release, the server is ready. An alternative without installing: run it via Docker.
docker run -d -p 4222:4222 nats:2.14The nats:2.14 container above listens on port 4222 for clients and 8222 for monitoring. Docker will be very useful in episodes 12-17 later, so make sure it's installed.
The nats CLI is the admin toolkit for interacting with the server: publish, subscribe, manage streams and consumers, and check health. Install it via the official script or binary, then verify:
nats --versionThe nats --version command prints the CLI version, for example nats v2.12.0. The CLI and server are two separate binaries; the two will complement each other throughout the series.
NATS has official clients for almost every language. Pick one that matches your favorite language:
go get github.com/nats-io/nats.gopip install nats-pynpm install natspip install nats-pyAll examples in this series will alternate between these three, so make sure at least one is installed successfully. The client library lets you publish and subscribe from application code, not just from the CLI.
Info
If you're using Python, use nats-py, not the old unmaintained library. The official package name is nats-py and it's used throughout the official nats.io documentation.
Before moving on to episode 1, run a quick verification. First, start the server in one terminal:
nats-server -p 4222The server will print listening logs and block the terminal. In a second terminal, send your first message:
nats pub greeting halo -s nats://localhost:4222Then, in another terminal, start a subscriber before re-sending the message:
nats sub greetingIf the subscriber receives the halo message after the publisher sends it, your entire environment is ready. This publish → subscribe flow is the core of Core NATS, which we'll break down starting in episode 3.
Finally, make sure the client library can connect quickly using nats server check:
nats server checkThe nats server check command returns ok if the server responds from the CLI. With this, your foundation is complete: networking and messaging concepts understood, server and CLI installed, and client library ready to use.
In this episode 0, you've laid the groundwork for the whole series: understanding networking concepts and messaging patterns, getting familiar with distributed systems terms like at-least-once and idempotency, installing nats-server 2.14.x, preparing the nats CLI, and verifying your first publish and subscribe flow.
Key takeaways:
nats-server and nats CLI are two separate binaries that must be installed.halo, and receive it at the subscriber.In episode 1 next, we'll discuss the history, background, and why we need NATS — from the evolution of messaging from heavyweight brokers like Kafka and RabbitMQ, the birth of NATS by Derek Collison in 2011, to its position as a CNCF graduated project with Core NATS and JetStream. Make sure your environment is ready, because the Learn NATS journey has just begun!