# FerretDB

:::info
- If you setup Komodo using **Postgres** or **Sqlite** options prior to [**Komodo v1.18.0**](https://github.com/moghtech/komodo/releases/tag/v1.18.0), you are using **FerretDB v1**.
- Komodo now uses **FerretDB v2**. For existing users, [**upgrading requires a migration**](https://github.com/moghtech/komodo/blob/main/bin/util/docs/copy-database.md#ferretdb-v2-update-guide).
:::

[**FerretDB**](https://www.ferretdb.com) is a MongoDB-compatible database backed by [Postgres + DocumentDB extension](https://github.com/microsoft/documentdb).
It is a solid option with performance comparable to MongoDB, and can also be run on some systems which [do not support MongoDB](https://github.com/moghtech/komodo/issues/59).

1. Copy `komodo/ferretdb.compose.yaml` and `komodo/compose.env` to your host:
```bash
wget -P komodo https://raw.githubusercontent.com/moghtech/komodo/main/compose/ferretdb.compose.yaml && \
  wget -P komodo https://raw.githubusercontent.com/moghtech/komodo/main/compose/compose.env
```
2. Edit the variables in `komodo/compose.env`.
3. Deploy:

```bash
docker compose -p komodo -f komodo/ferretdb.compose.yaml --env-file komodo/compose.env up -d
```

```mdx-code-block
import ComposeAndEnv from "@site/src/components/ComposeAndEnv";

<ComposeAndEnv file_name="ferretdb.compose.yaml" />
```