# Document Database (MongoDB-compatible)

> A document database for flexible JSON data. Use your existing MongoDB drivers and tools.

Source: https://daster.io/docs/databases/document-database/ · Last updated: 2026-11-21

Document Database stores flexible JSON documents whose shape changes over time. Use your existing MongoDB drivers and tools: it speaks the MongoDB protocol. It is not MongoDB and not every feature matches.

> **Note:** Document Database runs on DASTER's shared server in Mumbai. Its endpoint is reachable only from apps hosted on DASTER today; connecting from your own computer or another host is not available yet.

## Create a database

1. In your project, open **Database** in the sidebar and choose the MongoDB-compatible database page.
2. Choose **New database** and confirm. The page follows it until it is ready.
3. Open **Connect** and choose **Rotate password** to get the password. It is shown once.

## Work with it

| Tab                | What you can do                                                                                                 |
| ------------------ | --------------------------------------------------------------------------------------------------------------- |
| Overview           | Storage and sessions now, contents, backups and details                                                         |
| Connect            | The endpoint and login; **Rotate password**                                                                     |
| Collections        | Browse 50 documents per page; add, edit or delete one document by `_id`; create a collection                    |
| Users & privileges | One login per database                                                                                          |
| Network access     | Up to 20 address ranges                                                                                         |
| Metrics            | A reading of the current figures                                                                                |
| Import & export    | Export the first 1,000 documents of a collection as JSON; import a JSON array of at most 500 documents and 1 MB |
| Backups            | Verified backups, **Back up now** and **Restore**                                                               |
| Settings           | **Suspend**, **Resume** and **Delete**                                                                          |

For a whole database, use backups or your own MongoDB tools.

Apps hosted on DASTER in the same project get `MONGODB_URL` with TLS, next to `DASTER_URL` and `DASTER_SERVER_KEY`. Connections go through DASTER's TLS proxy at `db.ap-south-1.daster.io`, which checks the network access list against the client's address.

> **Note:** Metrics history and alerts are not available yet.

## With the API

```http
POST /v1/projects/{projectId}/databases?organizationId={organizationId}
Content-Type: application/json
Idempotency-Key: docdb-1
```

`GET /v1/projects/{projectId}/databases` lists engines and your databases. Below `…/databases/{id}/`: `credentials` (rotate, shown once), `lifecycle` (`suspend`, `resume`, `delete`), `backups`, `objects`, `rows`, `import`, `export`, `metrics` and `network-rules`. Rotating the password, restoring and deleting need a sign-in within the last 10 minutes.
