> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/nats-io/nats-server/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to NATS Server

> Learn about NATS Server, a simple, secure, and performant communications system for modern distributed systems

NATS is a simple, secure and performant communications system for digital systems, services and devices. NATS is part of the Cloud Native Computing Foundation ([CNCF](https://cncf.io)) and provides a lightweight messaging infrastructure for building modern distributed systems.

## What is NATS Server?

NATS Server is the core messaging platform that enables applications to communicate through message passing. It can run on-premise, in the cloud, at the edge, and even on a Raspberry Pi. NATS can secure and simplify the design and operation of modern distributed systems.

<Info>
  NATS has over [40 client language implementations](https://nats.io/download/), making it easy to integrate with your existing technology stack.
</Info>

## Key capabilities

### Publish-subscribe messaging

NATS provides a lightweight publish-subscribe messaging pattern that allows services to communicate asynchronously. Publishers send messages to subjects, and subscribers receive messages from subjects they're interested in.

### JetStream

JetStream is NATS's persistence layer that provides streaming, message replay, and guaranteed delivery. Enable JetStream functionality with the `-js` flag when starting the server.

```bash theme={null}
nats-server -js --store_dir /data/nats
```

### Clustering

NATS supports clustering for high availability and scalability. Multiple servers can be connected together to form a cluster, with automatic failover and load balancing.

<Tip>
  Clustering is configured through the `cluster` block in your configuration file. The default cluster port is 6222.
</Tip>

### Security

NATS provides multiple authentication and authorization mechanisms:

* **Token authentication**: Simple token-based authentication using the `--auth` flag
* **Username/password**: Basic authentication with `--user` and `--pass` flags
* **TLS encryption**: Enable secure connections with `--tls`, `--tlscert`, and `--tlskey` flags
* **Account-based security**: Multi-tenancy with isolated accounts

## Use cases and scenarios

<Accordion title="Microservices communication">
  NATS provides a lightweight, high-performance messaging backbone for microservices architectures. Services can discover and communicate with each other without tight coupling.
</Accordion>

<Accordion title="Event streaming">
  With JetStream, NATS can function as an event streaming platform for building event-driven applications with message persistence and replay capabilities.
</Accordion>

<Accordion title="IoT and edge computing">
  NATS's small footprint and ability to run on resource-constrained devices makes it ideal for IoT deployments and edge computing scenarios.
</Accordion>

<Accordion title="Real-time data distribution">
  NATS excels at distributing real-time data updates across distributed systems with minimal latency.
</Accordion>

## Why choose NATS?

* **Simple**: Easy to deploy, operate, and use with a straightforward API
* **Secure**: Built-in security features including TLS, authentication, and authorization
* **Performant**: Designed for high throughput and low latency
* **Cloud native**: Part of CNCF with Kubernetes-native deployments
* **Lightweight**: Minimal resource footprint suitable for edge deployments

<Warning>
  A third-party security audit was performed by Trail of Bits following engagement by OSTIF. Review the [full security audit report](https://github.com/trailofbits/publications/blob/master/reviews/2025-04-ostif-nats-securityreview.pdf) for detailed findings.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Get your first NATS message working in minutes
  </Card>

  <Card title="Installation" icon="download" href="/installation">
    Install NATS Server on your platform
  </Card>
</CardGroup>

## Additional resources

* [Official NATS Website](https://nats.io)
* [Official Documentation](https://docs.nats.io)
* [FAQ](https://docs.nats.io/reference/faq)
* [Video Overview](https://rethink.synadia.com/episodes/1/)
* [Community Slack](https://slack.nats.io)
