Syntax
Commands
Command Reference
add
Add a new Lager Box configuration.
--name(required) - Name to assign to the box--ip(required) - IP address of the box--user(required) - SSH username for the box (the account you log in as)--version- Lager Box version/branch (e.g., staging, main)--yes- Confirm without prompting
--user is required. It previously defaulted to lagerdata, but
since most boxes use a different login account, the default was removed so the
correct user is always recorded for SSH, updates, and lager ssh.add-all
Automatically add all Lager Boxes found on your Tailscale network.
--yes- Confirm without prompting
- Runs
tailscale statusto discover devices - Filters for devices with names 5-8 characters long
- Converts names to uppercase
- Skips boxes that already exist with the same IP
- Adds new boxes to your configuration
delete
Delete a box configuration.
edit
Edit an existing box configuration.
--name(required) - Name of the box to edit--ip- New IP address--user- New SSH username--version- New Lager Box version/branch--new-name- Rename the box--yes- Confirm without prompting
list
List all configured boxes with live version status. This is also the default behavior when running lager boxes with no subcommand.
/lock and /status) to display real-time version, status and lock information.
All boxes are queried at the same time. A box that is powered down or
mid-update now costs only its own timeout. It no longer delays the others.
On a terminal the table is printed straight away, with every row reading
pending. A spinner turns beside each unanswered status and locked by
cell. Each row fills in as its box answers. A countdown shows how long the
outstanding boxes have left:
locked by, because no lock is known until a
box answers. A column that arrives later shifts every row below it.
Press Ctrl+C to stop waiting without losing the boxes that did answer: the
rest are marked cancelled and the table prints immediately. A box that never
answers is given up on shortly after the countdown reaches zero and marked
no response, so the command always terminates.
Piped into a file or a CI log, the command uses none of the live display. It
prints the final table once, exactly as shown above.
Output:
locked by column appears only when a box is locked.
A version from a
branch or a commit shows the ref in brackets, for example 0.47.0 (main). A box
on a release tag shows only the version. lager hello prints the full ref with
the commit.
Status Colors:
If a box shows
root in the locked by column, the command prints a warning.
Such a lock usually comes from inside a Docker container. Use
lager boxes lock --user to name the user next time.
delete-all
Delete all box configurations.
export
Export box configuration to JSON file.
--output/-o- Output file path (prints to stdout if not specified)
import
Import box configuration from JSON file.
FILE- Path to JSON file to import--merge- Merge with existing boxes (default: replace)--yes- Confirm without prompting
lock
Lock a box to prevent other users from using it. See Box Locking for full details.
--box(required) - Name of the box to lock--user- Username to lock as. Use it inside a Docker container, where the user is otherwiseroot
unlock
Unlock a box to allow other users to use it. See Box Locking for full details.
--box(required) - Name of the box to unlock--user- Holder to unlock as, for a lock recorded under a name other than your user name--force- Force unlock even if locked by another user
--force, unlock releases a lock that the CLI counts as yours, such as the automatic lock of your own CI job.
Examples:
Configuration Storage
The boxes commands write box configurations to~/.lager in your home
directory. If LAGER_CONFIG_FILE_DIR is set, they write .lager in that
directory instead. The boxes are under the BOXES key:
- Simple: Just an IP address string
- Full: Object with ip, user, and version fields
.lager files that it
finds in your project directories. The file closest to the current directory
wins.
Validation
The boxes commands perform validation:- Duplicate detection: Prevents adding boxes with same name or IP
- IP validation: Validates IP address format
- Confirmation: Shows before/after state for edit operations
Examples
Notes
- Box names must be unique
- IP addresses must be unique (no duplicate IPs)
--useris required forlager boxes add.add-allstores entries without a user, and commands then uselagerdata- Use
--mergewhen importing to preserve existing boxes lager boxes listneeds each box to answer on port 9000 to show its version and lock state

