NewDocumentDB 1.0 is here. See what's new

Install DocumentDB

Start a local database and run your first query in a few minutes.

Complete static guides: Docker quickstart · Linux packages quickstart.

Install without the selector

These are standalone quickstarts, not commands customized from this URL. Choose the guide matching your environment. The interactive selector loads separately.

Docker: local evaluation and development

Requires Docker and an available port 10260. Replace both credential placeholders before running.

Start local Docker container

docker run -dt --pull always --name documentdb \
  -p 127.0.0.1:10260:10260 \
  -e USERNAME='<YOUR_USERNAME>' \
  -e PASSWORD='<YOUR_PASSWORD>' \
  ghcr.io/documentdb/documentdb/documentdb-local:latest

The image sends usage telemetry by default. Add -e DOCUMENTDB_USAGE_TELEMETRY=false before the image name to turn it off. What is sent · Privacy statement

Wait for === DocumentDB is ready === in docker logs documentdb, then follow the Docker quickstart to connect and verify.

Linux packages: a new PostgreSQL 18 instance

Requires a supported Linux host, sudo and internet access. These commands use the moving latest channel and detect host architecture. For an existing installation, upgrade in place instead.

Ubuntu 24.04 (AMD64 or ARM64)
Ubuntu 24.04 install

sudo apt update && \
sudo apt install -y curl ca-certificates gnupg && \
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor --yes -o /usr/share/keyrings/postgresql.gpg && \
echo "deb [signed-by=/usr/share/keyrings/postgresql.gpg] https://apt.postgresql.org/pub/repos/apt noble-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list >/dev/null && \
curl -fsSL https://documentdb.io/documentdb-archive-keyring.gpg | sudo gpg --dearmor --yes -o /usr/share/keyrings/documentdb-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/documentdb-archive-keyring.gpg] https://documentdb.io/deb latest ubuntu24" | sudo tee /etc/apt/sources.list.d/documentdb.list >/dev/null && \
sudo apt update && \
sudo apt install -y documentdb-18
Registered RHEL 9 (AMD64 or ARM64)
RHEL 9 install

sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(uname -m)-rpms && \
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-$(uname -m)/pgdg-redhat-repo-latest.noarch.rpm && \
sudo dnf -qy module disable postgresql && \
sudo rpm --import https://documentdb.io/documentdb-archive-keyring.gpg && \
printf '%s\n' \
  '[documentdb]' \
  'name=DocumentDB Repository' \
  'baseurl=https://documentdb.io/rpm/latest/rhel9' \
  'enabled=1' \
  'gpgcheck=1' \
  'gpgkey=https://documentdb.io/documentdb-archive-keyring.gpg' | sudo tee /etc/yum.repos.d/documentdb.repo >/dev/null && \
sudo dnf install -y documentdb-18
Rocky Linux 9 (AMD64 or ARM64)
Rocky Linux 9 install

if (. /etc/os-release && [ "$ID" = centos ]) && [ -f /etc/yum.repos.d/pgdg-redhat-all.repo ]; then sudo sed -i 's/rhel-\$releasever_major\.\$releasever_minor-/rhel-$releasever_major-/g' /etc/yum.repos.d/pgdg-redhat-all.repo; fi && \
sudo dnf install -y dnf-plugins-core && \
sudo dnf config-manager --set-enabled crb && \
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-$(uname -m)/pgdg-redhat-repo-latest.noarch.rpm && \
if (. /etc/os-release && [ "$ID" = centos ]) && [ -f /etc/yum.repos.d/pgdg-redhat-all.repo ]; then sudo sed -i 's/rhel-\$releasever_major\.\$releasever_minor-/rhel-$releasever_major-/g' /etc/yum.repos.d/pgdg-redhat-all.repo; fi && \
sudo dnf -qy module disable postgresql && \
sudo rpm --import https://documentdb.io/documentdb-archive-keyring.gpg && \
printf '%s\n' \
  '[documentdb]' \
  'name=DocumentDB Repository' \
  'baseurl=https://documentdb.io/rpm/latest/rhel9' \
  'enabled=1' \
  'gpgcheck=1' \
  'gpgkey=https://documentdb.io/documentdb-archive-keyring.gpg' | sudo tee /etc/yum.repos.d/documentdb.repo >/dev/null && \
sudo dnf install -y documentdb-18

Firewall port 10260 before setup: the gateway listens on all interfaces. Setup asks for an admin password and starts a private PostgreSQL instance.

Set up PostgreSQL 18

sudo documentdb-setup --pg-version 18 --use-new-postgres-instance --admin-user admin

Check sudo documentdb-setup --status, then follow the Linux packages quickstart for connection, first-query verification, troubleshooting and cleanup.

Downloads, versions, and troubleshooting

GitHub release assets have individual DEB/RPM files and checksums. Install the matching package set together:

documentdb-N
The complete stack for PostgreSQL major N. Owns that instance's service lifecycle.
postgresql-N-documentdb
PostgreSQL extension files. RPM uses postgresqlN-documentdb.
documentdb-gateway
The wire-protocol gateway your apps and tools connect to.
documentdb-postgresql-tools
Tools for configuration, gateway registration, and user administration.
documentdb-common
The shared setup wizard, service templates, helpers, and optional sample data.

To pin a version, list what is available first. APT and RPM use different version syntax, and individual subpackages can carry different version strings. Use the version reported for documentdb-18.

Other OS and PostgreSQL combinations are build-on-demand; see the packaging guide. Ubuntu 22.04, Debian, EL8, and PostgreSQL 16 were retired in v0.116.

Stuck? Docker quickstart · Linux quickstart · Linux operations and troubleshooting