Skip to content

Commit bcfbc89

Browse files
Merge pull request #2823 from appwrite/sh-mongo-docs
2 parents 4542288 + 337ebb0 commit bcfbc89

28 files changed

Lines changed: 600 additions & 37 deletions

File tree

.optimize-cache.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@
242242
"images/blog/appwrite-indexes/cover.png": "176c9662476a854a6d5aa655b562ec761c8c14d31d6ed7ccbbeca1465301448e",
243243
"images/blog/appwrite-magic-link/cover.png": "d69b6ee225594af2fd84ded6bf43275f8c9105d2610ab851e0cd0b1270989841",
244244
"images/blog/appwrite-messaging-push-email/cover.png": "f2f338968087d91ec10d248d37d41ba36c91dce31eaa9bc6c69822986d82cf05",
245+
"images/blog/appwrite-mongodb-partnership-self-hosted/cover.png": "46f60983dff4ce8ade2ac8be6823bfa296bd176381334516eb94506fa7b9bf80",
245246
"images/blog/appwrite-oauth/cover.png": "43963cbfb499a3db937af52d822662cde32fb2a67bab2f7b24b16f7d24342c90",
246247
"images/blog/appwrite-permissions/cover.png": "c63059c6f879d07312905807371fea29b23459cf757539956de4dc3bdcdc6d89",
247248
"images/blog/appwrite-pricing-update/add-ons.png": "7f7cf75b41114b5f14bda99087e6d9a6d3b39667fb4fc4479389ae3b1a666fb7",
@@ -899,6 +900,7 @@
899900
"images/blog/self-hosting-appwrite-with-coolify/cover.png": "ef2ee53a0dffacc4a25d5012267a124718dc6664d15457d7ec56bec9526360aa",
900901
"images/blog/self-hosting-appwrite-with-coolify/create-droplet.png": "33382b0e16e5ad34a6df88db61677d617bbc7fbbb0dcd7e0197ac2675f302ce5",
901902
"images/blog/self-hosting-appwrite-with-coolify/generate-ssh-key.png": "9c4ac49fdcae8d1004aec5246e95182026aa62677881de1984578671ca56fd22",
903+
"images/blog/self-hosting-appwrite-with-mongodb/cover.png": "76c2df27f2a364ac71ae0935cd77539ee576235617703a97a0a806111905040f",
902904
"images/blog/self-serve-compliance-what-teams-expect-in-2026/cover.png": "602d334f21add74866c8b2089dbef96c88cc2c9b7b5d6409fca2978d61c59ded",
903905
"images/blog/serverless-functions/1.png": "65f0b27672db8ef96297826faac64462a94ec242742d970e9ec31165d4cbbdda",
904906
"images/blog/serverless-functions/2.png": "cc910cbce07637d514f2af3144be469be5d50ef4f03c30cb09d8071edd317a70",
@@ -1196,6 +1198,14 @@
11961198
"images/docs/advanced/security/dpa.png": "5bfbf7c5654a27d23eeefe49ff70c79861d2734f454c62758978b1a600f1c85d",
11971199
"images/docs/advanced/security/mfa-modal.png": "f56b55bcb1ca889597bf8cb803fcabe8b66deaf2f06fd4f49a100d9a507cabef",
11981200
"images/docs/advanced/security/mfa.png": "903def2fe311e439851c1ed0b730bb6c88f8b8b32a8ad53152d244fb48b141e5",
1201+
"images/docs/advanced/self-hosting/installation/dark/wizard-account.png": "b7082787919afe0cb0d7975361356438d798927efda8a47c7471f08b4dd8816a",
1202+
"images/docs/advanced/self-hosting/installation/dark/wizard-review.png": "7d4cebea557f02e9e519390b5c16b2d552f641e8dff2c7c89db9851c8887edfa",
1203+
"images/docs/advanced/self-hosting/installation/dark/wizard-secure.png": "e558268592865d2ce464e37188b92ff4e1bd54d3c59fd643ad4acac2bcb117ce",
1204+
"images/docs/advanced/self-hosting/installation/dark/wizard-setup.png": "f16722e8e54da3117350d229ab2c31e955c49a54fa3439353a7c9524a3053bd4",
1205+
"images/docs/advanced/self-hosting/installation/wizard-account.png": "b3020afb2bb33c7e5258ae94fe8ba70db0446d5818eb859602bef94ca4e02e6e",
1206+
"images/docs/advanced/self-hosting/installation/wizard-review.png": "669d3b94cddbdc7dd4e4a784512726d83e74aed9a472f43d37812bd34bda8750",
1207+
"images/docs/advanced/self-hosting/installation/wizard-secure.png": "7730499fae6d0f7eb14d85f4978c2e0a84d2362c507d5cfe474ccc920f8cc1cd",
1208+
"images/docs/advanced/self-hosting/installation/wizard-setup.png": "a591eb264af97db479c2e34085e8f2bb901ec8dace8de36b089ee4ab623e9606",
11991209
"images/docs/ai/agents-md/generator-dark.png": "10273d567e8e6527deaeb6f92f0125821a0b2b33b2b0b301ea4d6162830bb43e",
12001210
"images/docs/ai/audio-processing-dark.png": "90852c361d73240474a316ca089edbc18e33b4665adb7d714dac9a7daea8945f",
12011211
"images/docs/ai/audio-processing-light.png": "29a92249b7f2706307321d5bb96d4d20a7ac41b6b55e61e374608e9941e9a6b9",
Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,39 @@
11
<script lang="ts">
22
import { Icon } from '$lib/components/ui';
3+
import type { IconType } from '$lib/components/ui/icon/types';
34
45
type Props = {
56
title: string;
67
href: string;
8+
icon?: Extract<IconType, 'mongo' | 'sparkle'>;
79
class?: string;
810
};
911
10-
const { title, href }: Props = $props();
12+
const { title, href, icon = 'sparkle' }: Props = $props();
1113
</script>
1214

1315
<a {href} class="web-hero-banner-button relative mb-4 flex items-center!">
14-
<Icon name="sparkle" class="shrink-0" aria-hidden="true" />
15-
<span class="text-caption shrink-0 font-medium">New</span>
16+
{#if icon === 'mongo'}
17+
<span class="mongo-icon-badge shrink-0" aria-hidden="true">
18+
<Icon name="mongo" style="width: 0.75rem; height: 1.125rem; color: #00ED64;" />
19+
</span>
20+
{:else}
21+
<Icon name="sparkle" class="shrink-0" aria-hidden="true" />
22+
{/if}
1623
<div class="web-hero-banner-button-sep"></div>
1724
<span class="text-caption web-u-trim-1">{title}</span>
1825
<Icon name="arrow-right" class="shrink-0" aria-hidden="true" />
1926
</a>
27+
28+
<style>
29+
.mongo-icon-badge {
30+
width: 1.375rem;
31+
height: 1.375rem;
32+
padding: 0.0625rem;
33+
border-radius: 9999px;
34+
background-color: #001e2b;
35+
display: inline-flex;
36+
align-items: center;
37+
justify-content: center;
38+
}
39+
</style>

src/routes/(marketing)/(components)/hero.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@
3535
class="animate-blur-in flex flex-col gap-4 [animation-delay:150ms] [animation-duration:1000ms] md:ml-12 lg:ml-0"
3636
>
3737
<HeroBanner
38-
title="Introducing Appwrite Arena"
39-
href="/blog/post/announcing-appwrite-arena"
38+
title="Appwrite partners with the world's best database company"
39+
href="/blog/post/appwrite-mongodb-partnership-self-hosted"
40+
icon="mongo"
4041
/>
4142

4243
<GradientText class="animate-fade-in">
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
layout: post
3+
title: Appwrite and MongoDB are partnering to build the future of open-source development
4+
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.
5+
date: 2026-04-01
6+
cover: /images/blog/appwrite-mongodb-partnership-self-hosted/cover.png
7+
timeToRead: 6
8+
author:
9+
- eldad-fux
10+
- jake-barnby
11+
category: announcement
12+
featured: true
13+
---
14+
15+
Today, we're announcing a partnership between Appwrite and MongoDB.
16+
17+
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.
18+
19+
# Why this partnership exists
20+
21+
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.
22+
23+
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.
24+
25+
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.
26+
27+
# How we're starting: MongoDB on self-hosted Appwrite
28+
29+
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).
30+
31+
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.
32+
33+
**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.
34+
35+
# How both communities benefit
36+
37+
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.
38+
39+
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.
40+
41+
Both communities benefit from something the open-source ecosystem rarely gets: two major platforms actively investing in making each other work better.
42+
43+
# The larger vision
44+
45+
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.
46+
47+
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.
48+
49+
Here's what's on the roadmap:
50+
51+
- **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.
52+
- **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.
53+
- **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.
54+
55+
# What comes next
56+
57+
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.
58+
59+
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.
60+
61+
Appwrite and MongoDB are building toward that future together. We'll share more as it takes shape; stay tuned for the announcements to come.

src/routes/blog/post/introducing-imagine/+page.markdoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ author:
99
- eldad-fux
1010
- ariel-weinberger
1111
category: announcement
12-
featured: true
1312
---
1413

1514
When we started Appwrite, our mission was clear: reduce the operational and infrastructural burden of building software so developers could focus on what actually matters - product, logic, and user experience. We set out to remove unnecessary complexity, give teams real control over their backend, and make production-grade infrastructure accessible without forcing developers to fight it. That principle has guided every major decision we have made.
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
layout: post
3+
title: Self-hosting Appwrite with MongoDB as the underlying database
4+
description: Learn how to self-host Appwrite with MongoDB as the database backend using the new installation wizard.
5+
date: 2026-04-01
6+
cover: /images/blog/self-hosting-appwrite-with-mongodb/cover.png
7+
timeToRead: 6
8+
author: atharva
9+
category: tutorial
10+
---
11+
12+
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.
13+
14+
In this article, you will learn how to self-host Appwrite with MongoDB from scratch using the new web-based installation wizard.
15+
16+
# Prerequisites
17+
18+
Before you begin, make sure you have the following ready:
19+
20+
- A server or local machine with at least **2 CPU cores**, **4GB of RAM**, and **2GB of swap memory**
21+
- [Docker CLI](https://www.docker.com/products/docker-desktop) installed
22+
- 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.
23+
24+
# Running the installer
25+
26+
The installer is a single Docker command that launches a web-based setup wizard. Open your terminal and run:
27+
28+
{% tabs %}
29+
{% tabsitem #unix title="macOS and Linux" %}
30+
```bash
31+
docker run -it --rm \
32+
--publish 20080:20080 \
33+
--volume /var/run/docker.sock:/var/run/docker.sock \
34+
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
35+
--entrypoint="install" \
36+
appwrite/appwrite:1.9.0
37+
```
38+
{% /tabsitem %}
39+
40+
{% tabsitem #cmd title="Windows (CMD)" %}
41+
```cmd
42+
docker run -it --rm ^
43+
--publish 20080:20080 ^
44+
--volume //var/run/docker.sock:/var/run/docker.sock ^
45+
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
46+
--entrypoint="install" ^
47+
appwrite/appwrite:1.9.0
48+
```
49+
{% /tabsitem %}
50+
51+
{% tabsitem #powershell title="Windows (PowerShell)" %}
52+
```powershell
53+
docker run -it --rm `
54+
--publish 20080:20080 `
55+
--volume /var/run/docker.sock:/var/run/docker.sock `
56+
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
57+
--entrypoint="install" `
58+
appwrite/appwrite:1.9.0
59+
```
60+
{% /tabsitem %}
61+
{% /tabs %}
62+
63+
Once the command is running, open your browser and go to `http://localhost:20080` (or your server's IP address on port 20080).
64+
65+
# Step 1: Setup your app
66+
67+
The first screen asks you to configure the basics of your Appwrite instance.
68+
69+
![Setup your app](/images/docs/advanced/self-hosting/installation/dark/wizard-setup.png)
70+
71+
- **Hostname:** Enter the domain or IP address where your Appwrite instance will be accessible. If you're just testing locally, `localhost` works fine.
72+
- **Database:** This is the important part. Select **MongoDB**. It's already selected by default, but make sure it's the one highlighted.
73+
- **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.
74+
75+
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.
76+
77+
# Step 2: Secure your app
78+
79+
Next, the wizard generates a secret API key for your instance. This key is used to encrypt sensitive data on your server.
80+
81+
![Secure your app](/images/docs/advanced/self-hosting/installation/dark/wizard-secure.png)
82+
83+
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.
84+
85+
# Step 3: Create your account
86+
87+
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.
88+
89+
![Create your account](/images/docs/advanced/self-hosting/installation/dark/wizard-account.png)
90+
91+
Make sure you use a strong password (minimum 8 characters). This is the account that will have full access to your Appwrite instance.
92+
93+
# Step 4: Review and install
94+
95+
The final step shows a summary of everything you've configured. Double-check the settings, especially the database selection showing **MongoDB**.
96+
97+
![Review your setup](/images/docs/advanced/self-hosting/installation/dark/wizard-review.png)
98+
99+
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.
100+
101+
# What happens under the hood
102+
103+
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.
104+
105+
Here are the environment variables that get configured for MongoDB:
106+
107+
| Variable | Value |
108+
|---|---|
109+
| `_APP_DB_ADAPTER` | `mongodb` |
110+
| `_APP_DB_HOST` | `mongodb` |
111+
| `_APP_DB_PORT` | `27017` |
112+
| `_APP_DB_SCHEMA` | `appwrite` |
113+
114+
You can find these in the `.env` file inside your `appwrite` directory after installation.
115+
116+
# Backing up your MongoDB data
117+
118+
Once your instance is running, you'll want to set up backups. Here's the command to create a backup of your MongoDB data:
119+
120+
```bash
121+
docker compose exec mongodb sh -c 'exec mongodump --username=root --password="$MONGO_INITDB_ROOT_PASSWORD" --authenticationDatabase=admin --archive' > ./dump.archive
122+
```
123+
124+
And to restore from a backup on a fresh installation:
125+
126+
```bash
127+
docker compose exec -T mongodb sh -c 'exec mongorestore --username=root --password="$MONGO_INITDB_ROOT_PASSWORD" --authenticationDatabase=admin --archive' < dump.archive
128+
```
129+
130+
Only restore to a fresh Appwrite installation to avoid data corruption.
131+
132+
# Accessing the Console
133+
134+
After installation completes, you'll be automatically signed in to the Appwrite Console. From here, create your first project.
135+
136+
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.
137+
138+
# Wrapping up
139+
140+
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.
141+
142+
If you have any questions, join our [Discord server](https://appwrite.io/discord) to connect with the team.
143+
144+
- [Self-hosting installation guide](/docs/advanced/self-hosting/installation)
145+
- [Database configuration](/docs/advanced/self-hosting/configuration/databases)
146+
- [Backup guide](/docs/advanced/self-hosting/production/backups)
147+
- [Production readiness](/docs/advanced/self-hosting/production)
148+
- [MongoDB integration guide](/integrations/self-hosted-mongodb)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
layout: changelog
3+
title: "MongoDB support for self-hosted Appwrite"
4+
date: 2026-04-01
5+
cover: /images/blog/appwrite-mongodb-partnership-self-hosted/cover.png
6+
---
7+
8+
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.
9+
10+
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.
11+
12+
{% arrow_link href="/blog/post/appwrite-mongodb-partnership-self-hosted" %}
13+
Read the announcement
14+
{% /arrow_link %}

src/routes/docs/advanced/self-hosting/+layout.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
{
5050
label: 'Configuration',
5151
items: [
52+
{
53+
label: 'Databases',
54+
href: '/docs/advanced/self-hosting/configuration/databases'
55+
},
5256
{
5357
label: 'Environment variables',
5458
href: '/docs/advanced/self-hosting/configuration/environment-variables'

0 commit comments

Comments
 (0)