Issue
I am trying to self-host Appsmith on Oracle cloud using Docker, but I'm not sure if the Docker image comes with a MongoDB server included or if I need to connect to a separate MongoDB server. I found a connection string to MongoDB in the advanced settings, but I'm not sure if it is for an internal or external MongoDB. I tried connecting to the internal MongoDB with Compass but the credentials didn't work. I ended up running a separate container for my database. Is this the intended way to use Appsmith with a database?
Resolution
Yes, Appsmith’s default Docker setup includes embedded instances of MongoDB and Redis, which are used internally by the platform.
Embedded MongoDB and Redis in Docker
When you deploy Appsmith using the official Docker image (or Docker Compose setup), it spins up:
- MongoDB: Used for internal Appsmith data such as apps, pages, user data, etc.
- Redis: Used for caching and session management.
This is intended to provide a simple, plug-and-play experience for local development or small-scale self-hosting.
However:
🔒 You should not attempt to directly connect to or modify the embedded MongoDB instance.
Doing so may corrupt Appsmith data or crash your apps.
Recommended for Production: Use an External MongoDB
For production-grade deployments, Appsmith supports switching to your own MongoDB and Redis servers. This gives you:
- Better performance
- Scalability
- Improved reliability
- Clear separation of concerns