Skip to main content
Update Lager Box software on Lagerboxes with comprehensive progress tracking and automatic configuration.

Syntax

Options

Either --box or --all is required. They cannot be used together.

Version pinning

Since lager 0.22.0, a semver value passed to --version — with or without a leading v (e.g. 0.26.0 or v0.26.0), including common pre-release suffixes (-rc1, -beta2, -alpha, -preview) — resolves to the release tag vX.Y.Z. Release tags are the single source of truth for a pinned version.
Any other value (main, staging, or a feature branch name) resolves to origin/<name> as before.
Per-release version branches (bare X.Y.Z branches) are deprecated in favour of tags. A value like 0.26.0 now resolves to the tag v0.26.0, not a branch of the same name. See RELEASE_PROCESS.md in the repository.

Usage

Basic Update

Update All Boxes

The --all flag queries every saved box’s version and updates only those that are behind the current CLI version.
How --all works:
  1. Queries each saved box’s /cli-version endpoint
  2. Compares box version against the current CLI version
  3. Builds a list of boxes that need updating (version older than CLI or unknown)
  4. Skips boxes that are already current, newer, or unreachable
  5. Updates each box sequentially
  6. Displays a summary of successes and failures
Example output:

Skip Container Restart


Update Process

The update command performs the following steps (shown in progress bar):
  1. SSH Connection - Establish secure connection to Lager Box
  2. Git Repository Check - Validate lager repository exists
  3. Git Pull - Pull latest code from specified branch
  4. Udev Rules - Install USB instrument access rules
  5. Docker Build - Build updated containers (no-cache)
  6. Firewall Setup - Configure UFW if needed
  7. Customer Binaries - Set up custom binaries directory
  8. J-Link Check - Verify debug probe software (optional)
  9. Version Update - Record version in /etc/lager/version
  10. Container Restart - Start updated containers
  11. Status Verification - Confirm containers are running

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)
To set up SSH keys:

Firewall Auto-Configuration

If UFW is not configured, the update command will:
  1. Detect missing firewall rules
  2. Offer to install and configure UFW
  3. 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 --verbose is used
  • Container builds use --no-cache to ensure fresh builds
  • Version defaults to main if not specified
  • Update automatically verifies container health after restart
  • --all checks versions automatically and only updates outdated boxes
  • --force removes cached Docker images before building (useful after major code changes)
  • --box and --all are mutually exclusive