Documentation menu

Docs › Operations

Upgrade guide

InfraMole releases are published as a new bundle and new images. Upgrades apply database migrations automatically before the new version starts.

Read the release notes

Check What's new for anything that needs attention (for example a new setting).

Back up

docker compose exec backup sh -c 'pg_dump -h db -U depmap -d depmap -Fc > /backups/pre-upgrade-$(date -u +%Y%m%dT%H%M%SZ).dump'

Download the new bundle

Your .env and backups/ are not part of the bundle, so they are kept.

cd /opt/inframole
curl -fsSLO https://github.com/InfraMole/self-hosted/releases/latest/download/inframole-self-hosted.tar.gz
curl -fsSLO https://github.com/InfraMole/self-hosted/releases/latest/download/inframole-self-hosted.tar.gz.sha256
sha256sum -c inframole-self-hosted.tar.gz.sha256
tar xzf inframole-self-hosted.tar.gz --strip-components=1
Set-Location C:\InfraMole
$base = "https://github.com/InfraMole/self-hosted/releases/latest/download"
Invoke-WebRequest "$base/inframole-self-hosted.tar.gz" -OutFile inframole-self-hosted.tar.gz
Invoke-WebRequest "$base/inframole-self-hosted.tar.gz.sha256" -OutFile inframole-self-hosted.tar.gz.sha256
$expected = (Get-Content .\inframole-self-hosted.tar.gz.sha256).Split(" ")[0]
if ((Get-FileHash .\inframole-self-hosted.tar.gz -Algorithm SHA256).Hash -ne $expected) { throw "Checksum mismatch" }
tar -xzf inframole-self-hosted.tar.gz --strip-components=1

Compare .env.example with your .env for new optional settings.

Pull and restart

docker compose pull
docker compose up -d
docker compose ps

Remove the old images

Every version downloads new images (about 700 MB) and the old ones stay on disk until you remove them. After a few upgrades they can fill a small server — the next docker compose pull then fails with no space left on device. Once the new version is running:

docker image prune -af

This only removes images no container uses; the running version is kept. docker system df shows how much space images take.

If a pull fails with no space left on device, your current version keeps running (up -d never ran): run docker image prune -af, then pull again.

Which version is running

Settings › Workspace › InfraMole version, or on the server docker compose images web.

Know when there is a new version

With UPDATE_CHECK=true in .env, admins are told when a newer release exists: next to the version in Settings (with Check now), at the bottom of the sidebar, and in the weekly summary email if they turned it on. Settings › Agents also marks agents older than the latest agent release. It is one anonymous request per day to GitHub's public releases, for the latest server and agent version numbers; nothing about your installation is sent.

Installations created from 0.27.0 on have it on. Older ones have UPDATE_CHECK=false (or no line) in .env: change it to true and run docker compose up -d. To turn it off, set false.

Without it — or as well — follow What's new: it has an RSS / Atom feed for a feed reader, or for Slack and Teams through their RSS apps.

Pin or roll back a version

The bundle pins its images to its version. To run a specific version, set it in .env and restart:

INFRAMOLE_VERSION=0.1.0

Rolling back to an older version after its database was migrated forward is not supported: restore the backup taken before the upgrade instead (see Backup and restore).

Agents

Agents keep working across server upgrades. Agents 0.4.0 and later can update themselves if you turn it on (Manage and remove › Updates); older ones update by running the install command again from Settings › Agents › New enrollment token — the same machine is re-enrolled, no duplicate is created.