Install and Upgrade GoodMem
Install GoodMem with the installer script, upgrade an existing installation, or install and upgrade using registry mirrors and offline packages.
Install GoodMem
The installer script installs the GoodMem server, the Console, the CLI, and a PostgreSQL database. It runs them as Docker containers. Run it in a terminal:
curl -s https://get.goodmem.ai | bashThe installer asks a small number of questions, such as the database password. It hides the password while you type it. Do not type the password into a command, because the shell saves commands in its history.
For an unattended installation, such as a CI job, keep the password in the secret store of your CI system. Give it to the job as an environment variable, then pass the variable to the installer:
# GOODMEM_DB_PASSWORD comes from the CI secret store. Do not set it in this script.
curl -s https://get.goodmem.ai | bash -s -- --handsfree --db-password "$GOODMEM_DB_PASSWORD"The installer output contains the root API key. The key gives full access to the server. If a CI system or a log file captures the output, protect that log as you protect a password.
See goodmem system install for all flags.
Supported platforms
| Platform | Docker |
|---|---|
| Linux | If Docker is not installed, the installer installs it from get.docker.com. This step needs sudo. |
| macOS | The installer uses Docker Desktop. If Docker Desktop is not installed, the installer installs it with Homebrew. |
| Windows | Run the installer inside WSL 2. Before you install, set up Docker Desktop. See Windows (WSL 2). |
To run Docker without root access on Linux or WSL 2, see Rootless Docker.
When the installer completes
The installer prints the Console URL, the CLI profile, and a GoodMem API key:
✓ Installation completed successfully!
ℹ GoodMem is ready to use.
ℹ Web console: https://localhost:8080/console
ℹ Active profile: default
ℹ Server URL: https://localhost:9090
ℹ API Key: gm_xxxxxxxxxxxxxxxxxxxxxxxx
ℹ Install type: local-docker- Web console is the Console URL. Open it in a browser and enter the API key.
- Server URL is the gRPC address that the CLI uses.
- API Key is the root API key. The installer shows it one time. The installer also saves it in the active CLI profile, so CLI commands work immediately.
The default installation uses a self-signed TLS certificate. Browsers and clients cannot verify it. To create a certificate that your computer trusts, see Use mkcert for local TLS.
Then follow Getting Started to set up models, add a document, and run a search.
Rootless Docker
Rootless Docker runs as your user account, not as root. It is available on Linux and WSL 2. On WSL 2, first turn on systemd.
Do not add --runtime rootless-docker to the curl … | bash command. When sudo is available,
that script runs goodmem system install as root, and the installer refuses rootless Docker
for root. Do these two steps instead:
-
Install only the CLI:
curl -s https://get.goodmem.ai | bash -s -- --cli-onlyIf your shell cannot find
goodmemafter this step, follow thePATHinstructions that the script prints. -
As your normal user, without
sudo, run the installer with the rootless runtime:goodmem system install --runtime=rootless-dockerThe installer uses
sudoonly for the one-time setup steps that need it, such as system packages.
Windows (WSL 2)
On Windows, you run the GoodMem installer inside a WSL 2 Linux distribution. By default, the installer uses Docker Desktop for Windows to run the GoodMem containers.
Prepare Docker Desktop
-
Install WSL 2 with an Ubuntu distribution.
-
Install Docker Desktop for Windows, then start it. Wait until Docker Desktop shows that the engine is running.
-
In Docker Desktop, open Settings → Resources → WSL integration.
-
Turn on Enable integration with my default WSL distro.
-
Turn on the switch for the distribution that you use for GoodMem.
-
Select Apply & restart.
-
Open a terminal in that distribution and make sure that Docker responds:
docker infoIf the
dockercommand is not installed in the distribution yet, make sure that this file exists instead:ls -l /var/run/docker.sock
Run the installer
Run the installer from the terminal of the WSL distribution, not from PowerShell:
curl -s https://get.goodmem.ai | bashIf an Ubuntu distribution does not have the Docker CLI, the installer installs the Docker CLI and
the Docker Compose plugin from Docker's Ubuntu package repository. This step needs sudo.
On another distribution, such as Debian, the installer cannot install them. Before you run the installer, make sure that both of these commands work:
docker info
docker compose versionIf a command fails, install the Docker CLI or the Docker Compose plugin for that distribution yourself.
If the installer cannot find Docker Desktop
The installer stops with this message when Docker Desktop is not running or WSL integration is off for your distribution:
Docker Desktop for Windows does not appear to be running or WSL integration is disabledTo correct the problem:
- Start Docker Desktop.
- Do the steps in Prepare Docker Desktop again. Make sure that the switch for your distribution is on.
- Close the WSL terminal and open it again.
- Run the installer again.
Install without Docker Desktop
To run Docker inside the distribution instead of Docker Desktop, use rootless Docker. Rootless Docker on WSL needs systemd. Turn on systemd first:
-
Add these lines to
/etc/wsl.confin the distribution:[boot] systemd=true -
From Windows PowerShell, stop WSL:
wsl --shutdown -
Open the distribution again.
-
Do the two steps in Rootless Docker.
Connect an application after installation
Use the installation's API key and REST base URL with a client SDK. GoodMem has SDKs for Python, TypeScript, Java, Go, .NET, and Rust. Building a Basic RAG Agent shows each language: it registers models, adds documents, and generates answers.
SDKs use the REST endpoint (normally http://localhost:8080 for an installation with TLS
disabled), without a /v1 suffix. The CLI uses the separately configured gRPC endpoint.
Upgrading an installation
Update the CLI first, then upgrade each installed server profile:
goodmem upgrade
goodmem system upgrade --profile-name <profile-name>The first command updates the CLI; the second updates the selected server installation and checks that it is ready. Your credentials, ports, and database data are preserved. Plan for a server restart.
If you pinned the server to a specific image tag or digest, add --image <new-server-image> to
select the new version. Otherwise, the upgrade uses the image reference already configured. For
restricted networks, use the mirror-based or
offline instructions below.
Document storage
For standard installer-managed deployments, the upgrade adds disk-backed temporary storage for document processing. Database migrations run automatically when the server starts. You do not need to convert or re-ingest existing documents. Keep enough free space in Docker's storage for the documents you process, including concurrent uploads.
If you have customized the Compose file or temporary directory, the CLI preserves those choices and warns when it needs you to review them. See document-ingestion scratch storage for the mount configuration and storage requirements. Updating only the server image does not update an older Compose file.
Executable extensions
For hosted or shared deployments that do not need custom Java processors, set
GOODMEM_DISABLE_EXECUTABLE_EXTENSIONS=true in the installation's .env file. Upgrades
preserve the default of allowing extensions unless you configure this restriction. It blocks
uploads and custom execution, including for administrators, while retaining built-in chat
processing and authorized inspection and deletion of existing extensions.
Follow Disable executable extensions
to apply the setting and restart the profile. The option belongs to the
Java server; it is not a flag for goodmem system install.
New local installs use the GoodMem PostgreSQL 18 image and mount the host
pgdata directory at /var/lib/postgresql. Existing local profiles keep their
database image and volume layout on goodmem system upgrade. To move PG17
data to PG18, use pg_upgrade or dump and restore into a fresh PG18 profile.
Earlier database migrations
If you are upgrading from before the V1_17 authorization migration, users must replace any API keys created for them by an administrator with keys they create themselves before upgrading.
Installing in a network-restricted environment
The default installer fetches from these upstream hosts:
get.goodmem.ai— the GoodMem CLI tarballget.docker.com— the Docker engine installer (only when Docker is not yet installed)ghcr.io— the GoodMem server and PostgreSQL imagessigstore.dev— signature material for cosign verification
When any of these is unreachable — typically inside a corporate firewall or in mainland China — the installer accepts a small set of flags that let you complete an install using a pre-staged CLI tarball plus a reachable registry mirror.
The examples use ghcr.nju.edu.cn for both images. Choose a registry you trust and can reach.
That mirror-based flow is described first. If the target machine has no reachable registry at all — a true air-gap — see Fully offline install (air-gapped) below, which pre-stages the container images as well as the CLI tarball.
Prerequisites
-
Docker engine is already installed and reachable. The installer's auto-install path calls
get.docker.com, which may also be blocked. -
Two files delivered out of band (email, scp, internal object storage):
install.sh— the bash entry point (the same file served athttps://get.goodmem.ai).goodmem-<os>-<arch>.tar.gz— the CLI tarball matching the target platform (e.g.goodmem-linux-amd64.tar.gz).
-
A reachable mirror of
ghcr.iothat serves bothpair-systems-inc/goodmem/serverandpair-systems-inc/goodmem-pgvector.Verify that your chosen mirror serves the required image before installing:
docker pull <your-mirror>/pair-systems-inc/goodmem-pgvector:18If the pull fails, select a mirror that serves the image.
Install command
bash install.sh \
--local-cli-tarball ./goodmem-linux-amd64.tar.gz \
--goodmem-image ghcr.nju.edu.cn/pair-systems-inc/goodmem/server:latest \
--pgvector-image ghcr.nju.edu.cn/pair-systems-inc/goodmem-pgvector:18 \
--skip-verify \
--handsfree --db-password "your-secure-password-min-14-chars" \
--tls-disabledWhat each flag does:
| Flag | Effect |
|---|---|
--local-cli-tarball <path> | Use this tarball instead of downloading from get.goodmem.ai. |
--goodmem-image <ref> | Override the GoodMem server image — point at a mirrored registry (e.g. ghcr.nju.edu.cn/...). |
--pgvector-image <ref> | Select a mirror of the GoodMem PostgreSQL image. |
--skip-verify | Skip cosign SLSA verification, which requires sigstore.dev. See the security note below. |
The image choices are sticky: they get stamped into the per-profile
.env file under ~/.goodmem/installs/local-docker/<profile>/. Subsequent
goodmem system upgrade runs reuse the same images automatically — no
need to repeat the flags on every upgrade.
Security note about --skip-verify
--skip-verify turns off the cosign SLSA-provenance check that normally
proves the image you pulled was built by GoodMem's CI from this repository.
Without it, you are trusting whatever bytes the mirror serves.
The mirror caching is content-addressable (an OCI manifest digest can't be forged without breaking SHA-256), so a benign mirror cannot serve a different image. The remaining risk is a stale mirror serving an older version, or a malicious mirror serving its own build. Two ways to harden:
- Pin a digest. Pass
--goodmem-image ghcr.nju.edu.cn/pair-systems-inc/goodmem/server@sha256:...with the digest you cross-checked against upstream. The installer then pulls that exact content. - Manually verify. If your network reaches sigstore.dev intermittently
(e.g., via a VPN), run
cosign verify-attestation --type slsaprovenance ...against the mirror before approving the install for production use.
Upgrading
First, obtain the new CLI tarball. Ask your contact at PAIR Systems for the latest release.
Update the CLI from that tarball:
goodmem upgrade --local-cli-tarball ./goodmem-linux-amd64.tar.gz --yesPull the desired server image from the configured mirror, then apply it. For the example installation above:
docker pull ghcr.nju.edu.cn/pair-systems-inc/goodmem/server:latest
goodmem system upgrade --skip-cli-check --skip-verify--skip-cli-check bypasses the online CLI version check. With Docker Compose, --skip-verify
also skips the installer's image pull, so run docker pull first to refresh the local image.
If selecting a different tag or digest, pass that reference with --image as well.
Version discovery
Without get.goodmem.ai, the CLI cannot tell you "a new version is
available". You'll need to learn about new releases out of band (mailing
list, internal portal, GitHub Releases on a reachable network) and bring
the new CLI tarball over to the target machine. Follow the upgrade steps above to update both
the CLI and the server.
Fully offline install (air-gapped)
The network-restricted flow
above still pulls the two container images — just from a mirror instead of the
default registries. When the target machine has no reachable registry at
all, pre-stage those images too: pull them on a connected machine,
docker save them to a file, copy it across, and docker load on the target.
No mirror hosts and no --goodmem-image / --pgvector-image flags are needed.
Prerequisites
- Docker engine already installed on the target. The installer's
auto-install path calls
get.docker.com, which is unreachable here, so install Docker out of band first. - Three files delivered out of band (scp, USB, internal object storage):
install.sh— the bash entry point (the same file served athttps://get.goodmem.ai).goodmem-<os>-<arch>.tar.gz— the CLI tarball matching the target platform (e.g.goodmem-linux-amd64.tar.gz).goodmem-images.tar.gz— the saved container images, built in the next step.
Save and load the images
On a connected machine, pull both images for the target's architecture, then save them into a single file:
docker pull --platform linux/amd64 ghcr.io/pair-systems-inc/goodmem/server:latest
docker pull --platform linux/amd64 ghcr.io/pair-systems-inc/goodmem-pgvector:18
docker save \
ghcr.io/pair-systems-inc/goodmem/server:latest \
ghcr.io/pair-systems-inc/goodmem-pgvector:18 \
| gzip > goodmem-images.tar.gzOn the target machine, load them into the local Docker store:
gunzip -c goodmem-images.tar.gz | docker load
docker images | grep -E 'goodmem/server|pgvector' # both tags should appearMatch the execution architecture. Use a CLI tarball for the host and images compatible
with the container platform. The examples use linux/amd64. For Apple Silicon,
pre-stage the linux/amd64 server image for the installer’s emulation overlay
and the native linux/arm64 PostgreSQL image.
Install command
Because the loaded images already carry the tags the installer expects, omit
the --goodmem-image / --pgvector-image flags entirely:
bash install.sh \
--local-cli-tarball ./goodmem-linux-amd64.tar.gz \
--skip-verify \
--handsfree --db-password "your-secure-password-min-14-chars" \
--tls-disabled--skip-verify lets Docker Compose use the locally loaded images without pulling or verifying
them online. The CLI includes the Compose configuration, so that needs no download either.
This offline procedure does not cover Google Container-Optimized OS (COS), whose installer
requires a registry connection.
If you re-tag the images while loading them, they no longer match the defaults;
pass --goodmem-image / --pgvector-image with your tags so the installer and
Compose find them.
Upgrading
There is no registry to pull from, so stage the new artifacts by hand — the same save/load pattern as the install.
First, upgrade the CLI from a new tarball (obtain it as described under Version discovery below):
goodmem upgrade --local-cli-tarball ./goodmem-linux-amd64.tar.gz --yesThen stage and load the new server image on the target, exactly as at install time:
# On a connected machine:
docker pull --platform linux/amd64 ghcr.io/pair-systems-inc/goodmem/server:latest
docker save ghcr.io/pair-systems-inc/goodmem/server:latest | gzip > goodmem-server.tar.gz
# Copy over, then on the target:
gunzip -c goodmem-server.tar.gz | docker loadFinally, roll the server onto the freshly-loaded image:
goodmem system upgrade --skip-cli-check --skip-verify--skip-cli-check bypasses the version gate that contacts get.goodmem.ai;
--skip-verify skips the registry pull and cosign check, so the upgrade uses
the image you just loaded. The pgvector image rarely changes between releases —
if it does, docker load the new one the same way before upgrading.
Version discovery
With no network, the CLI cannot tell you when a new version is available. Track
releases out of band (mailing list, internal portal, or GitHub Releases on a
reachable network), then bring both the new goodmem-<os>-<arch>.tar.gz and
the new server image over to the target and follow the Upgrading steps above.
Get Started with the CLI
Use the GoodMem CLI on a self-hosted server to create an embedder, a space, and an LLM, add a PDF, and run a search.
Building a Basic RAG Agent using GoodMem
Build a RAG agent with GoodMem: register an embedder and LLM, ingest text and PDFs into a space, retrieve context, and optionally add a reranker.