Centrifugo comes with a built-in admin web interface. It can:
- Show general information and statistics from server nodes - number of connections, unique users, number of subscriptions, unique channels etc.
channelsand several additional Centrifugo PRO server API commands.
- Trace connections in real-time (Centrifugo PRO feature)
To enable admin web interface run Centrifugo with
admin option enabled and provide some security options in configuration file:
false) – enables/disables admin web UI
"") – this is a password to log into admin web interface
"") - this is a secret key for authentication token set on successful login.
admin_secret strong and keep them in secret.
After configuring, restart Centrifugo and go to http://localhost:8000 (by default) - you should see web interface.
Although there is a password based authentication a good advice is to protect web interface by firewall rules in production.
Using custom web interface
If you want to use custom web interface you can specify path to web interface directory dist:
This can be useful if you want to modify official web interface code in some way and test it with Centrifugo.
Admin insecure mode
There is also an option to run Centrifugo in insecure admin mode - in this case you don't need to set
admin_secret in config – in web interface you will be logged in automatically without any password. Note that this is only an option for production if you protected admin web interface with firewall rules. Otherwise anyone in internet will have full access to admin functionality described above. To enable insecure admin mode: