Open Enterprise
Browse topics
DocumentationDeployment

Offline installation and recovery

The bundle carries the Open Enterprise runtime with its console assets, PostgreSQL 17, the Compose manifest, and a recovery drill. The disconnected host needs Docker with Compose and Python 3.11 or later. Build for the host's CPU architecture. Prepare TLS and the site's private reverse proxy for the runtime origin.

Package a release

On the connected release machine, build or fetch the runtime image for your release and the approved PostgreSQL 17 image. Use immutable image references from your release process. Run the following from the repository.

Shell
python3 deployments/offline/kit.py build --runtime "$RUNTIME_IMAGE" --postgres "$POSTGRES_IMAGE" \
  --release "$RELEASE_VERSION" --output /tmp/oe-offline

Transfer the directory to the site. Deliver the printed manifest SHA-256 through your trusted release channel. The manifest records the release, architecture, local content-addressed image IDs and checksum of every artifact.

On the disconnected host, verify the manifest with an independently supplied digest, then verify the installer with the digest from that manifest before executing it. The following uses only the host's Python standard library.

Shell
python3 - "$MANIFEST_SHA256" <<'VERIFY'
import hashlib, hmac, json, pathlib, sys
manifest = pathlib.Path("manifest.json").read_bytes()
if not hmac.compare_digest(hashlib.sha256(manifest).hexdigest(), sys.argv[1].lower()):
    sys.exit("Manifest checksum mismatch")
expected = json.loads(manifest)["sha256"]["kit.py"]
if not hmac.compare_digest(hashlib.sha256(pathlib.Path("kit.py").read_bytes()).hexdigest(), expected):
    sys.exit("Installer checksum mismatch")
VERIFY

Initialize the disconnected site

From the transferred directory, run the following commands. Substitute the site's actual HTTPS origins. Attach the site's reverse proxy to the site's internal Compose network and forward to runtime:8080. Engines that publish internal-network ports on loopback can also use the configured site port. The application starts its own login flow and receives the callback at /auth/callback.

Shell
python3 kit.py verify --manifest-sha256 "$MANIFEST_SHA256"
python3 kit.py init --manifest-sha256 "$MANIFEST_SHA256" --site ./customer-site \
  --origin https://enterprise.site.example --application-origin https://app.site.example
cd customer-site
docker compose up -d --wait --pull never
docker compose exec runtime enterprise-runtime enroll /app/config.yaml \
  --email owner@site.example --organization site --organization-name "Customer site" --initial-owner

Give the one-time link to the verified owner. The installation generates separate bootstrap, migration and runtime database passwords, encryption keys and an application credential locally. PostgreSQL creates the roles on a fresh volume. Compose runs the migrations and grants the runtime access to application data before it starts serving. The runtime can read migration history. Only the migrator owns application tables. Keep the application key on the backend. Store a protected backup of the site directory, including .env, alongside the database backup. Restoring encrypted data requires the original keys. The Compose network is internal, and both images use the verified local image IDs.

For a backup, run docker compose exec -T postgres pg_dump -Fc -U oe_migrator enterprise > site.dump. Restore to a fresh site volume with the saved site configuration. Keep ingress closed. Start PostgreSQL by itself with docker compose up -d --wait postgres. Restore the objects under the migration role with docker compose exec -T postgres pg_restore --exit-on-error --no-owner --no-acl -U oe_migrator -d enterprise < site.dump.

If the backup could predate a revocation or a consumed login, rotate deployment credentials and apply any pending migrations with docker compose run --rm migrate. With every serving replica stopped, run docker compose run --rm migrate invalidate-restored-state /app/config.yaml --traffic-stopped and reconcile access before reopening ingress. The bundle includes the older-snapshot recovery procedure in backup.md, with the steps for account reapproval and key rotation.

Run docker compose up -d --wait runtime to apply pending migrations, restore runtime grants and start the runtime behind closed ingress. Once the site's access checks pass, reopen ingress. A site operator can issue a one-time recovery link with enterprise-runtime account /app/config.yaml recover --user USER_ID --reset-factors inside the runtime container.

Exercise the bundle

Use a free local port. The exercise creates two temporary internal networks and new databases, enrolls an owner, dumps the database, restores it into the second installation, resets the password, and checks the original ownership. It removes only its own drill volumes.

Shell
python3 kit.py init --manifest-sha256 "$MANIFEST_SHA256" --site ./drill \
  --origin http://127.0.0.1:18888 --application-origin http://127.0.0.1:18889 --port 18888 --loopback-drill
python3 exercise.py ./drill

Search documentation