Nomploy Nomad Packs

← All packs

centrifugo v0.1.0

Messaging

Centrifugo — a scalable real-time messaging server for websockets/SSE, letting you add live updates, chat and notifications to any app via a simple HTTP/GRPC API. Deployed as a single host-networked Nomad service with the admin UI enabled.

nomad-pack run centrifugo --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- centrifugo

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

1 task http 8000 image centrifugo/centrifugo:v6 pinned :v6 image bumped today
Variables 11
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run centrifugo -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "centrifugo"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The Centrifugo container image. Pin a tag in production.
image = "centrifugo/centrifugo:v6"

# Host port for Centrifugo (HTTP + admin UI).
port = 8000

# Password for the admin web UI. CHANGE THIS.
admin_password = "centrifugo_change_me"

# Secret used to sign admin sessions. CHANGE THIS.
admin_secret = "change_me_admin_secret_0000000000"

# Key for the HTTP server API. CHANGE THIS.
api_key = "change_me_api_key_0000000000"

# HMAC secret used to verify client connection tokens (JWT). CHANGE THIS.
token_hmac_secret = "change_me_token_hmac_secret_0000000000"

# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# The task resources.
resources = {
    cpu    = 500
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"centrifugo"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"centrifugo/centrifugo:v6"
The Centrifugo container image. Pin a tag in production.
port number
8000
Host port for Centrifugo (HTTP + admin UI).
admin_password set me string
"centrifugo_change_me"
Password for the admin web UI. CHANGE THIS.
admin_secret set me string
"change_me_admin_secret_0000000000"
Secret used to sign admin sessions. CHANGE THIS.
api_key set me string
"change_me_api_key_0000000000"
Key for the HTTP server API. CHANGE THIS.
token_hmac_secret set me string
"change_me_token_hmac_secret_0000000000"
HMAC secret used to verify client connection tokens (JWT). CHANGE THIS.
constraints list
[]
Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 500
    memory = 256
  }
The task resources.
Readme

centrifugo

Centrifugo is a scalable, language-agnostic real-time messaging server. It sits next to your application and handles persistent connections (WebSocket, SSE, HTTP-streaming, WebTransport, GRPC) so you can push live updates — chat, notifications, dashboards, presence — to millions of clients. Your backend simply publishes to channels over a straightforward HTTP/GRPC API; clients subscribe with JWTs.

This pack runs Centrifugo as a single host-networked Nomad service with the admin web UI enabled.

Deploy

nomad-pack run centrifugo --registry=nomploy \
  --var admin_password=$(openssl rand -hex 12) \
  --var admin_secret=$(openssl rand -hex 16) \
  --var api_key=$(openssl rand -hex 16) \
  --var token_hmac_secret=$(openssl rand -hex 24)

Open http://<node-ip>:8000 and log in with your admin password.

Configuration

Variable Default Description
image centrifugo/centrifugo:v6 Container image (pin a tag in production).
port 8000 Host port for HTTP + admin UI.
admin_password placeholder Admin UI password — change this.
admin_secret placeholder Admin session secret — change this.
api_key placeholder HTTP server API key — change this.
token_hmac_secret placeholder HMAC secret for client JWTs — change this.
resources 500 MHz / 256 MB CPU and memory for the task.

Centrifugo is stateless by default (no volume). For horizontal scaling or history, configure a Redis engine via the additional CENTRIFUGO_* env vars.