Solved Scaling on 1.16.x requires redis - how to configure?

  • Looking to upgrade to 1.16.2 with a forum that uses clustering and runs on MongoDB

    I see this:

    If you are using clustering redis is now a requirement. Simply install and configure redis in your config.json block. If you were already using redis as your datastore or for sessions no changes are necessary.

    In the "scaling" page of the documentation this is:

    Configure Redis
    When you setup NodeBB to use more than one process, it is advisable to configure Redis as well. Each NodeBB process can communicate with the others through Redis pub-sub. Install Redis on your server and add a redis block to your config.json....


    1. Does redis need to be installed before upgrading to 1.16.x? or should the upgrade be done first, then redis installed (basically clarity on the upgrade sequence in this case)
    2. How is redis configured? Does the upgrade script create the database, admin user etc etc? If not where is the documentation on how to install and configure redis to be used for pub-sub, but not as the main database?
  • NodeBB Admin

    1. You don't need redis while upgrading to 1.16.x.

    2. Upgrade script won't create the redis database or setup users. You need to install redis on your server and then add a redis block to your config.json like this.

    "database": "mongo"
    "mongo": {
       ..mongo details
    "redis": {
          "host": "",
          "port": "6379",
          "password": "",
          "database": "0"

    Once you start nodebb it will read the redis block and use redis for pubsub/sessions and passing around messages between the processes.

  • @baris thanks. so to be clear just installing redis, without any configuration is all that is required?

    Is there any concern with having redis used in this way with no admin account/password etc?

  • @tonytony I find this site very helpful

  • NodeBB Admin

    Yeah follow the above link and only allow access from localhost or setup auth and use a password

  • @baris @FrankM thanks, so it looks like redis installs suitably setup (protected mode on, only bound to the loopback address) etc.

    I did the upgrade to 1.16.2 and this element of it appears ok, will open another thread for other issues.

  • @TonyTony
    Make sure you have updated in the nodebb configuration with the property

    "isCluster": true

    When you use auto sclaing(HPA) of NodeBB, this is must. Otherwise you will end with lot of inconsistency in the API responses.

    Note: This property will help if you use on Redis as your DB(not with the conbination of Mongo+Redis)

    Thanks for the details mentioned in this post

Suggested Topics

| | | |