Recreating nodeBB forum on new server

Technical Support
  • #1


    I have this forum: on a Digital Ocean droplet.

    I'm going to create a new Droplet, install NodeBB on it, and then simply re-create the forum.

    I have a backup (a dump.rdb) of the Redis database on my laptop, and guidance for restoring this.

    I presume I'll have to restore/replace the contents of other, certain directories— X, Y, Z, etc. — from the contents of the same saved directories on my laptop in order to achieve this.

    Which directories do I need to save and replace ?

    Or, is there a better method (before I ultimately destroy my current Droplet), or guidance, for achieving this ?



  • NodeBB

    You will need the public/uploads folder for uploaded files. If you installed plugins into node_modules without adding them to package.json you will have to reinstall those as well.

  • #3



    I don't recall "adding" the plugins (Imgur; and Sendmail) to package.json. I don't know what that process is. If you tell me what I should see in package.json that would clarify this, I'll look at it.

    I do, of course, have the API key , ClientID and secret for the plugins I do want: Imgur and Sendmail.

    Any guidance is appreciated 🙂


  • NodeBB

    You don't have to worry if you installed them through the ACP page, just copy your files to the new server and it should work. I was referring to plugins that might be sysmlinked into the node_modules folder. Your keys and secrets are stored in the database for the plugins so copying the plugin will bring those back as well.

  • #5


    Yes, I installed them via the Administrator page.

    I presume you mean the two plugin-related folders in: "node_modules."

    If not, let me know. Otherwise, I'll do that and report back later this weekend.



  • Global Moderator Plugin & Theme Dev

    @howardm if they're installed from the ACP you're fine. Don't worry about copying anything. If you check the "dependencies" list in package.json for the two plugins, you can double check they're there.

    It doesn't really matter if they're there, though. You can always reinstall them from the ACP.

  • #7

    @pitaj @baris


    I installed nodebb in my home folder. (It's in /var/www on my current server. I'm not sure why I put it there. I presume it doesn't matter where it is.)

    I first renamed the present dump.rdb file to "dump.rdb.old." I then copied the saved dump.rdb file to redis on my new server. This proceeded without an error. I changed the permissions of /var/lib/redis and the dump.rdb file appropriately. I then restarted redis and nodebb.

    I didn't try to move over the plugins (Imgur; and Sendmail) I mentioned above.

    Unfortunately, the result looks like this:

    Instead of like this:

    How do I begin to troubleshoot the result ? Does the appearance of the page suggestive of some particular issue ?

    Here is the contents of config.json:

    "url": "",
    "secret": "thesecret",
    "database": "redis",
    "redis": {
    "host": "",
    "port": "6379",
    "password": "thecorrectpassword",
    "database": "1"
    "type": "literal"

    I don't see the "type": "literal" in config.json on my current server. I don't know what this is.



  • Global Moderator Plugin & Theme Dev

    Try running ./nodebb build and restarting.

  • #9

    @pitaj said in Recreating nodeBB forum on new server:

    ./nodebb build

    Thanks. I did this. Here is the output:

    $ ./nodebb build
    2018-02-25T23:55:01.182Z [16547] - info: [build] Building in parallel mode
    2018-02-25T23:55:01.185Z [16547] - info: [build] plugin static dirs build started
    2018-02-25T23:55:01.190Z [16547] - info: [build] requirejs modules build started
    2018-02-25T23:55:01.192Z [16547] - info: [build] client js bundle build started
    2018-02-25T23:55:01.194Z [16547] - info: [build] admin js bundle build started
    2018-02-25T23:55:01.197Z [16547] - info: [build] client side styles build started
    2018-02-25T23:55:01.199Z [16547] - info: [build] admin control panel styles build started
    2018-02-25T23:55:01.217Z [16547] - info: [build] templates build started
    2018-02-25T23:55:01.218Z [16547] - info: [build] languages build started
    2018-02-25T23:55:01.219Z [16547] - info: [build] sounds build started
    2018-02-25T23:55:01.225Z [16547] - info: [build] plugin static dirs build completed in 0.04sec
    2018-02-25T23:55:07.666Z [16547] - info: [build] client js bundle build completed in 6.474sec
    2018-02-25T23:55:07.666Z [16547] - info: [build] admin js bundle build completed in 6.472sec
    2018-02-25T23:55:07.800Z [16547] - info: [build] sounds build completed in 6.581sec
    Witout from option PostCSS could generate wrong source map or do not find Browserslist config. Set it to CSS file path or to undefined to prevent this warning
    2018-02-25T23:55:14.231Z [16547] - info: [build] client side styles build completed in 13.034sec
    2018-02-25T23:55:17.727Z [16547] - info: [build] admin control panel styles build completed in 16.529sec
    2018-02-25T23:55:17.848Z [16547] - info: [build] requirejs modules build completed in 16.658sec
    2018-02-25T23:55:19.498Z [16547] - info: [build] languages build completed in 18.28sec
    2018-02-25T23:55:19.519Z [16547] - info: [build] templates build completed in 18.302sec
    2018-02-25T23:55:19.521Z [16547] - info: [build] Asset compilation successful. Completed in 18.336sec.
    [email protected]:~/nodebb$ ./nodebb restart

    Unfortunately, the result is the same:


  • Global Moderator Plugin & Theme Dev

    @howardm It looks like your database didn't copy over correctly.

  • #11


    Thanks for responding. I used scp to copy it (dump.rdb) directly from server 1 to the home directory of server 2, and then (using cp) from the home directory to /var/lib/redis.

    It's a small file (small database) and I didn't see any errors.

    Could this method have introduced "corruption" ?

    What method would you use ?


  • Global Moderator Plugin & Theme Dev

    @howardm If I were you, I'd check that the redis database is correct using redis-cli. By viewing the contents of keys like config or plugins:active you can make sure you have the right database settings. You also might want to check that "database": 1 is what you want, as the default is 0 for redis.

  • #13


    Well, that was it!

    I changed the config.json to read: "database": "0" and it works.

    When I installed nodebb,the setup (I think) said I could choose any database number, and I arbitrarily chose "1" without thinking that the redis database I was going to restore was (presumably) associated with "0". Or, stated differently, there is only one redis database involved in this situation.

    Thanks, again, for the observation!


  • GNU/Linux

    Glad to hear you're up and running @howardm 😄

Suggested Topics

| | | |