This page describes the MongoDB and driver versions with which Queryable Encryption is compatible.
➤ Use the Select your language drop-down menu to select your driver and see its compatibility with Queryable Encryption.
MongoDB Edition, Topology, and Version Compatibility
Queryable Encryption with automatic encryption is only available with MongoDB Enterprise Edition and MongoDB Atlas. You can use Queryable Encryption on a MongoDB replica set or sharded cluster, but not a standalone instance.
Explicit encryption is available with MongoDB Community and Enterprise Edition.
Driver Compatibility
To use Queryable Encryption with the C driver, install the following components:
Driver version 1.24.0 or later
libmongocrypt version 1.8.0 or later
To use Queryable Encryption with the C++ driver, install the following components:
Driver version 3.8.0 or later
libmongocrypt version 1.8.0 or later
To use Queryable Encryption with the .NET/C# driver, install driver version 2.20.0 or later.
If you're using driver version 3.0 or later, you must also complete the following steps:
Install the MongoDB.Driver.Encryption package from NuGet. This package enables automatic encryption.
If your application runs on Linux, install libmongocrypt manually. Then, set the
LIBMONGOCRYPT_PATH
environment variable to the absolute path of thelibmongocrypt
file.If your application runs on 64-bit Linux, and you're using driver version 3.4.3 or earlier, add the following lines of XML to your
.csproj
file. Change the value of the<MongoDriverEncryptionVersion>
element to match the version of theMongoDB.Driver.Encryption
package that you have installed.
<PropertyGroup> <!-- replace the version here with your package version --> <MongoDriverEncryptionVersion>3.4.2</MongoDriverEncryptionVersion> <MongoDriverEncryptionPath>$(NuGetPackageRoot)mongodb.driver.encryption\$(MongoDriverEncryptionVersion)</MongoDriverEncryptionPath> </PropertyGroup> <PropertyGroup> <!-- Suppresses the duplicate file error --> <ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles> </PropertyGroup> <!-- Ensures the correct library after build or publish --> <Target Name="EnsureCorrectMongoEncryption" AfterTargets="Build;Publish" Condition="'$(RuntimeIdentifier)' != ''"> <!-- Determine paths based on current operation --> <PropertyGroup> <_TargetDir Condition="Exists('$(PublishDir)')">$(PublishDir)</_TargetDir> <_TargetDir Condition="'$(_TargetDir)' == ''">$(OutputPath)</_TargetDir> </PropertyGroup> <!-- Copy the correct library based on runtime identifier (RID) --> <ItemGroup> <_CorrectMongoLib Include="$(MongoDriverEncryptionPath)/runtimes/linux/native/x64/libmongocrypt.so" Condition="'$(RuntimeIdentifier)' == 'linux-x64'" /> <_CorrectMongoLib Include="$(MongoDriverEncryptionPath)/runtimes/linux/native/arm64/libmongocrypt.so" Condition="'$(RuntimeIdentifier)' == 'linux-arm64'" /> <_CorrectMongoLib Include="$(MongoDriverEncryptionPath)/runtimes/linux/native/alpine/libmongocrypt.so" Condition="'$(RuntimeIdentifier)' == 'linux-musl-arm64'" /> </ItemGroup> <!-- Copy with overwrite --> <Copy SourceFiles="@(_CorrectMongoLib)" DestinationFolder="$(_TargetDir)" Condition="'@(_CorrectMongoLib)' != ''" OverwriteReadOnlyFiles="true" /> <Message Text="Fixed MongoDB encryption library for $(RuntimeIdentifier)" Condition="'@(_CorrectMongoLib)' != ''" /> </Target>
To use Queryable Encryption with the Go driver, install the following components:
Driver version 1.12 or later
libmongocrypt version 1.8.0 or later
To use Queryable Encryption with the Java Reactive Streams driver, install the following components:
Driver version 4.10.0 or later
mongodb-crypt version 1.8.0 or later
To use Queryable Encryption with the Java Sync driver, install the following components:
Driver version 4.10.0 or later
mongodb-crypt version 1.8.0 or later
To use Queryable Encryption with the Node.js driver, install the following components:
Driver version 5.5.0 or later
mongodb-client-encryption version 2.8.0 or later
To use Queryable Encryption with the PHP driver, install driver version 1.16 or later.
To use Queryable Encryption with PyMongo, install the following components:
Driver version 4.4 or later
pymongocrypt version 1.6 or later
To use Queryable Encryption with the Ruby driver, install the following components:
Driver version 2.19 or later
libmongocrypt-helper version 1.8.0 or later
To use Queryable Encryption with the Rust driver, install the following components:
Driver version 2.4.0 or later
libmongocrypt version 1.8.0 or later
To use Queryable Encryption with the Scala driver, install the following components:
Driver version 4.10.0 or later
mongodb-crypt version 1.8.0 or later