Downgrade from 3.6 to 3.4

Hi There,

I need to downgrade from Mongo DB 3.6 to 3.4. Could you tell me what are the commands so I can perform to downgrade correctly?

I have Ubuntu 20.04 LTS on the computer.

Much appreciated.


Hi @Pipa_Pipa

Ubuntu 18.04 is the latest version supported by MongoDB 3.6 and Ubuntu 16.04 is the latest for MongoDB 3.4, you will likely have dependency issues trying otherwise.

The downgrade procedures is well documented in the 3.6 release/upgrade notes, for various installations;


replica set:

or sharded cluster:

Welcome to the MongoDB Community @Pipa_Pipa!

Can you provide more details on why you need to downgrade? If you are trying to workaround a specific issue or compatibility change, perhaps there are alternative approaches to suggest.

MongoDB 3.4 reached End-Of-Life (EOL) in January 2020 and MongoDB 3.6 just reached end of life in April, 2021 (per MongoDB’s Support Policy). I would generally recommend upgrading to a supported release series (currently 4.0 or newer) as EOL server versions will not receive any further maintenance or security updates.

As @chris noted, tutorials for upgrading and downgrading can be found in the MongoDB server documentation. MongoDB 3.4 (first released in Nov 2016) predates the release of Ubuntu 20.04 by 3 1/2 years and already reached EOL before Ubuntu 20.04’s release. You will have to build from source or look for alternative packages in order to install an EOL version of MongoDB server in your newer O/S.


Hi Stennie,

I need to have a Ubiquiti Unifi controller installed and they only support version 3.4 of Mongo.

Im quite new to this, so no familiar with the Downgrade tutorial listed for Mongo.

Would there be any 101 on how to downgrade or something with a few commands to perform to get it done? I know it’s on my own risk, just need to get this running until I find other alternatives,

Your help is much appreaciated.


Hi @Pipa_Pipa,

I suspect the “only support version 3.4” wording means this is the only version Ubiquiti have tested with. However, it is likely that you can use MongoDB 3.6 unless the controller is relying on some older commands that have finally been removed in 3.6. Generally commands are deprecated for several major server release series before they are fully removed.

See Compatibility Changes in MongoDB 3.6 for a list of server changes that may be relevant.

Yes, those are the links @chris already provided. The caveat I added is that MongoDB 3.4 was EOL before your version of Ubuntu was released, so I expect you’ll have to build from source or look for alternative packages.

I suggest trying to run the Unifi controller with MongoDB 3.6. There is some related discussion on the Ubiquity forums: MongoDB 3.6. It looks like the only issue is trying to start mongod with a deprecated --nohttpinterface parameter, but bkohler provides a workaround in the MongoDB 3.6 discussion thread.


From their release notes:
We support MongoDB 3.6 since 5.13.10

1 Like