Add your machine
Pair a computer of your own with your team’s moor. A paired machine dials out to moor, so it needs no open port, and moor stores only its public key.
A machine serves in one of two ways:
- As a personal node. It runs your Boxes in Docker, and only yours. It needs Docker, as for a node.
- As a tool machine. It hosts no Boxes. A Box borrows it to run commands,
such as a Mac that builds iOS apps. It needs
--allow-exec.
Pair a personal node
The quickest way is from the portal. Open Settings, then Machines, and choose Add a machine.
It shows one line that installs the agent and pairs the
machine with a one-use token. Run it on the machine. The dialog waits until the
machine checks in. The token lasts 10 minutes, and a new one replaces it.
To pair by hand instead:
-
Install Docker. Docker as root, such as from get.docker.com, is fine.
-
As the user that will own the Boxes, install the agent and pair the machine:
Terminal window curl -fsSL https://raw.githubusercontent.com/IniZio/moor/develop/install.sh | sh -s -- --nightly --server https://HOST -
upsets up rootless Docker for your user. It asks once before it runs anything with sudo, as rootless-docker.md says. It then prints a link and a code. -
Open the link on any device, sign in, check that the code matches, and add the machine. The code lasts 10 minutes.
-
Wait for
linked: NAME.uphas installed a user service that keeps the agent running, a systemd user unit on Linux or a launch agent on macOS. It runs as you, so you manage it without root:systemctl --user status moor-machine-agent.
The machine is now a node named after it. It shows on the portal and in
list_nodes, with docker as what it provides. A new Box of yours tries your
personal nodes first, so you need no setting to use it. If the machine is
offline, the start is refused and says since when. moor does not fall back to a
shared node.
Docker Boxes are privileged
A Box is two containers. The agent place is not privileged. The work place,
where Claude’s commands run, is a privileged container, so Docker works inside
it. A user who can run Docker is already root on the host, and a privileged
container is root with fewer fences. Pair a machine only if you accept that for
your own Boxes. Nobody else’s Box runs on it. up says this each time it runs.
How many Boxes
The machine has no cap by default. Free memory decides, and a start that does
not fit waits. To cap it or to change its labels later, use the Machines
section of the portal, moor node set NAME --max-boxes N, or the
set_node_settings tool. --no-cap removes a cap. A change applies to the
next start.
Options
Rerun up with new flags to change them. It keeps the pairing.
| Flag | Default | Meaning |
|---|---|---|
--name NAME |
the host name | The machine’s name, unique among your machines. |
--labels a,b |
none | The labels it starts with, which a repo can ask for in node.labels. Edit them later as above. |
--agent-image IMAGE |
this release’s | The agent place’s image, for development. |
--work-image IMAGE |
this release’s | The work place’s image. A repo that needs other tools builds on it. |
Box images describes both images and how to build them.
Pair a tool machine
Pair it with labels and --allow-exec:
moor-machine-agent up --server https://HOST --name mac --labels macos,ios-sim --allow-execA Box claims the machine with the machine_claim tool, syncs its work tree
there, and runs commands with exec. The agent runs those commands only
because you passed --allow-exec. A tool machine needs no Docker. A repo names
the labels it wants in repo config.
To give each Box its own simulator, build folder, or port, add prepare,
suspend, and release hooks on the machine.
Machine tools describes them, with an iOS example.
Link over a private network
When the machine and moor’s cluster share a network, your operator can offer a
second address for the link. Each keystroke then skips the public ingress. The
machine then needs its server in state.json changed, with no new pairing.
Keep machine links on your private network
has the steps. To change flags on a moved machine, run up --server with the
link address, not the one the portal shows.
Keep the agent current
When moor needs a newer agent, the service exits and names the command:
moor-machine-agent update --version 1.2.3The update checks the release’s checksum and signature before it replaces the
binary. The service runs with --auto-update, so it installs the release the
server names by itself and restarts once no Box is starting or stopping.
Change what a machine offers
A machine paired for another kind of Box pairs again the next time you run up. Open the link and confirm the code as before.
Remove a machine
Remove it in Settings, then Machines. New Boxes stop going there. The portal refuses while Boxes run on it.
moor-machine-agent down stops and removes the user service. Run it on the
machine too.