Self-Hosted OSS Cache & Queues
NATS (JetStream)
Ultra-lightweight Apache-2.0 Go messaging & JetStream persistence engine (~20-64 MB RAM).
Self-Hosted Blueprint
nats-io/nats-server ↗- Min RAM / CPU
- 64 MB · 1 vCPU
- License
- Apache-2.0
- GitHub Stars
- 21k
- Maintenance
- Low
One-click templates on: coolify dokploy
Quickstart / Docker Compose
docker-compose.yml
services:
nats:
image: nats:2-alpine
restart: unless-stopped
command: ["-js", "-sd", "/data"]
ports:
- "4222:4222"
volumes:
- nats_data:/data
volumes:
nats_data:Gotchas & Hidden Limits
- You MUST pass `-js` (`--jetstream`) to enable durable queues, streams, and KV — core NATS defaults to at-most-once memory pub/sub.
- Ships as a minimal Go binary with CLI (`nats-cli`) monitoring rather than a built-in web admin console.
Best For: Low-footprint durable work queues, real-time pub/sub fan-out, and edge/IoT telemetry.
Crossover Point: Eliminates per-message SQS/Upstash fees cleanly inside ~64 MB RAM alongside any Go, Rust, or TypeScript stack.
Related Comparisons & Alternatives
Alternative To
Spot an outdated limit or pricing change?