---
title: "NATS Server messaging and JetStream on a VPS · CloudSat"
description: "Deploy NATS Server on a CloudSat VPS: a fast single-binary broker for pub/sub, request-reply and queues, with JetStream streams and key-value storage."
url: https://cloudsat.io/apps/deploy-nats-server
updated: 2026-11-18T15:52:35Z
source: CloudSat (https://cloudsat.io/). Prices in USD.
---

[Development](https://cloudsat.io/apps/category/developer-tools)

# NATS Server on a VPS

NATS Server is a fast, single-binary message broker for pub/sub, request-reply and queue groups, with JetStream adding persistence, streams and key-value storage.

[Deploy NATS Server](https://dash.cloudsat.io/console/deploy?image=app%3Anats-server&plan=cloud-1g) [All apps](https://cloudsat.io/apps)

## About NATS Server

NATS is a CNCF messaging system built in Go under the Apache-2.0 license. Clients publish to subjects, subscribe with wildcards and share work through queue groups; JetStream, in the same binary, adds durable streams and key-value storage.

One small process carries a lot of traffic, so a modest CloudSat plan can act as the message hub for many services. Servers in several regions join into a cluster or link as leaf nodes.

Clients connect on port 4222. Upstream defaults accept anonymous connections, so add authorization before real traffic arrives, and enable JetStream when you need persistence.

## What you get with NATS Server

- Subjects with wildcards, request-reply and queue groups
- JetStream streams, consumers and replay
- Key-value and object stores
- Clusters, superclusters and leaf nodes
- Tokens, users, NKeys or JWT accounts
- WebSocket and MQTT listeners

## NATS Server use cases

- Connect microservices without a heavy broker
- Collect IoT telemetry over MQTT
- Spread events and work queues across regions

## After you deploy NATS Server

1. When the server shows **Running**, SSH in and confirm NATS is listening with `ss -tlnp | grep 4222`.
2. Add an `authorization` or `accounts` block with users, tokens or NKeys to the server config, then reload.
3. Turn on persistence with a `jetstream` block that sets `store_dir` and storage limits.
4. Allow 4222 only from your services in the CloudSat firewall, keep monitoring on 8222 private, and add TLS for clients across the internet.

## NATS Server ports

Open these in your firewall if you use one: `4222/tcp client connections`, `6222/tcp cluster routes (when clustered)`, `8222/tcp HTTP monitoring (when enabled)`.

## NATS Server FAQ

### Do I still need Kafka if I run NATS?

Often not. JetStream covers durable streams, replay and work queues for most service workloads; Kafka still fits very large, retention-heavy pipelines.

### How do I test the server?

Install the `nats` CLI on any machine, run `nats sub demo` in one terminal and `nats pub demo hello` in another, adding `--server nats://<server IP>:4222` and your credentials.

**Disclaimer.** The NATS Server project has no affiliation with CloudSat and does not endorse it. Names and logos belong to their owners and appear only to identify the software.

## Apps like NATS Server

[All apps in Development](https://cloudsat.io/apps/category/developer-tools)

- [RabbitMQ](https://cloudsat.io/apps/deploy-rabbitmq): Development RabbitMQ is an open-source message broker that moves work between services over AMQP 0-9-1 and 1.0, MQTT and STOMP, with quorum queues and streams.
- [Apache Kafka](https://cloudsat.io/apps/deploy-apache-kafka): Databases Apache Kafka is a distributed event streaming platform: durable, partitioned logs that producers write to and consumers read at their own pace.
- [Eclipse Mosquitto](https://cloudsat.io/apps/deploy-eclipse-mosquitto): Networking Eclipse Mosquitto is a small, fast MQTT broker for IoT devices, home automation and services, with TLS, WebSockets and per-user access control.
- [Apache Pulsar](https://cloudsat.io/apps/deploy-apache-pulsar): Development Apache Pulsar combines messaging and streaming in one system, with tenants, namespaces, tiered storage and geo-replication, deployed here as a standalone node.
- [Appwrite](https://cloudsat.io/apps/deploy-appwrite): Development Appwrite is an open-source backend server: auth, databases, storage, functions, messaging and realtime APIs, self-hosted on your own VPS.
- [Atheos](https://cloudsat.io/apps/deploy-atheos): Development Atheos is a self-hosted cloud IDE and the maintained fork of Codiad: edit code in the browser with Git built in, plugins and per-user permissions.
