Run on one host
Take a host that Self-host on one machine set up and open it to
teammates. You add the gate behind your sign-in provider, then any other
fronts. You need a DNS name for the host, written here as HOST, and TLS in
front of port 8443. You also need an OIDC client, as
Sign-in with OIDC describes.
Know the units
moor up runs the controller as systemd user units:
-
moor.socketholds the controller socket,~/.local/state/moor/controller.sock. -
moor.servicerunsmoor controller serve --config ~/.config/moor/controller.yaml. -
moor-gate.servicerunsmoor-gatefor Boxes only. It has no public listener and no sign-in. It servesreport_stepat127.0.0.1:8444. -
moor-front@authgear.socketholds the gate’s front socket,~/.local/state/moor/fronts/authgear/front.
systemd holds each socket, so a client that connects during a restart waits
and gets its answer from the new controller. Each front gets a socket of its
own, from the template unit moor-front@.socket, which moor up writes with
the front sockets under its state directory.
Set XDG_STATE_HOME to the same value in your login shell and in the systemd
user manager, or leave it unset in both. Otherwise the CLI dials a socket the
units never bound.
Add the gate
-
Check that
~/.config/moor/controller.yamlhas the gate’s front.moor upwrites it, so a rerun adds it to a config from before:fronts:authgear:step_reports: true -
Check that the front’s socket listens.
moor upenables it, so a rerun adds it to a host from before:Terminal window systemctl --user is-active moor-front@authgear.socket -
Give
moor-gate.serviceits public listener. A drop-in survives a rerun ofmoor up, which rewrites the unit. Write~/.config/systemd/user/moor-gate.service.d/public.conf:[Service]ExecStart=ExecStart=%h/.local/bin/moor-gate \--front-socket %S/moor/fronts/authgear/front \--issuer https://ISSUER \--client-id CLIENT_ID \--mcp-resource-url https://HOST/mcp \--public-url https://HOSTThen run
systemctl --user daemon-reloadandsystemctl --user restart moor-gate.service. The gate still reads the service key frommoor up’s unit, and still serves Boxes at127.0.0.1:8444. It listens on0.0.0.0:8443without TLS. Put your TLS ingress in front of it, and let it hold a response stream open for hours. -
Check it from the host:
Terminal window moor doctor --public-url https://HOST
Teammates can now follow Get started.
Add the webhook front
So that teammates’ webhooks get delivered, let the controller run
moor-notify:
fronts: notify: command: [moor-notify] webhooks: trueEnable its socket and restart the controller:
systemctl --user enable --now moor-front@notify.socketsystemctl --user restart moor.servicemoor-notify comes in the release image, not as a release binary. On a host,
build it from a checkout, such as with cargo install --path crates/moor-notify.
moor-machine-runner is a release binary, and the install script puts it in
~/.local/bin with moor.
Take machines from teammates
Teammates pair machines through the gate, at https://HOST/pair. The controller
reaches them through the machine runner. Run it beside the controller, as the
same user:
moor-machine-runner --socket ~/.local/state/moor/runner/runner.sock \ --state-dir ~/.local/state/moor-machine-runner --agents 0.0.0.0:7701Route https://HOST/machines/link to port 7701 on your ingress. The gate
serves /machines/pair and /pair itself.