Linux Packages
An air-gapped host has no route to PGDG either, and DocumentDB pulls PostgreSQL, pg_cron, pgvector and PostGIS from there — the release assets alone are not enough. Stage the full dependency closure on a connected machine with the same distribution, release and architecture as the target.
For a connected host, use the Linux Packages Quick Start instead.
Configure the repositories exactly as for an online install: run the whole Install block for your distribution except the final sudo apt install -y documentdb-18 / sudo dnf install -y documentdb-18 line — delete that line and the && \ that precedes it. On RHEL the DocumentDB repository is written by the tee /etc/yum.repos.d/documentdb.repo line near the end, so stopping earlier leaves dnf download with nothing to find. Then:
# Debian / Ubuntu
sudo apt-get install -y dpkg-dev
mapfile -t PKGS < <(apt-cache depends --recurse --no-recommends --no-suggests \
--no-conflicts --no-breaks --no-replaces --no-enhances documentdb-18 \
| grep '^[a-zA-Z0-9]' | sort -u)
mkdir -p bundle && cd bundle
apt-get download "${PKGS[@]}"
dpkg-scanpackages . /dev/null > Packages && gzip -k Packages# RHEL-compatible
sudo dnf install -y dnf-plugins-core createrepo_c
mkdir -p bundle
sudo dnf download --resolve --alldeps --destdir bundle documentdb-18
createrepo_c bundleUse the full-closure flags, not --download-only. apt-get install --download-only and a bare dnf download --resolve skip whatever is already installed on the staging machine; the bundle looks complete and the target dies with Depends: adduser but it is not installable.
Expect ~200 packages / 200 MB (DEB) or ~270 / 170 MB (RPM), mostly PostGIS and GDAL. That is more than an online install downloads, because the closure includes packages already present on the staging machine. The unsandboxed as root and dpkg-scanpackages ... override file warnings are harmless.
Copy bundle/ across — including the Packages/Packages.gz or repodata/ index inside it, which is what makes the next step resolve — and point the package manager at it:
# Debian / Ubuntu
echo "deb [trusted=yes] file:///path/to/bundle ./" \
| sudo tee /etc/apt/sources.list.d/documentdb-offline.list
sudo apt-get update
sudo apt install -y documentdb-18# RHEL-compatible
printf '%s\n' '[documentdb-offline]' 'name=DocumentDB offline bundle' \
'baseurl=file:///path/to/bundle' 'enabled=1' 'gpgcheck=0' \
| sudo tee /etc/yum.repos.d/documentdb-offline.repo
sudo dnf install -y --disablerepo='*' --enablerepo=documentdb-offline documentdb-18The --disablerepo/--enablerepo pair is not optional. DNF aborts the whole transaction if any enabled repository is unreachable, and every RHEL-compatible image ships baseos, appstream and extras enabled — so without it the install fails with Error: Failed to download metadata for repo 'baseos' even though your bundle is perfectly good. APT differs here: it only warns about unreachable sources and continues.
[trusted=yes] / gpgcheck=0 accept the unsigned local directory. Upstream signatures were verified at staging time; sha256sum the transfer if it crosses an untrusted boundary.
Then continue with Set up and connect — documentdb-setup needs no network.
mongosh is not part of the bundle and the target cannot reach the MongoDB repository, so stage it in the same pass if you want to verify from the air-gapped host — add mongodb-mongosh to the package list after configuring the MongoDB repository shown in the quick start. Otherwise verify with sudo documentdb-setup --status and connect from a machine that does have mongosh.
If the target already has PostgreSQL, the PGDG extension dependencies (postgresql-N-cron, -pgvector, -postgis-3) and jq, you do not need a bundle:
sudo apt install ./ubuntu24.04-postgresql-18-documentdb_0.116-0_amd64.deb. No gateway and no documentdb-setup.apt install / dnf install. Local files resolve dependencies only against enabled repositories, so the meta package on its own fails with Depends: documentdb-18 ... but it is not installable.