Skip to content
  • There's a command for unattended upgrades?

    Unsolved Technical Support
    1
    0 Votes
    1 Posts
    173 Views
    Gliding9426G
    Hi, I switched from docker install to normal install and I wonder if i can automate updates because I will 100% forget to apply them in the long term I tried to create a script to run once a month to do this: delete everything except config.json, packages.json and uploads get latest source for the 3.x branch from github run ./nodebb upgrade as node user, then start it but then I noticed that ./nodebb upgrade can ask "do you want to upgrade this plugin Y/N?", and so it can't be run attended in a script I checked in the help and I did not see a command to make it unattended, so I resorted to just run it as ./nodebb upgrade -mib && ./nodebb start, which looks like it does not ask questions What do you think?
  • 1 Votes
    2 Posts
    804 Views
    omegaO
    Cool and for context a link to the upgrade doc section - https://docs.nodebb.org/configuring/upgrade/
  • 1 Votes
    20 Posts
    5k Views
    PitaJP
    @fevzikorkutata I don't understand what you're saying. That fix is in 1.17.0 so you shouldn't have run into that issue if you went straight from 1.0.3 to 1.17.0 as I recommended.
  • 0 Votes
    2 Posts
    693 Views
    barisB
    https://github.com/NodeBB/NodeBB/issues/9204
  • 0 Votes
    3 Posts
    591 Views
    Varun Ganesh DV
    @scottalanmiller Same as given on NodeBB Doc
  • 0 Votes
    30 Posts
    4k Views
    S
    @Varun-Ganesh-D said in How to Upgrade from v1.13.3 to v1.14.0?: but it's crashing when i enter ./nodebb start Does it give any errors?
  • Upgrade steps from v1.12.0 to v1.13.2

    Technical Support
    2
    0 Votes
    2 Posts
    416 Views
    PitaJP
    It used to be that you had to upgrade in multiple steps, but not anymore. You can upgrade directly from 1.12.0 to 1.13.2 Make sure you backup your database
  • Syntax error when ./nodebb upgrade

    Technical Support
    8
    0 Votes
    8 Posts
    1k Views
    oplik0O
    @PitaJ said in Syntax error when ./nodebb upgrade: @oplik0 that's entirely incorrect. git fetch does literally nothing to local files, and even if it did, ./nodebb upgrade only affects the database and files that aren't handled by git. Oh, possible. It probably fixed things for me because my problems were mostly due to me messing with NodeBB files. It seemed to reset the upgrade then, but that probably was because it didn't get to actually changing anything while I broke it.
  • 0 Votes
    2 Posts
    912 Views
    R
    I fixed my own issue. Apparently some install scripts fail when run as root (or with sudo). I'm not sure why this is the case, but I got everything to work by running sudo chown -R ralph:www-data /path/to/nodebb && ./nodebb upgrade as a standard user.
  • 0 Votes
    5 Posts
    2k Views
    M
    After last restart forum has been up almost 2 days without crash, no plugin has been disabled. Actually I didn't do anything else, just started NodeBB again.
  • HELP! Update from 0.8 to 1.4

    Technical Support
    6
    0 Votes
    6 Posts
    3k Views
    O
    tom@ama:~/nodebb$ mongo nodebb MongoDB shell version: 3.2.12 connecting to: nodebb Server has startup warnings: 2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten] 2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. 2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never' 2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten] 2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. 2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never' 2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten] show users { "_id" : "nodebb.nodebbsvc", "user" : "nodebbsvc", "db" : "nodebb", "roles" : [ { "role" : "readWrite", "db" : "nodebb" } ] }
  • It does not work administrative panel

    Solved Technical Support
    6
    0 Votes
    6 Posts
    3k Views
    S
    @hukadan THANKS!!!
  • 7 Votes
    1 Posts
    4k Views
    R
    Create & Manage a NodeBB Test/Dev Environment Table of Contents Summary Caveats Webserver Nginx NodeBB PRD -> DEV Adjustments to DEV Upgrading DEV NodeBB Delete DEV Fresh NodeBB with PRD database Summary The old saying goes Laws are like sausages, it is better not to see them being made. Managing NodeBB isn't as bad as that but there could be a bit of a challenge the first few times that you attempt to upgrade your software or install a new feature. Especially on your production system! So what can you do? Make a sausage factory of course! In our case the factory is a test/development environment to practice your upgrades or test a new plugin or CSS change. You do not necessarily need to spend additional money on a test/dev server, although you could. You can spin up a copy of your production system right on your production system. This is not very difficult due in part to how well NodeBB, and Node.js, were created. Caveats For disclosure I am not a developer of NodeBB or any of the supporting applications. These notes are just that, a collection of my notes as I was experimenting and learning. I do have twenty-four years of IT experience, mostly Unix (SunOS, Solaris, AIX, BSD, Linux) which includes twenty-four years of bad habits and ugly kludges. I do hope that in those years I have picked up a few gems and learned a few good traits. I will try to pass along only the best but please do accept the ugly as they come. My NodeBB forum runs on a Linux (CentOS) server. I utilize Redis as my NodeBB database and use Nginx as my web server. This document, unless noted otherwise, will reference that environment. I am making the assumption that you have a production NodeBB server that is fully operational and you wish to create a dev/test copy of it on the same server. And finally, The risk is yours. I do not take responsibility for harm to your system. Please evaluate all of my suggestions as you deem necessary. Webserver Nginx This addition should only need to be made once. After it is in place you should be able to create and delete dev NodeBB environments from your production without needing to adjust your Nginx configuration. You will need to make a new server block in your Nginx domain configuration file. Most likely located in /etc/nginx/sites-available/yourforumdomain.com.conf. This new server block will have the specifics for your dev NodeBB. For example you may create an entry like: server { listen 443 ssl; server_name dev.yourforumdomain.com; [...] In your location / { location block you will need a proxy_pass entry that directs to the port that your dev NodeBB will listen on: location / { [...] proxy_pass http://127.0.0.1:4568; [...] Once you have your Nginx configuration adjusted appropriately do not forget to restart it. sudo systemctl restart nginx. NodeBB PRD -> DEV For my examples the production NodeBB is running under the /opt/nodebb/ directory path and we will be creating a copy into /opt/devNodebb/ Let's make a copy of production into dev. This can be done "live" without needing to shutdown your production forum. mkdir /opt/devNodebb (cd /opt/nodebb; tar cf - .) | (cd /opt/devNodebb; tar xvf -) If NodeBB was running when you made the copy you'll need to remove the pidfile. A pidfile typically contains the process id information of the running program. This is useful so that commands such as ./nodebb stop know which program to kill. The pidfile you copied over relates to the process id of your production NodeBB. You don't want to be killing that process when you try to startup your dev NodeBB. rm /opt/devNodebb/pidfile Since you made a copy of production you have all production information. If you attempted to start your dev NodeBB now you would have problems. You must edit your config.json file and tell it that you want a new instance of NodeBB. vi /opt/devNodebb/config.json Change your url, port and database entries. For the URL make it the dev domain that you configured your Nginx to listen for. For the port and database numbers I just incremented by one from production. "url": "https://dev.yourforumdomain.com", "port": "4568", [...] "database": "1" No you aren't ready to start up your dev NodeBB just yet. There isn't a database behind it. Let's make a copy of the production Redis database for dev to use. I use redis-copy which is not part of the redis database distribution. I downloaded and built my copy from this Github repository redis-copy. The following command makes a copy of the Redis database number 0 (production) to database number 1 (your dev/test). Database number 1 is the database we told the devNodebb config.json file above to use. redis-copy localhost/0 localhost/1 Now we may startup the dev NodeBB instance. cd /opt/devNodebb ./nodebb start Adjustments to DEV Once your dev forum is running you should make a few administrative adjustments to it. These are not necessarily critical but they will help you to keep track of which system you are working on and may reduce notifications to your users, etc. Keep in mind that you cloned your production system which includes the users. If you do not want them logging into your dev system you should limit their exposure to it. You may want to adjust the site and browser title's to reflect a dev forum ACP > Settings > General > Site Title > DEV YourForumName ACP > Settings > General > Browser Title > DEV YourForumName Disable email subscriptions ACP > Settings > Email > Email Subscriptions > Disable subscriber notification emails Disable plugins that may cause confusion, such as Google Analytics ACP > Extend > Plugins > nodebb-plugin-google-analytics > Deactivate There may be other plugins that you wish to disable. Experimenting will lead you to adjust this list appropriately. There you have it. You now have a test/dev environment based off of your production system. Changes you make now will only be done in test/dev and your users will happily continue to use the production system until the time comes that you shutdown production to re-play changes or enhancements that you tested in dev. Upgrading DEV NodeBB So you went through all of the above steps and now you have, well, just a copy of production. Not really useful as it stands but now you have a platform to test upgrading without fear of damaging production. Let's upgrade! If you'd like to bring your dev NodeBB up to the current general release of NodeBB the following steps should be adequate. Stop your dev NodeBB cd /opt/devNodebb ./nodebb stop Tell Git to get the newest release information. This sets up NodeBB such that when you issue the upgrade command it will pull down all of the new or changed files as necessary. cd /opt/devNodebb git fetch git checkout v1.x.x git merge origin/v1.x.x Issue the NodeBB upgrade command cd /opt/devNodebb ./nodebb upgrade Watch for upgrade errors. Note that any customizations or changes you have made to your theme's CSS may have been undone by a new feature or bug fix. That is why we have this test/dev environment, so you can test and look for problems. If the upgrade appears to have worked without errors start up dev NodeBB and then switch into the logging mode so that you may watch the behavior of the system. Pressing ctrl-c will exit the logging mode. cd /opt/devNodebb ./nodebb start ./nodebb log Delete DEV What if there were problems with your upgrade or you'd like to start this process over with a fresh copy of production? That is not a big problem. A few commands will delete your test/dev environment and then you can start the copy process over again. Stop your dev NodeBB cd /opt/devNodebb ./nodebb stop Let's remove the test/dev software directory tree rm -rf /opt/devNodebb Delete the test/dev Redis database. This is probably the most dangerous command in this document. Please double check that the database number provided is the one for your test/dev environment and NOT the one for your production environment. redis-cli -n 1 flushdb And there you have it, test/dev is gone. You may now redo the PRD -> DEV or Fresh NodeBB with PRD database steps if you so desire. Fresh NodeBB with PRD database There may be times that you want to have a factory fresh NodeBB installation with your database content. You would end up with users, setttings, content, etc., but not files that you may have edited over time or plugins that you installed. Run the Delete DEV section to be sure you have no remnants of a previous test/dev environment. Then proceed. Tell Git to get the software and where to put it. git clone -b v1.x.x https://github.com/NodeBB/NodeBB /opt/devNodebb Copy your production config.json file and then edit it as you would have if you were doing the PRD -> DEV section cp /opt/nodebb/config.json /opt/devNodebb/config.json vi /opt/devNodebb/config.json Change your url, port and database entries. "url": "https://dev.yourforumdomain.com", "port": "4568", [...] "database": "1" Copy over your Redis database redis-copy localhost/0 localhost/1 Since the config.json has been created and contains the information that the NodeBB setup process would have asked for we can just run the NodeBB upgrade command (as opposed to the setup command). Bypassing the questions about which database to use, etc. Before you run the NodeBB upgrade you have to actually install the NodeBB software. This process was not necessary when we copied PRD to DEV earlier as it was done when you did your initial production NodeBB installation and was brought over in the tar copy process. cd /opt/devNodebb npm install ./nodebb upgrade Now start it up! cd /opt/devNodebb ./nodebb start And there you have it. You now have a clean installation of NodeBB with your database content. As noted in the PRD -> DEV section you may wish to make adjustments to your dev forum so that you can easily identify which one you are working in. Ie., change the site and browser title names, etc. Contact me https://community.nodebb.org/user/rod Revision 1.2, 2016-APR-08 @645.beats
  • 0 Votes
    5 Posts
    3k Views
    SergioNGS
    @baris well finally managed to get it working, I was missing to accept merging the branch when doing the pull.... but that was not enough as now it was showing me a problem with the widget essentials... so I checkout the commit for "up widget essentials" and that fixed it for me!! Thank you for your time @baris
  • Upgrade: show progress

    Feature Requests
    1
    0 Votes
    1 Posts
    1k Views
    N
    Would be nice to see upgrade progress for ./nodebb upgrade. Thanks
  • Error upgrading master branch

    Technical Support
    2
    0 Votes
    2 Posts
    2k Views
    julianJ
    Looks like a warning, but not a serious one. We don't use that package in NodeBB itself so it is likely one of its dependencies
  • after upgrade problems "bgColor"

    Technical Support
    3
    0 Votes
    3 Posts
    2k Views
    ogerlyO
    I'm doing a git commit. I have a request if else in the helpers.js if (category.bgColor) { style.push ('background-color:' + category.bgColor); } else { console.log ('no bgColor'); } that will not do. but perhaps a negative query if (! category.bgColor || category.bgColor == NULL) { // Console.log ('no bgColor'); style.push ('background-color: #fff'); } else { style.push ('background-color:' + category.bgColor); } I tried only the first variant.
  • Errors on ./nodebb upgrade

    Bug Reports
    2
    0 Votes
    2 Posts
    2k Views
    yariplusY
    https://community.nodebb.org/topic/6551/error-during-upgrade-to-latest-master Has temporary fix.
  • [SOLVED] Upgrading NodeBB 0.6.0 to 0.7.0+

    Technical Support
    27
    0 Votes
    27 Posts
    16k Views
    W
    @BDHarrington7 Thanks a lot man, you've done some great enlightening regarding switching those tags /sbin/cheers
  • Plugin Compatibility Prior to Update

    NodeBB Development
    1
    0 Votes
    1 Posts
    1k Views
    J
    Hello All, I'm pretty sure this isn't a feature, besides on install. But is it possible to tell of plugin compatibility before updating your NodeBB instance? Just putting this out there for example, WordPress: [image: 4SPjA9K.png] If we can automatically update in the future, this might be a good suggestion.