Before you start
A machine must be a Lager Box before you add it to Stout. To make a machine into a Lager Box, see Setting up a Lager Box in the Lager docs. Then make sure that these conditions are true:- Stout can reach the box at its IP address, on ports 22, 5000, 9000, and 9001. Put the box on the same private network as Stout, for example Tailscale or a company VPN.
- You know the name of the SSH account on the box. It is the account that you gave to
lager install. - You know the password of that account. Stout asks for it one time, and only for a new box.
Set a default box username
An owner can set a Default Box Username in Settings > General. Stout fills in this username when you add or import a box. You can change the username of each box later on its Settings tab.Register a box
- Open Boxes, and then select Add Box.
- Enter the Box Name.
- Enter the IP Address of the box.
- Check the Username. Stout uses this SSH account on the box.
- If you want the box in a group, select the group in Group (optional).
- If you want to set up nets from a template, select the template in Template (optional). Stout creates the nets when the box first comes online.
- Select Add Box.
Install Stout
When the Stout container on a box is not healthy, the box page opens a window over the box tabs. Only owners and admins can start the install. The title of the window tells you which of the two installs this is:- Password Required — this box is new to Stout. Enter the password of the box account, and then select Install Stout.
- Install Stout before proceeding — Stout manages this box already. There is no password field. Select Install Stout.
sudo grant for the Lager commands only, so Stout cannot give itself the access that it needs without it. There is no way past this step: Stout cannot secure a box that it cannot use sudo on.
A box that Stout manages already never needs the password, and the window does not ask for it. The first install gave Stout that access.
To use the box tabs while the window is open, select Open the box page anyway.
The window shows the four steps of the install:
- Install requested
- Write control-plane config
- Start Stout container
- Verify health on :9001
sudo without a password. Stout does not call such a box installed, because it cannot manage the SSH keys of the box or lock down SSH on it. Enter the password of the box account, and then select Install Stout again. The window asks for the password from then on, because Stout now knows that this box needs it.
The install does these things on the box:
- It writes the connection settings and the Stout SSH key.
- It sets up the
sudorules that Stout needs. - It installs the rules that let Lager reach USB instruments.
- It starts the
stoutcontainer and checks that the container is healthy. - It turns on the access guard and asks for the SSH lockdown. See Security and access.
After the install
After the install, the window changes to Securing this box…. It shows two lines: Who can use this box and Who can log in over SSH. The window closes by itself when the box is secure. The SSH lockdown can take several minutes to start. To use the box page before then, select Open the box page anyway. To leave, select Go Back.Import boxes from the Lager CLI
The Lager CLI keeps its list of boxes in the.lager file in your home directory. You can import that list into Stout.
- Open Boxes.
- Open the … menu, and then select Import from Lager.
- Pick your
.lagerfile. If the file picker does not open, select Choose File. - Check the preview. It shows the Name, IP Address, SSH User, and Version of each box.
- Select the import button, for example Import 3 Boxes.
- In Step 2: Install Stout on Boxes, look for the Box account password field. The field appears only when one of these boxes is new. Enter the password of the box account.
- Select Install from Dashboard for a box. To install on many boxes, select them, and then select Install Selected from Dashboard.
- Select Done.
- If Stout already has a box with the same name, the import updates its IP address. It also updates the username when the file has one.
- A new box needs a username. The import uses the
uservalue from the file, or else the default box username. If neither exists, the import rejects the box. - The import rejects a box with an address that Stout refuses.
Export boxes to the Lager CLI
Export to Lager gives you Lager CLI commands that copy your Stout boxes into the Lager CLI on your computer.- Open Boxes.
- Open the … menu, and then select Export to Lager.
- In Export to Lager CLI, read the commands.
- Select Copy to Clipboard.
- Paste the commands into a terminal on your computer, and run them.
lager boxes delete-all --yes. Each next command adds one box with lager boxes add and the SSH username of that box. The export skips boxes that have no IP address.
For the commands, see lager boxes in the Lager docs.
Security and access
See what the install turns on, and give people access.
Nets and templates
Name the instrument channels on the new box.