Category: Question and Answers
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Can I use MongoDB 3.4+ WiredTiger as a back-end for Appsmith?

Issue

I want to use MongoDB 3.4 + WiredTiger as a back-end for Appsmith, but I'm limited by the available managed service from our cloud provider and I can't upgrade to a recommended version like 4.2 or 4.4. We are currently using a MongoDB statefulset when deploying to K8s, but we need a more reliable managed solution for automated backups and redundancy.

Resolution

The recommended approach is to use a newer version of MongoDB (4.2 or 4.4) with Appsmith rather than an old version (3.4). However, if the cloud provider only offers MongoDB 3.4, it may still work with Appsmith, but it would be hard to support and troubleshoot.

Another option is to use MongoDB that comes as part of the Appsmith image, which will always be a supported version. This approach will also provide a more reliable and managed solution with automated backups and redundancy.

To use MongoDB with Appsmith, one can either deploy MongoDB as a statefulset in Kubernetes or use the MongoDB instance that comes with the Appsmith image. Example code to deploy MongoDB as a statefulset on K8s can be found in the Kubernetes documentation.

To use the MongoDB instance that comes with the Appsmith image, simply specify the connection string in the Appsmith configuration file. The following JSON shows an example configuration file.

{
"db": {
"mongodb": {
"connectionString": "mongodb://localhost:27017/appsmith?ssl=false"
}
}
}

In this example, the MongoDB instance is running on the same host as Appsmith and listening on port 27017. The database name is "appsmith" and SSL is disabled.

In summary, it is recommended to use a newer version of MongoDB with Appsmith. However, if the cloud provider only offers an old version, it may still work but would be hard to support and troubleshoot. The other option is to use the MongoDB instance that comes with the Appsmith image, which is a supported version and provides a more reliable and managed solution.