Back to all templates
Centrifugo logo

Centrifugo

Development128MB+ RAM

Scalable real-time messaging server

realtimewebsocketmessaging

Deploy Centrifugo in 3 Steps

1

Connect Your VPS

Add your server credentials to Server Compass

2

Select Centrifugo

Choose from our template library

3

Deploy & Configure

Fill in settings and click Deploy

No Docker knowledge required
Step-by-step deployment guide

Deploy Centrifugo on a VPS with Server Compass

Use the Centrifugo template in Server Compass to deploy a scalable real-time messaging server on your VPS, then verify the HTTP/WebSocket endpoint in a browser.

About 10 minutesBrowser verified
1
Step 1

Open the server Apps tab

Select the tutorial-vps VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.

Server Compass Apps tab before creating an Centrifugo app
2
Step 2

Choose an app template

Click New App and choose the template deployment path so Server Compass can load the built-in catalog.

Choosing to deploy an app from a Server Compass template
3
Step 3

Search for Centrifugo

Use the template picker search to find Centrifugo in the Server Compass template catalog.

Searching for Centrifugo in the Server Compass template picker
4
Step 4

Select the Centrifugo template

Choose the Centrifugo template. Server Compass fills the Centrifugo service, generated token secret, generated API key, generated admin password, and web/API port.

Centrifugo template selected in Server Compass
5
Step 5

Review the Centrifugo settings

Confirm the app name and compose services. In this run, the app was named centrifugo-demo and used host port 8000.

Reviewing Centrifugo project settings and compose services
6
Step 6

Deploy Centrifugo

Review the generated compose settings, confirm the API port is available, and click Deploy.

Reviewing Centrifugo environment variables and port before deployment
7
Step 7

Watch the deployment progress

Keep the deployment modal open while Server Compass uploads the compose file, pulls the Centrifugo image, starts the container, and verifies the stack.

Server Compass deploying the Centrifugo template on the VPS
8
Step 8

Confirm Centrifugo is running

After deployment finishes, return to the Apps tab and confirm the Centrifugo app is marked Running with its application URL available.

Centrifugo template running in the Server Compass Apps tab
9
Step 9

Open the Centrifugo WebSocket endpoint in the browser

Open the application URL with /connection/websocket appended. A plain browser request returns Bad Request because it is not a WebSocket upgrade, which confirms the Centrifugo endpoint is reachable.

The deployed Centrifugo WebSocket endpoint returned a Bad Request response in a browser

After Centrifugo Opens

  • Do not expose Centrifugo directly to the public internet without a firewall, VPN, or authenticated reverse proxy.
  • Keep the generated token secret, API key, and admin password out of client-side code and screenshots.
  • Use a VPN, IP allowlist, firewall rule, or authenticated reverse proxy for production admin access.
  • Configure channels and JWT signing in your backend before allowing clients to connect.
  • Monitor active connections, message rate, and memory usage as real-time workloads grow.
  • Keep the Centrifugo image updated for protocol, dependency, and security fixes.

Verified Result

The Centrifugo WebSocket endpoint returned the expected Bad Request response for a non-WebSocket browser request.

Centrifugo deployment questions

What does the Centrifugo template deploy?

It deploys the Centrifugo container with generated token/API/admin secrets, admin mode enabled, and an exposed HTTP/WebSocket endpoint.

Which port did the tutorial use?

The tutorial used host port 8000, which maps to the Centrifugo API on container port 8000.

Why does the browser verification stop at the first API response?

A fresh Centrifugo deployment is considered reachable when /connection/websocket responds. A normal browser request is not a WebSocket upgrade, so Bad Request is the expected response. The tutorial does not publish the generated token secret, API key, or admin password.

Should this become a blog post?

No. The deployment guide should live on the Centrifugo template detail page and be linked from the reusable template deployment docs page.

Do It Yourself

Deploy Centrifugo via Command Line

Prefer the command line? Follow this step-by-step guide to deploy Centrifugo manually on your VPS.

1

SSH into Your Server

Launch your preferred terminal and connect to your VPS using SSH.

terminal
# Log into your server
ssh root@<your-server-ip>

# If using key-based auth
ssh -i ~/.ssh/my-key root@<your-server-ip>

First time? Docker not installed? Run: curl -fsSL https://get.docker.com | sh

2

Create Working Directory

Prepare a directory for your application files and configuration.

terminal
# Create and navigate to project directory
mkdir -p ~/apps/centrifugo
cd ~/apps/centrifugo
3

Configure Your Containers

Create the Docker Compose configuration file with these contents:

docker-compose.yml
services:
  centrifugo:
    image: centrifugo/centrifugo:latest
    ports:
      - "8000:8000"
    command: centrifugo -c config.json
    environment:
      - CENTRIFUGO_TOKEN_HMAC_SECRET_KEY=<your-token-secret>
      - CENTRIFUGO_API_KEY=<your-api-key>
      - CENTRIFUGO_ADMIN_PASSWORD=<your-admin-password>
      - CENTRIFUGO_ADMIN=true
    volumes:
      - centrifugo_data:/centrifugo
    restart: unless-stopped

volumes:
  centrifugo_data:
Configuration Variables
PORTHost port(default: 8000)
TOKEN_SECRETToken secret
API_KEYAPI key
ADMIN_PASSWORDAdmin password
4

Deploy with Docker Compose

Launch the application stack using Docker Compose.

terminal
# Deploy the application
docker compose up -d

# Check container health
docker compose ps

# Monitor logs
docker compose logs -f --tail=100
5

Open Required Ports

Enable external access by opening the necessary port.

terminal
# Allow the application port through firewall
sudo ufw allow 8000/tcp
sudo ufw reload

# Access your app at:
# http://your-server-ip:8000
Skip the Terminal

There's an easier way. Meet Server Compass.

Deploy Centrifugo with a beautiful UI instead. No SSH, no YAML editing, no terminal commands. Just click, configure, and deploy in under 3 minutes.

  • Intuitive dashboard
  • Deploy in 3 minutes
  • Free SSL included
  • Blue-green deploys
  • Real-time logs
  • Version history
Download Server Compass$29 one-time • Lifetime license

After Deployment

After deploying Centrifugo with Server Compass, complete these steps to finish setup

1

Test WebSocket connection

2

Configure channels

3

Integrate with backend

Need help? Check out our documentation for detailed guides.

Centrifugo FAQ

Common questions about self-hosting Centrifugo

How do I deploy Centrifugo with Server Compass?

Simply download Server Compass, connect to your VPS, and select Centrifugo from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.

What are the system requirements for Centrifugo?

Centrifugo requires a minimum of 128MB RAM. We recommend a VPS with at least 1024MB RAM for optimal performance. Any modern Linux server with Docker support will work.

Can I migrate my existing Centrifugo data?

Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard Centrifugo backup and restore procedures.

How do I update Centrifugo to the latest version?

Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest Centrifugo image will be pulled and deployed with zero downtime.

Is Centrifugo free to self-host?

Centrifugo is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.

Ready to Self-Host Centrifugo?

Download Server Compass and deploy Centrifugo to your VPS in under 3 minutes. No Docker expertise required.

Download Server Compass