-
Notifications
You must be signed in to change notification settings - Fork 310
Documentation + tutorial blog for self-hosted MongoDB release #2823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
26d261b
f4d3372
920b4df
4bdb740
275d7a0
eae8d7f
26c3a33
ddb2c65
5ffd767
63dedfc
7828008
7d3761e
102959e
4599082
f823142
84b13ea
73bd982
d6c09be
e7257c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| --- | ||
| layout: post | ||
| title: Appwrite and MongoDB are partnering to build the future of open-source development | ||
| description: Appwrite and MongoDB are joining forces around a shared vision, giving developers a fully open-source, database-flexible backend platform they can own, grow with, and trust at every stage. | ||
| date: 2026-03-31 | ||
| cover: /images/blog/appwrite-mongodb-partnership-self-hosted/cover.png | ||
| timeToRead: 6 | ||
| author: | ||
| - eldad-fux | ||
| - jake-barnby | ||
| category: announcement | ||
| featured: true | ||
| --- | ||
|
|
||
| Today, we're announcing a partnership between Appwrite and MongoDB. | ||
|
|
||
| More than just a technical integration, this is a long-term, strategic collaboration between two companies that share the same belief: developers deserve open-source tools that actually work together, don't lock them in, and grow with them over time. | ||
|
|
||
| # Why this partnership exists | ||
|
|
||
| Appwrite and MongoDB were both built for developers who want control. MongoDB gave the world a flexible, powerful data layer. Appwrite gave developers a complete open-source backend they could own end-to-end. Both companies grew by betting on the open-source community and investing in it heavily. | ||
|
|
||
| What we're formalizing now is the natural next step: two open-source-first companies aligning around a shared vision, combining strengths, and committing to building something together that neither could build as well alone. | ||
|
|
||
| The goal is a backend platform that doesn't force tradeoffs. One where you can choose your database, own your infrastructure, and still get the developer experience you'd expect from a managed service. | ||
|
|
||
| # How we're starting: MongoDB on self-hosted Appwrite | ||
|
|
||
| The first concrete result of this partnership is that **MongoDB is now officially supported in Appwrite's self-hosted, open-source edition** and Appwrite is now listed in the [MongoDB Partner Ecosystem](https://cloud.mongodb.com/ecosystem/appwrite). | ||
|
|
||
| When you select MongoDB during setup, Appwrite spins up a MongoDB Community Edition container and manages everything alongside your other services. Your app talks to Appwrite through the same APIs and SDKs as always. Appwrite handles schema management, connections, and the full lifecycle. | ||
|
|
||
| **Ready to get started?** Our [self-hosting tutorial](/blog/post/self-hosting-appwrite-with-mongodb) walks you through everything you need to spin up an Appwrite instance powered by MongoDB. | ||
|
|
||
| # How both communities benefit | ||
|
|
||
| For the **Appwrite community**, this partnership means your backend is no longer tied to a single data engine. As Appwrite expands database support, you gain real flexibility in how you architect and operate your infrastructure, without giving up the unified API, SDKs, and backend services you already rely on. | ||
|
|
||
| For the **MongoDB community**, this partnership opens a new door. Appwrite is a full-featured developer platform offering authentication, storage, serverless functions, databases, web hosting, and more. With MongoDB now supported as Appwrite's underlying data engine, MongoDB developers can adopt Appwrite as a complete backend layer that speaks their language, runs in their environments, and fits inside their existing operations. | ||
|
|
||
| Both communities benefit from something the open-source ecosystem rarely gets: two major platforms actively investing in making each other work better. | ||
|
|
||
| # The larger vision | ||
|
|
||
| The end goal is a developer cloud where the database is never a constraint. One where you choose the data layer that fits your team, your stack, and your scale, and Appwrite works seamlessly on top of it. | ||
|
|
||
| Moving beyond a single database engine means giving developers a truly schema-flexible, cloud-native backend that doesn't force tradeoffs between ownership, flexibility, and experience. And it means building that future alongside the companies whose technology already powers the way developers work. | ||
|
|
||
| Here's what's on the roadmap: | ||
|
|
||
| - **MongoDB on Appwrite Cloud.** MongoDB will be available in a fully managed environment. The console will adapt dynamically when running on MongoDB, and the experience will feel first-class from day one. | ||
| - **A more idiomatic NoSQL experience.** We're working on an API that removes the need for rigid attribute definitions, giving developers a schema-flexible workflow that matches how people actually build with document databases. | ||
| - **Broader database flexibility across the platform.** Alongside the recent introduction of TablesDB, this partnership signals the direction Appwrite is heading: a platform where you bring the database that fits your team, and Appwrite works seamlessly on top of it. | ||
|
|
||
| # What comes next | ||
|
|
||
| This partnership is a beginning, not a destination. The work ahead is about making database flexibility a first-class part of what Appwrite means; not a feature, but a foundation. | ||
|
|
||
| We see a future where developers never have to choose between the tools they want and the platform that ties them together. Where open-source isn't a constraint but an advantage. Where the backend layer disappears into the background and teams spend their time building products, not plumbing. | ||
|
|
||
| Appwrite and MongoDB are building toward that future together. We'll share more as it takes shape; stay tuned for the announcements to come. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,148 @@ | ||
| --- | ||
| layout: post | ||
| title: Self-hosting Appwrite with MongoDB as the underlying database | ||
| description: Learn how to self-host Appwrite with MongoDB as the database backend using the new installation wizard. | ||
| date: 2026-03-31 | ||
| cover: /images/blog/self-hosting-appwrite-with-mongodb/cover.png | ||
| timeToRead: 6 | ||
| author: atharva | ||
| category: tutorial | ||
| --- | ||
|
|
||
| Appwrite is built on self-hosting, but until now, MariaDB was the only database option. With Appwrite 1.9.0, you can now choose MongoDB as your database backend. This is a big deal if you prefer a document-based database or already have MongoDB expertise on your team. | ||
|
|
||
| In this article, you will learn how to self-host Appwrite with MongoDB from scratch using the new web-based installation wizard. | ||
|
|
||
| # Prerequisites | ||
|
|
||
| Before you begin, make sure you have the following ready: | ||
|
|
||
| - A server or local machine with at least **2 CPU cores**, **4GB of RAM**, and **2GB of swap memory** | ||
| - [Docker CLI](https://www.docker.com/products/docker-desktop) installed | ||
| - If you're installing on a remote server, port **20080** must be open in your firewall (the installation wizard runs on this port). You can close it after installation is complete. | ||
|
|
||
| # Running the installer | ||
|
|
||
| The installer is a single Docker command that launches a web-based setup wizard. Open your terminal and run: | ||
|
|
||
| {% tabs %} | ||
| {% tabsitem #unix title="macOS and Linux" %} | ||
| ```bash | ||
| docker run -it --rm \ | ||
| --publish 20080:20080 \ | ||
| --volume /var/run/docker.sock:/var/run/docker.sock \ | ||
| --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ | ||
| --entrypoint="install" \ | ||
| appwrite/appwrite:1.9.0 | ||
| ``` | ||
| {% /tabsitem %} | ||
|
|
||
| {% tabsitem #windows title="Windows" %} | ||
| ## CMD | ||
| ```cmd | ||
| docker run -it --rm ^ | ||
| --publish 20080:20080 ^ | ||
| --volume //var/run/docker.sock:/var/run/docker.sock ^ | ||
| --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ | ||
| --entrypoint="install" ^ | ||
| appwrite/appwrite:1.9.0 | ||
| ``` | ||
atharvadeosthale marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## PowerShell | ||
| ```powershell | ||
| docker run -it --rm ` | ||
| --publish 20080:20080 ` | ||
| --volume /var/run/docker.sock:/var/run/docker.sock ` | ||
| --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` | ||
| --entrypoint="install" ` | ||
| appwrite/appwrite:1.9.0 | ||
| ``` | ||
|
Comment on lines
+41
to
+59
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of using headings, you can just write a sentence or even maybe have two tabs: Windows (CMD) and Windows (Powershell) Right now this looks weird @atharvadeosthale
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @atharvadeosthale check this out please |
||
| {% /tabsitem %} | ||
| {% /tabs %} | ||
|
|
||
| Once the command is running, open your browser and go to `http://localhost:20080` (or your server's IP address on port 20080). | ||
|
|
||
| # Step 1: Setup your app | ||
|
|
||
| The first screen asks you to configure the basics of your Appwrite instance. | ||
|
|
||
|  | ||
|
|
||
| - **Hostname:** Enter the domain or IP address where your Appwrite instance will be accessible. If you're just testing locally, `localhost` works fine. | ||
| - **Database:** This is the important part. Select **MongoDB**. It's already selected by default, but make sure it's the one highlighted. | ||
| - **Advanced settings:** Expand this if you want to change the HTTP/HTTPS ports, set an SSL certificate email, or add an OpenAI key for the [Appwrite Assistant](/docs/tooling/assistant). For most setups, the defaults are fine. | ||
|
|
||
| One thing to note here: the database choice is permanent. You cannot switch from MongoDB to MariaDB (or vice versa) after installation without starting fresh. So make sure you're happy with your choice before proceeding. | ||
|
|
||
| # Step 2: Secure your app | ||
|
|
||
| Next, the wizard generates a secret API key for your instance. This key is used to encrypt sensitive data on your server. | ||
|
|
||
|  | ||
|
|
||
| Copy this key and store it somewhere safe. You won't be able to see it again after this step. If you lose it, you won't be able to decrypt your data. Use the copy button to grab it, or click regenerate if you want a new one. | ||
|
|
||
| # Step 3: Create your account | ||
|
|
||
| Set up the email and password for your Appwrite account. You can use these credentials to sign in to the Appwrite Console later, but you'll be automatically signed in when the installer completes. | ||
|
|
||
|  | ||
|
|
||
| Make sure you use a strong password (minimum 8 characters). This is the account that will have full access to your Appwrite instance. | ||
|
|
||
| # Step 4: Review and install | ||
|
|
||
| The final step shows a summary of everything you've configured. Double-check the settings, especially the database selection showing **MongoDB**. | ||
|
|
||
|  | ||
atharvadeosthale marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| If everything looks good, hit **Install**. The wizard will pull the necessary Docker images and set up your Appwrite instance with MongoDB. This might take a few minutes depending on your internet speed. | ||
|
|
||
| # What happens under the hood | ||
|
|
||
| Your Appwrite API stays exactly the same regardless of which database you pick. You still work with tables, columns, and rows through the Appwrite Console and SDKs. The database choice only affects the underlying storage engine. | ||
|
|
||
| Here are the environment variables that get configured for MongoDB: | ||
|
|
||
| | Variable | Value | | ||
| |---|---| | ||
| | `_APP_DB_ADAPTER` | `mongodb` | | ||
| | `_APP_DB_HOST` | `mongodb` | | ||
| | `_APP_DB_PORT` | `27017` | | ||
| | `_APP_DB_SCHEMA` | `appwrite` | | ||
|
|
||
| You can find these in the `.env` file inside your `appwrite` directory after installation. | ||
|
|
||
| # Backing up your MongoDB data | ||
|
|
||
| Once your instance is running, you'll want to set up backups. Here's the command to create a backup of your MongoDB data: | ||
|
|
||
| ```bash | ||
| docker compose exec mongodb sh -c 'exec mongodump --username=root --password="$MONGO_INITDB_ROOT_PASSWORD" --authenticationDatabase=admin --archive' > ./dump.archive | ||
| ``` | ||
|
|
||
| And to restore from a backup on a fresh installation: | ||
|
|
||
| ```bash | ||
| docker compose exec -T mongodb sh -c 'exec mongorestore --username=root --password="$MONGO_INITDB_ROOT_PASSWORD" --authenticationDatabase=admin --archive' < dump.archive | ||
| ``` | ||
|
|
||
| Only restore to a fresh Appwrite installation to avoid data corruption. | ||
|
|
||
| # Accessing the Console | ||
|
|
||
| After installation completes, you'll be automatically signed in to the Appwrite Console. From here, create your first project. | ||
|
|
||
| From here, you can start building with Appwrite's full suite of features: Authentication, Databases, Storage, Functions, Messaging, and Sites. All powered by MongoDB under the hood. | ||
|
|
||
| # Wrapping up | ||
|
|
||
| Self-hosting Appwrite with MongoDB is straightforward with the new installation wizard. The entire process takes a few minutes, and you get a production-ready setup with a database backend you're comfortable with. | ||
|
|
||
| If you have any questions, join our [Discord server](https://appwrite.io/discord) to connect with the team. | ||
|
|
||
| - [Self-hosting installation guide](/docs/advanced/self-hosting/installation) | ||
| - [Database configuration](/docs/advanced/self-hosting/configuration/databases) | ||
| - [Backup guide](/docs/advanced/self-hosting/production/backups) | ||
| - [Production readiness](/docs/advanced/self-hosting/production) | ||
atharvadeosthale marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - [MongoDB integration guide](/integrations/self-hosted-mongodb) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| layout: changelog | ||
| title: "MongoDB support for self-hosted Appwrite" | ||
| date: 2026-03-24 | ||
| cover: /images/blog/appwrite-mongodb-partnership-self-hosted/cover.png | ||
| --- | ||
|
|
||
| Appwrite now supports MongoDB as a database backend for self-hosted installations. Starting with Appwrite 1.9.0, you can choose between MongoDB and MariaDB when setting up your instance. MongoDB is the new default. | ||
|
|
||
| The new web-based installation wizard walks you through the setup, including database selection, in just a few steps. Your Appwrite API stays the same regardless of which database you pick - only the underlying storage engine changes. | ||
|
|
||
| {% arrow_link href="/blog/post/appwrite-mongodb-partnership-self-hosted" %} | ||
| Read the announcement | ||
| {% /arrow_link %} |

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The blog post frontmatter references a cover image at
/images/blog/self-hosting-appwrite-with-mongodb/cover.png, but this file does not appear to be included in the PR. All other image files added in this PR are wizard screenshots understatic/images/docs/.... If the cover image is missing fromstatic/images/blog/self-hosting-appwrite-with-mongodb/cover.png, the blog post will render with a broken image.