-
Notifications
You must be signed in to change notification settings - Fork 312
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
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
26d261b
docs + blog for mongo self hosted
atharvadeosthale f4d3372
address comments
atharvadeosthale 920b4df
add cover for tutorial
atharvadeosthale 4bdb740
Add MongoDB self-hosted integration guide
adityaoberai 275d7a0
Merge branch 'sh-mongo-docs' of https://github.com/appwrite/website i…
atharvadeosthale eae8d7f
add announcement blog
atharvadeosthale 26c3a33
Merge branch 'main' into sh-mongo-docs
atharvadeosthale ddb2c65
changelog
atharvadeosthale 5ffd767
Update src/routes/integrations/self-hosted-mongodb/+page.markdoc
adityaoberai 63dedfc
Apply suggestions from code review
atharvadeosthale 7828008
address comments
atharvadeosthale 7d3761e
add description for announcement blog
atharvadeosthale 102959e
Add powershell command to mongo self-hosted integration guide
adityaoberai 4599082
Update announcement blog
adityaoberai f823142
update blog dates
atharvadeosthale 84b13ea
Revise blog post on Appwrite and MongoDB partnership
adityaoberai 73bd982
Merge branch 'sh-mongo-docs' of https://github.com/appwrite/website i…
adityaoberai d6c09be
Apply suggestion from @adityaoberai
adityaoberai e7257c2
Apply suggestion from @adityaoberai
adityaoberai a5ca644
Merge branch 'main' into sh-mongo-docs
atharvadeosthale 5156b79
optimize
atharvadeosthale 783d7c4
Merge branch 'main' into sh-mongo-docs
adityaoberai 13958c9
Apply suggestion from @adityaoberai
adityaoberai d1ccbcb
eyebrow
atharvadeosthale f7ad7f5
update cover and change blog dates
atharvadeosthale 1a388b9
split windows tab into cmd and powershell
atharvadeosthale 2cdecb4
Apply suggestions from code review
adityaoberai f03bc1e
Merge branch 'main' into sh-mongo-docs
adityaoberai 1ae2eeb
Update changelog
adityaoberai e401434
add note for spatial docs
atharvadeosthale 42dd820
Update self-hosted spatial queries note
adityaoberai 337ebb0
Apply suggestions from code review
adityaoberai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,39 @@ | ||
| <script lang="ts"> | ||
| import { Icon } from '$lib/components/ui'; | ||
| import type { IconType } from '$lib/components/ui/icon/types'; | ||
|
|
||
| type Props = { | ||
| title: string; | ||
| href: string; | ||
| icon?: Extract<IconType, 'mongo' | 'sparkle'>; | ||
| class?: string; | ||
| }; | ||
|
|
||
| const { title, href }: Props = $props(); | ||
| const { title, href, icon = 'sparkle' }: Props = $props(); | ||
| </script> | ||
|
|
||
| <a {href} class="web-hero-banner-button relative mb-4 flex items-center!"> | ||
| <Icon name="sparkle" class="shrink-0" aria-hidden="true" /> | ||
| <span class="text-caption shrink-0 font-medium">New</span> | ||
| {#if icon === 'mongo'} | ||
| <span class="mongo-icon-badge shrink-0" aria-hidden="true"> | ||
| <Icon name="mongo" style="width: 0.75rem; height: 1.125rem; color: #00ED64;" /> | ||
| </span> | ||
| {:else} | ||
| <Icon name="sparkle" class="shrink-0" aria-hidden="true" /> | ||
| {/if} | ||
| <div class="web-hero-banner-button-sep"></div> | ||
| <span class="text-caption web-u-trim-1">{title}</span> | ||
| <Icon name="arrow-right" class="shrink-0" aria-hidden="true" /> | ||
| </a> | ||
|
|
||
| <style> | ||
| .mongo-icon-badge { | ||
| width: 1.375rem; | ||
| height: 1.375rem; | ||
| padding: 0.0625rem; | ||
| border-radius: 9999px; | ||
| background-color: #001e2b; | ||
| display: inline-flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| } | ||
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
src/routes/blog/post/appwrite-mongodb-partnership-self-hosted/+page.markdoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 is joining forces with MongoDB, the world's best database company, to give developers a fully open-source, database-flexible backend platform they can own, grow with, and trust at every stage. | ||
| date: 2026-04-01 | ||
| 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 an open ecosystem of 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 developer community and investing heavily in these builders. | ||
|
|
||
| What we're formalizing now is the natural next step: two companies committed to open source 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, whether through open-source tools, managed platforms, or a hybrid approach. | ||
|
|
||
| # 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
148 changes: 148 additions & 0 deletions
148
src/routes/blog/post/self-hosting-appwrite-with-mongodb/+page.markdoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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-04-01 | ||
| 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 #cmd 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
|
||
| {% /tabsitem %} | ||
|
|
||
| {% tabsitem #powershell title="Windows (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 | ||
| ``` | ||
| {% /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) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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-04-01 | ||
| cover: /images/blog/appwrite-mongodb-partnership-self-hosted/cover.png | ||
| --- | ||
|
|
||
| Appwrite now supports MongoDB as a database 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 database changes. | ||
|
|
||
| {% arrow_link href="/blog/post/appwrite-mongodb-partnership-self-hosted" %} | ||
| Read the announcement | ||
| {% /arrow_link %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.