Skip to content

Remote workers

Sometimes an instrument sits at another computer: a camera with a driver that only runs there, or a device on a bench far from the lab PC. A remote worker is a device that runs on that computer and connects to your LabOrchestra server. From then on it is a device like any other: it is in the dashboard, in scripts and in recordings.

  1. Make sure the server is reachable from the other computer: turn on network access.

  2. On the Devices page click Add device… and choose the kind Remote. Give the device the name it will have everywhere (camera_pc). It stays “waiting” until its worker connects.

  3. Under Remote workers, choose that device, give the token a Label (for example lab PC 2) and click Create token. The token works for that one device only.

    The Remote workers section with a device camera_pc, a field for the label, and a created token with the command to run on the other computer.The Remote workers section with a device camera_pc, a field for the label, and a created token with the command to run on the other computer.
  4. Copy what is shown. The token is not shown again. It contains a command for the other computer:

    Terminal window
    laborchestra worker path/to/camera_pc.py --id camera_pc --url https://lab-pc:5443 --token <token>

    If Python and laborchestra are not installed there, uvx --from laborchestra laborchestra worker … takes the same arguments and installs what is needed. (pip install laborchestra provides the laborchestra command; python -m laborchestra.worker is the same worker.)

  5. On the other computer, first make it trust the server’s certificate once (laborchestra trust --url … --fingerprint …, see Network access). Then run the worker command from step 4. When it connects, the device is ready.

To cut a worker off, click the red bin icon (Revoke) in the list of tokens: the worker cannot connect again.