Self-host Centrifugo
v6.10.3Scalable real-time PUB/SUB messaging server over WebSockets
docker run --rm -v$PWD:/centrifugo centrifugo/centrifugo:v6 centrifugo genconfig- Stars
- 10 956
- Port
- 8000 (HTTP server: client transports (/connection/websocket etc.), server API (/api), admin UI, Prometheus /metrics, /health and gRPC endpoints by default)
centrifugo/centrifugoWhat is Centrifugo?
Centrifugo sits in front of any application backend as a durable real-time layer: server code pushes events into channels through an HTTP or gRPC API, while browsers and devices receive them instantly over WebSocket, SSE, HTTP-streaming, gRPC, or experimental WebTransport. Channel namespaces, permission strategies, JWT or backend-proxied connection auth, history with reconnect recovery, presence with join/leave events, Fossil delta compression, backend RPC calls, and stream/map/shared-poll subscription types cover chat, live dashboards, multiplayer state sync, and AI token streaming. Running several nodes uses Redis, PostgreSQL or Nats as the engine, with optional Kafka and PostgreSQL-outbox consumers for CDC patterns; single-node setups work out of the box on the embedded memory engine. Self-hosting is a static Go binary, a Docker image, RPM/DEB packages, a Homebrew tap, or an official Helm chart; an embedded React admin panel, Prometheus metrics with a Grafana dashboard, TLS/ACME support and a health endpoint round out operations. The paid Centrifugo PRO edition — still self-hosted — adds device push delivery, ClickHouse analytics, rate limits, channel patterns and single sign-on for the admin panel. Note: by default the server sends anonymous usage counters once per 24 hours (disable with usage_stats.disabled).
Centrifugo alternatives
ChattoChatto is an open-source, self-hosted team chat server: one compact binary, no separate database, with rooms, threads, attachments, search, calls and SSO.CompareChatto with Centrifugo
gramsrvgramsrv is a self-hosted, open-source MTProto server in Go for running a Telegram-compatible backend with real clients. Supports monolith and microservice architectures.Comparegramsrv with Centrifugo
sama-serverSelf-hosted open-source chat server providing real-time messaging, horizontal clustering, push alerts, and multi-device sync for teams and developers.Comparesama-server with Centrifugo
JuggleIMSelf-hosted instant messaging backend for adding chat to your app. Multi-tenant design, WebSocket protocol, REST APIs, SDKs for Android, iOS, Web, Flutter.CompareJuggleIM with Centrifugo
TinodeA self-hosted, open-source instant messaging platform: Go server plus Android, iOS, web and command-line clients, group chat, WebRTC calls and chatbots.CompareTinode with Centrifugo
SoketiOpen-source WebSocket server that speaks Pusher Protocol v7, self-hosted via Docker, npm or Helm, with app credentials in arrays, MySQL, Postgres or DynamoDB.CompareSoketi with Centrifugo
cinnyOpen-source Matrix client (AGPL-3.0) for self-hosted federated chat with end-to-end encryption, served as a static web app via Docker or tarball.Comparecinny with Centrifugo
AppwriteThe open-source cloud for agents & devs. Including Auth, Databases, Storage, Functions, Messaging, Hosting, Realtime, WAF and moreCompareAppwrite with Centrifugo
All self-hosted alternatives to Ably → All self-hosted alternatives to PubNub → All self-hosted alternatives to Pusher →
Should you self-host Centrifugo?
Centrifugo scores 73/100 on selfhost.directory (how scoring works) and ranks #1 of 3 in Real-time. It has 10 956 GitHub stars, +124 in the last 30 days.
It shipped 24 stable releases in the past year. The latest, v6.10.3, came out on 8 November 2026. New versions land roughly every 2 weeks.
Setup is easy: most people get it running in one sitting. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Go.
Its closest alternative on selfhost.directory is Soketi (65/100, 5 635 stars). Centrifugo scores higher overall. See Centrifugo vs Soketi side by side.
Features
- Backend event proxying
- CDC / transactional outbox consumers
- Channel namespaces and permissions
- Delta compression
- Embedded admin web UI
- Horizontal Scaling
- Message history and recovery
- Multiple real-time transports
- Online presence
- Prometheus Metricsmetrics endpoint disabled by default (prometheus.enabled)
- Real-time PUB/SUB channels
- Server HTTP and gRPC API
- State sync subscriptions
- WebTransportexperimental
Centrifugo README
Scalable real-time messaging server in a language-agnostic way.
Centrifugo is an open-source scalable real-time messaging server. It instantly delivers messages to application online users connected over supported transports (WebSocket, HTTP-streaming, Server-Sent Events (aka EventSource), GRPC, WebTransport). Centrifugo has the concept of channel subscriptions – so it's a user-facing PUB/SUB server.
Centrifugo is language-agnostic and can be used to build chat apps, live comments, multiplayer games, real-time data visualizations, collaborative tools, AI streaming responses, etc. in combination with any backend. It is well suited for modern architectures and allows decoupling the business logic from the real-time transport layer.
FAQ
Does Centrifugo support webhooks?
The proxy feature integrates your session mechanism via connect proxy and lets you react to rpc, subscribe and publish events, plus RPC over the real-time connection; unsubscribe/disconnect hooks are not supported.
How can I know a message is delivered to a client?
Centrifugo has no such API – your client must send a confirmation ack to your backend after processing the message.
What if I need to send push notifications to mobile or web applications?
Push notification delivery (APNS, FCM, HMS) is provided by Centrifugo PRO; with the OSS edition you would use another solution or Firebase directly.
Is there a way to use a single connection to Centrifugo from different browser tabs?
Over HTTP/2-based transports it works automatically; with WebSocket each tab creates its own connection.
Does Centrifugo work with HTTP/3?
Experimentally since v4: enable TLS and the http3 option to serve HTTP-based endpoints over HTTP/3; WebSocket does not work over HTTP/3.
Does Centrifugo work with HTTP/2?
Yes, via the built-in Go HTTP server; it can be disabled with GODEBUG="http2server=0". WebSocket itself still runs over HTTP/1.1.
Can I use Centrifugo without reverse-proxy like Nginx before it?
Yes, the Go standard library HTTP server is designed for it, though a proxy helps with load balancing.
Centrifugo stops accepting new connections, why?
Usually the open file limit is reached; raise it as described in the infrastructure tuning docs.
Can I have both binary and JSON clients in one channel?
No – a channel's payload format must be consistent; JSON works fine even over the binary Protobuf protocol.
Any way to exclude message publisher from receiving a message from a channel?
Currently no – the team argues it creates duplicate-message pitfalls, and the correct architecture uses an idempotent identifier instead.
What about best practices with the number of channels?
Channels are lightweight so many are fine, but keep per-client subscriptions reasonable; for messenger-style group chats prefer a single personal channel per user plus broadcast.
Should I create channels explicitly?
No – channels are created automatically on the first subscription and destroyed when the last client unsubscribes; history windows are kept automatically when enabled.
Memory usage per connection?
Roughly 30-50 KB of RAM per WebSocket connection, so a 1 GB server handles about 20-30k connections; other transports differ.
How many connections can one Centrifugo instance handle?
It depends on transport, hardware, message rate and enabled features; the docs suggest keeping roughly 50-100k clients per node, but you should measure your own case.
More in Real-time
DruidSelf-hosted open-source OLAP database delivering millisecond analytics on high-cardinality event data, with SQL, JDBC, a web console and native Kafka/Kinesis ingestion.- EphemerelayA tiny open-source, self-hosted Nostr relay in about 100 lines of Deno TypeScript that never stores events, supporting NIP-01, NIP-15 and NIP-20.
EZ-WifiBroadcastOpen-source, self-hosted FPV video link that streams low-latency 1080p video, MAVLink telemetry and RC control between a drone camera and its ground station.
FlowcatFlowcat is an open-source, self-hosted Rust runtime for real-time voice agents — single binary, no hosted control plane, native SIP/RTP/WebRTC, 80+ provider connectors.
Global Threat MapSelf-hosted, open-source OSINT command center: a Next.js Mapbox app plotting real-time global events, wars, conflicts and military bases, with AI intel dossiers.
GraphitiGraphiti is a self-hosted, open-source scene graph engine for interactive 3D data visualization with real-time peer-to-peer sync via WebRTC and CRDTs — no cloud required.
gunOpen-source P2P graph database with realtime sync and offline-first storage; run a self-hosted relay peer via Docker or npm in browsers, Node.js and mobile apps.
instantSelf-hosted, open-source backend-as-a-service: relational queries, realtime sync, offline caching, auth, storage and permission rules on PostgreSQL.
JuggleIMSelf-hosted instant messaging backend for adding chat to your app. Multi-tenant design, WebSocket protocol, REST APIs, SDKs for Android, iOS, Web, Flutter.
kuzzleKuzzle is a self-hosted, open-source backend platform with real-time APIs, data storage, advanced search, user authentication, and pub/sub for web, mobile, and IoT apps.
nsqOpen-source self-hosted distributed messaging platform: push-based pub-sub over topics and channels, in-memory queues that spill to disk, plus the nsqadmin web UI.
PowerSync ServiceSelf-hosted sync server that copies data from several backend databases into client-side SQLite with live streaming and offline-first support.





0 comments