Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions documentdb-local/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Learn how to install and run DocumentDB Local using Docker for loca

DocumentDB Local provides a lightweight, containerized environment for developing and testing applications locally, including prototyping and integration testing.

The examples below use the PostgreSQL 17 image from release **1.0.0**. Images for PostgreSQL 15 to 18 are tagged `pg15-1.0.0` to `pg18-1.0.0`, for Linux amd64 and arm64; `latest` points to `pg17-1.0.0`. Use a versioned tag when you need a reproducible setup. The [1.0 release notes](../getting-started/release-notes-1.0.md) list what changed and the known issues.
The examples below use the PostgreSQL 17 image from release **1.0.1**, a [security update](../getting-started/release-notes-1.0.md#101-security-update) of 1.0. Images for PostgreSQL 15 to 18 are tagged `pg15-1.0.1` to `pg18-1.0.1`, for Linux amd64 and arm64; `latest` points to `pg17-1.0.1`. Use a versioned tag when you need a reproducible setup. The `1.0.0` tags are still published, but those images contain a vulnerable `libbrotli1`. The [1.0 release notes](../getting-started/release-notes-1.0.md) list what changed and the known issues.

> **Usage telemetry is on by default.** The 1.0 image reports its version, platform and CPU architecture to Scarf at startup and hourly. Turn it off with `-e DOCUMENTDB_USAGE_TELEMETRY=false`. See [Usage telemetry](#usage-telemetry).

Expand All @@ -20,7 +20,7 @@ The examples below use the PostgreSQL 17 image from release **1.0.0**. Images fo
Get the Docker container image using `docker pull`.

```bash
docker pull ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.0
docker pull ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.1
```

## Running
Expand All @@ -39,14 +39,14 @@ Then start the container with `docker run`, and use `docker ps` to check that it
docker run -dt -p 127.0.0.1:10260:10260 --name docdb \
-e USERNAME="${DOCUMENTDB_USERNAME:?Set DOCUMENTDB_USERNAME first}" \
-e PASSWORD="${DOCUMENTDB_PASSWORD:?Set DOCUMENTDB_PASSWORD first}" \
ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.0
ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.1

docker ps
```

```output
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5aff734a3591 ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.0 "/bin/bash -c '/home…" 5 seconds ago Up 4 seconds (health: starting) 127.0.0.1:10260->10260/tcp docdb
5aff734a3591 ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.1 "/bin/bash -c '/home…" 5 seconds ago Up 4 seconds (health: starting) 127.0.0.1:10260->10260/tcp docdb
```

> The exported variables are reused by the client examples below; if you open a new shell, set them again. The guards stop an empty value from falling through to the image's public default credentials, which the container still accepts but warns about loudly. The credentials are passed as environment variables because `--username` and `--password` arguments stay visible in the container's process list.
Expand Down Expand Up @@ -133,7 +133,7 @@ docker run -dt \
--name docdb \
-e USERNAME="${DOCUMENTDB_USERNAME:?Set DOCUMENTDB_USERNAME first}" \
-e PASSWORD="${DOCUMENTDB_PASSWORD:?Set DOCUMENTDB_PASSWORD first}" \
ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.0 \
ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.1 \
--init-data true
```

Expand All @@ -155,7 +155,7 @@ or `--disable-usage-telemetry` (or `--usage-telemetry false`) after it. `NO_ANAL

In CI, turn it off explicitly with `-e DOCUMENTDB_USAGE_TELEMETRY=false`. The image skips telemetry only when `CI`, `GITHUB_ACTIONS` or `TF_BUILD` is set to a non-empty value in the container's own environment, and `docker run` doesn't pass the runner's variables through: a container started on a CI runner still reports unless you forward one, for example `-e GITHUB_ACTIONS`. `--enable-telemetry` is a separate setting for the gateway's own metrics and doesn't affect this.

The [privacy statement](https://github.com/documentdb/documentdb/blob/v1.0-0/documentdb-local/PRIVACY.md) has the details. The image also includes it at `/home/documentdb/PRIVACY.md`.
The [privacy statement](https://github.com/documentdb/documentdb/blob/v1.0-1/documentdb-local/PRIVACY.md) has the details. The image also includes it at `/home/documentdb/PRIVACY.md`.

## Built-in sample data

Expand All @@ -173,7 +173,7 @@ db.getSiblingDB("StoreData").stores.countDocuments({}) // 41505
db.getSiblingDB("StoreData").ratings.countDocuments({}) // 2
```

Seeding is one-shot per data volume; use a new, empty volume to seed again. A direct loader rerun tolerates duplicate keys rather than duplicating documents. See the [versioned sample-data guide](https://github.com/documentdb/documentdb/tree/v1.0-0/documentdb-local/sample-data) for manual loader instructions.
Seeding is one-shot per data volume; use a new, empty volume to seed again. A direct loader rerun tolerates duplicate keys rather than duplicating documents. See the [versioned sample-data guide](https://github.com/documentdb/documentdb/tree/v1.0-1/documentdb-local/sample-data) for manual loader instructions.

## Container lifecycle

Expand All @@ -185,6 +185,8 @@ Seeding is one-shot per data volume; use a new, empty volume to seed again. A di

A newer image on an existing data volume doesn't update the DocumentDB extensions in it ([#773](https://github.com/documentdb/documentdb/issues/773)), so the volume keeps the old schema under the new binaries. Upgrading a volume in place is not supported in 1.0. To move data from a 0.117 container to 1.0, export it with `mongodump`, start a 1.0 container on a new volume, and load it with `mongorestore`. The PostgreSQL major version of the image must also match the one that initialized the volume.

The exception is 1.0.0 to 1.0.1: the schema is the same, so a 1.0.0 volume works under the 1.0.1 image for the same PostgreSQL version. Stop the 1.0.0 container, then start the 1.0.1 image on the volume. `hello` then reports `[ '1.0-0', '1.0.1' ]`: the extension version recorded in the volume, then the loaded library.

If you do start a 1.0 image on a volume an older container used, the 1.0 image refuses to start while the old container's `postmaster.pid` is still there; see [Container lifecycle](#container-lifecycle) for the override and removing it afterward. For 0.116 and 0.117, stop the old container with `docker stop` first, which removes the file; after `docker kill`, `docker rm -f` or a crash it stays. Images 0.114 and earlier don't normally stop PostgreSQL cleanly, so their volumes usually keep the file.

## Feature support
Expand Down Expand Up @@ -222,7 +224,7 @@ docker run -dt \
--name docdb \
-e USERNAME="${DOCUMENTDB_USERNAME:?Set DOCUMENTDB_USERNAME first}" \
-e PASSWORD="${DOCUMENTDB_PASSWORD:?Set DOCUMENTDB_PASSWORD first}" \
ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.0
ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.1
```

Point it inside the data directory rather than at a volume of its own: a separate volume is created root-owned, and the gateway - which runs as an unprivileged user - cannot write its key there. The trade-off is that the key is included in any backup of the data volume. If the entrypoint ever has to repair the data directory's ownership (it does when the owner doesn't match, or with `DOCUMENTDB_FORCE_OWNERSHIP_REPAIR=true`), it runs `chmod -R 750` over the directory, which leaves the private key group-readable rather than owner-only.
Expand Down
44 changes: 22 additions & 22 deletions getting-started/prebuilt-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Get first-party packages from [documentdb.io](https://documentdb.io/packages), e

## First-party packages

The current release is [`v1.0-0`](https://github.com/documentdb/documentdb/releases/tag/v1.0-0), published on **2026-10-19**. See the [1.0 release notes](release-notes-1.0.md) for what changed and the known issues. First-party CI builds and tests the full stack for:
The current release is [`v1.0-1`](https://github.com/documentdb/documentdb/releases/tag/v1.0-1), published on **2026-11-10**, a [security update](release-notes-1.0.md#101-security-update) of 1.0. See the [1.0 release notes](release-notes-1.0.md) for what changed and the known issues. First-party CI builds and tests the full stack for:

| Distribution | PostgreSQL | Architectures |
| --- | --- | --- |
Expand Down Expand Up @@ -231,23 +231,23 @@ No package for your target? The supplied scripts build DEB or RPM packages with
Use a Linux build environment with Git, Docker, Bash 4+, and GNU utilities, on the target architecture. For example, build the extension for Debian 12 and PostgreSQL 18:

```bash
git clone --depth 1 --branch v1.0-0 https://github.com/documentdb/documentdb.git
git clone --depth 1 --branch v1.0-1 https://github.com/documentdb/documentdb.git
cd documentdb
./packaging/build_packages.sh --os deb12 --pg 18 --version 1.0.0 --output-dir packages
./packaging/build_packages.sh --os deb12 --pg 18 --version 1.0.1 --output-dir packages
```

Pass `--version 1.0.0` explicitly. The `v1.0-0` tag shares its commit with `v1.0-RC2`, and without `--version` the build takes its version from the tag `git describe` picks, which can be the release candidate.
Pass `--version 1.0.1` explicitly, so the package version doesn't depend on which tags your clone has.

For the full stand-alone DEB set, make `dpkg-deb` available on the build host, then build the gateway and shared packages:

```bash
./packaging/gateway/build_gateway_packages.sh --os deb12 --pg 18 \
--version 1.0.0 --output-dir packages
--version 1.0.1 --output-dir packages
./packaging/build_extra_packages.sh --type deb --pg 18 \
--version 1.0.0 --output-dir packages
--version 1.0.1 --output-dir packages
```

Outputs go into `packages/`. RPM extras instead require host `rpmbuild` and applicable RPM macros. The [versioned packaging guide](https://github.com/documentdb/documentdb/blob/v1.0-0/packaging/README.md) lists targets, prerequisites, and clean-install checks.
Outputs go into `packages/`. RPM extras instead require host `rpmbuild` and applicable RPM macros. The [versioned packaging guide](https://github.com/documentdb/documentdb/blob/v1.0-1/packaging/README.md) lists targets, prerequisites, and clean-install checks.

Validate builds for targets outside the first-party CI matrix in your environment. PostgreSQL 15 is extension-only; package-managed gateway setup requires PostgreSQL 16 or newer.

Expand All @@ -256,7 +256,7 @@ Validate builds for targets outside the first-party CI matrix in your environmen
Use release assets when you need an exact first-party version rather than a repository install. Each release publishes its Linux packages with `SHA256SUMS` and `manifest.txt`.

```bash
gh release download v1.0-0 -R documentdb/documentdb -D pkgs && cd pkgs && sha256sum -c SHA256SUMS
gh release download v1.0-1 -R documentdb/documentdb -D pkgs && cd pkgs && sha256sum -c SHA256SUMS
```

This downloads all formats, architectures, and PostgreSQL major versions. Install only the matching subset below, not every downloaded file.
Expand All @@ -272,38 +272,38 @@ These examples install `documentdb-18` and its dependencies; the optional `docum
For arm64, replace `amd64` with `arm64`. Only the gateway and extension files are architecture-specific.

```bash
sudo apt install ./ubuntu24.04-documentdb-18_1.0.0_all.deb \
./ubuntu24.04-documentdb-common_1.0.0_all.deb \
./ubuntu24.04-documentdb-postgresql-tools_1.0.0_all.deb \
./ubuntu24.04-documentdb-gateway_1.0.0_amd64.deb \
./ubuntu24.04-postgresql-18-documentdb_1.0-0_amd64.deb
sudo apt install ./ubuntu24.04-documentdb-18_1.0.1_all.deb \
./ubuntu24.04-documentdb-common_1.0.1_all.deb \
./ubuntu24.04-documentdb-postgresql-tools_1.0.1_all.deb \
./ubuntu24.04-documentdb-gateway_1.0.1_amd64.deb \
./ubuntu24.04-postgresql-18-documentdb_1.0-1_amd64.deb
```

### RPM (RHEL-compatible 9, PostgreSQL 18, x86_64)

For arm64, replace `x86_64` with `aarch64`; leave `noarch` files unchanged.

```bash
sudo dnf install ./documentdb-18-1.0.0-1.noarch.rpm \
./documentdb-common-1.0.0-1.noarch.rpm \
./documentdb-postgresql-tools-1.0.0-1.noarch.rpm \
./documentdb-gateway-1.0.0-1.el9.x86_64.rpm \
./rhel9-postgresql18-documentdb-1.0.0-1.el9.x86_64.rpm
sudo dnf install ./documentdb-18-1.0.1-1.noarch.rpm \
./documentdb-common-1.0.1-1.noarch.rpm \
./documentdb-postgresql-tools-1.0.1-1.noarch.rpm \
./documentdb-gateway-1.0.1-1.el9.x86_64.rpm \
./rhel9-postgresql18-documentdb-1.0.1-1.el9.x86_64.rpm
```

For PostgreSQL 17, replace the two PostgreSQL-specific files with their `17` equivalents; the shared packages stay the same. The `documentdb` meta package always selects PG18.

For extension-only use, install the extension and tools files, then [configure PostgreSQL](#extension-only-installation). For a full stack, [run the wizard](#2-run-the-setup-wizard) with the installed major: use `--pg-version 17` for PG17.

Filename prefixes such as `ubuntu24.04-` and `rhel9-` identify release assets, not package names. DEB extensions use version `1.0-0`, while other packages use `1.0.0`; RPMs use `1.0.0` with release `1` or `1.el9`.
Filename prefixes such as `ubuntu24.04-` and `rhel9-` identify release assets, not package names. DEB extensions use version `1.0-1`, while other packages use `1.0.1`; RPMs use `1.0.1` with release `1` or `1.el9`.

### Offline / air-gapped

Release assets do not include the full dependency set. Stage PostgreSQL, its required extensions, and all other dependencies on a connected machine of the **same distro, release, and architecture**. Include dependencies already installed on the staging machine. Follow [Offline / air-gapped install](https://documentdb.io/docs/linux-packages/offline/) to serve the bundle as a local repository.

## Upgrading to 1.0

A 0.116 or 0.117 package installation can be upgraded in place; move the whole stack together. Upgrading the packages replaces the libraries and installs the upgrade scripts, but doesn't change the databases: each PostgreSQL instance keeps reporting the old extension version until its extensions are updated. Back up first; there is no downgrade.
A 0.116, 0.117 or 1.0.0 package installation can be upgraded in place; move the whole stack together. Upgrading the packages replaces the libraries and installs the upgrade scripts, but doesn't change the databases: each PostgreSQL instance keeps reporting the old extension version until its extensions are updated. Back up first; there is no downgrade.

Upgrading a host that ever ran a release candidate isn't supported, and the installer refuses it. Install 1.0 on a fresh host and move the data with `mongodump` and `mongorestore`. Removing packages keeps the PostgreSQL data; don't reset or reuse an adopted instance as an upgrade workaround.

Expand Down Expand Up @@ -371,11 +371,11 @@ Connect with `mongosh` and run:
db.hello().internal.documentdb_versions
```

It should print `[ '1.0-0', '1.0.0' ]`: the installed extension version, then the loaded library version. If the first value is still `0.116-0` or `0.117-0`, the extensions weren't updated. See [`hello`](https://documentdb.io/docs/reference/commands/diagnostic/hello/).
It prints the installed extension version, then the loaded library version: `[ '1.0-1', '1.0.1' ]` for 1.0.1. If the first value is from an older release than the second, such as `1.0-0` with `1.0.1`, the extensions weren't updated. See [`hello`](https://documentdb.io/docs/reference/commands/diagnostic/hello/).

### Containers

A newer DocumentDB Local image on an existing data volume does not update the extensions ([#773](https://github.com/documentdb/documentdb/issues/773)). Start 1.0 on a new volume and move the data with `mongodump` and `mongorestore`. See [Upgrading the image](../documentdb-local/index.md#upgrading-the-image).
A newer DocumentDB Local image on an existing data volume does not update the extensions ([#773](https://github.com/documentdb/documentdb/issues/773)). Start 1.0 on a new volume and move the data with `mongodump` and `mongorestore`. A 1.0.0 volume is the exception: it works under the 1.0.1 image as it is. See [Upgrading the image](../documentdb-local/index.md#upgrading-the-image).

## Retired targets

Expand Down
Loading