Syntax
Options
| Option | Description |
|---|---|
--box BOX | Lagerbox name or IP address |
--all | Update all saved boxes that need updating |
--version VERSION | Lager Box version/branch to update to (default: main) |
--yes | Skip confirmation prompt |
--skip-restart | Skip container restart after update |
--check-jlink | Check for J-Link and offer to install if missing |
--force | Force fresh Docker build by removing cached image |
--verbose / -v | Show detailed output (default shows progress bar) |
Either
--box or --all is required. They cannot be used together.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.
--all works:
- Queries each saved box’s
/cli-versionendpoint - Compares box version against the current CLI version
- Builds a list of boxes that need updating (version older than CLI or unknown)
- Skips boxes that are already current, newer, or unreachable
- Updates each box sequentially
- Displays a summary of successes and failures
Skip Container Restart
J-Link Installation Check
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-mono 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 containers are running
Version Tracking
The Lager Box tracks its current version in/etc/lager/version. You can sync versions from all Lager Boxes:
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
--allchecks versions automatically and only updates outdated boxes--forceremoves cached Docker images before building (useful after major code changes)--boxand--allare mutually exclusive

