Syntax
Options
lager update targets one box per invocation. To update several, loop over them
in your shell — the --all flag and its multi-box loop were removed in v0.18.2.Pre-built box images
Release tags publish a box container image to the GitHub Container Registry. If a pull is enabled, the client does three things:- It resolves the tag to an immutable digest.
- It pulls that digest, pinned to the box’s own architecture.
- It verifies that the image reports the version you asked for.
For
lager update, pulling is off by default. It changes how the most
load-bearing command in the fleet obtains the code it runs, so it soaks on
Lager’s own boxes first. Pass --pull to opt a single run in, or set
LAGER_BOX_IMAGE_PULL=1 to opt in a whole shell.This differs from lager install, which already
uses a pre-built image for a release tag by default. --no-pull works the same
way on both. It is the switch that routes a fleet around a bad published image,
and it needs no CLI release.Version pinning
Since lager 0.22.0, a semver value passed to--version resolves to the
release tag vX.Y.Z. The leading v is optional (e.g. 0.26.0 or
v0.26.0), and the common pre-release suffixes (-rc1, -beta2, -alpha,
-preview) are accepted too. Release tags are the single source of truth for a
pinned version.
--version main is re-resolved against origin/main each time it runs, so it
can mean a different commit minutes later. A commit has no pre-built image,
because only release tags publish one. So a SHA builds on the box just as a
branch does. The commit must also be reachable from a branch or tag on the
remote.
Any other value (main, staging, or a feature branch name) resolves to
origin/<name> as before.
Usage
Basic Update
Updating Several Boxes
There is no built-in multi-box update. Loop in your shell, and use--check
first if you want to see which boxes are actually behind:
A
--all flag existed before v0.18.2 and was removed along with the multi-box
loop it drove. A plain shell loop continues to the next box when one fails, so an
unreachable box does not stop the run.Update Process
The update command performs the following steps (shown in progress bar):- SSH Connection - Establish secure connection to Lager Box
- Git Repository Check - Validate lager repository exists
- Git Pull - Pull latest code from specified branch
- Udev Rules - Install USB instrument access rules
- Docker Build - Build updated containers (no-cache)
- Firewall Setup - Configure UFW if needed
- Customer Binaries - Set up custom binaries directory
- J-Link Check - Verify debug probe software (optional)
- Version Update - Record version in
/etc/lager/version - Container Restart - Start updated containers
- Status Verification - Confirm that the containers are up
Version Tracking
The Lager Box tracks its current version in/etc/lager/version. The
lager boxes listing queries each configured box and shows its current version
in the version column:
SSH Key Authentication
The update command automatically detects SSH key configuration:- With SSH keys: Updates proceed without password prompts
- Without SSH keys: Prompts for password (interactive mode)
Firewall Auto-Configuration
If UFW is not configured, the update command will:- Detect missing firewall rules
- Offer to install and configure UFW
- Apply secure defaults (VPN-only access to Lager ports)
Examples
Troubleshooting
Update Fails at Git Pull
Container Build Fails
Firewall Issues
Notes
- Progress bar is disabled when
--verboseis used - Container builds use
--no-cacheto ensure fresh builds - Version defaults to
mainif not specified - Update automatically verifies container health after restart
--checkreports what will change without modifying the box, so it is the safe way to find out whether a box is behind--forceupdates even when the box reports it is already current, wiping the cached image and the cargo/npm volumes (useful after major code changes)

