Back to Spy NATS

No TLS, No Credentials

The simplest LAN/dev setup: plain ws://, no username or password required.

TLS off (ws://)
No credentials
WS port 8080
nats-server.3.ok-no-cred-2.conf
1. Setup (nats-server.conf)
nats-server.conf
listen: 0.0.0.0:4222
http_port: 8222          # optional, HTTP monitoring (VARZ/CONNZ/... at :8222)

# WebSocket transport — required for the browser to connect at all.
websocket {
  port: 8080

  # LAN/dev-friendly default: no TLS, plain ws://.
  no_tls: true
}

# JetStream — required for KV buckets and Streams.
jetstream {}

One-time nats-cli setup

nats context add tutorial-no-auth \
  --server="nats://10.135.32.227:4222" \
  --select

In Connection section, enter:

NATS server host
10.135.32.227
WS port
8080
TLS (wss)
off
Username
(leave blank)
Password
(leave blank)
2. Creation of subject / KV bucket / stream
Subject

In the Subscriptions form: Type: Subject · Target: orders.>

No setup required — just add the subscription above.

KV Bucket

In the Subscriptions form: Type: KV Bucket · Target: my-bucket

nats kv add my-bucket

Creating the bucket requires JetStream, which is enabled by the empty `jetstream {}` block above.

JetStream Stream

In the Subscriptions form: Type: JetStream Stream · Target: ORDERS · Filter: orders.created (optional)

nats stream add ORDERS --subjects "orders.>" --storage file \
  --retention limits --max-msgs=-1 --max-bytes=-1 --max-age=0 --defaults

The viewer subscribes with its own ephemeral ordered consumer — no consumer setup needed on your end.

System Service
Not available

This configuration has no `accounts`/`system_account`, so $SYS.> system events are never published (the default global account does not publish advisories). See Tutorial 2 (No TLS, With Credentials) to enable system monitoring.

3. Message generation
Subject
nats pub orders.created '{"id": 1, "total": 42.5}'

Each publish appears as a new card in the viewer’s Message feed.

KV Bucket
nats kv put my-bucket hello world
JetStream Stream
nats pub orders.created '{"id": 1}'
nats pub orders.created '{"id": 2}'

SpyNATS is an independent tool and is not affiliated with, sponsored by, or endorsed by Synadia Communications or the NATS.io project.