Rocket.Chat 4.0.0 has recently been released. The upgrade process from the previous version is not quite simple to be very honest.
Even though you can make the transition from an old 3.x.y version of Rocket.Chat earlier versions of MongoDB namely 3.6 and 4.0 have been deprecated for use with the popular chat server since the new release. MongoDB 3.4 support has also been removed. These changes were first confirmed on pull request 22907 merged two weeks earlier.
In this tutorial Iaposve documented a complete step-by-step process to make a successful upgrade to Rocket.Chat including upgrading your MongoDB database version to the most recent 5.0.
In addition there is also a mandatory necessity to change the database storage engine from MMAPv1 also deprecated to WiredTiger. Only then can you continue upgrading to newer versions of Rocket.Chat. That procedure has also been carefully covered in detail within this comprehensive guide.