To programmatically provision devices, Miru offers provisioning tokens. Provisioning tokens are only supported when installingDocumentation Index
Fetch the complete documentation index at: https://docs.mirurobotics.com/llms.txt
Use this file to discover all available pages before exploring further.
miru-agent version v0.9.0 or later. If installing a version that precedes v0.9.0, continue to use the provisioning script.
Unlike the dashboard, which requires manual interaction with the web interface for each device, provisioning tokens allow you to:
- Provision multiple devices without manual intervention
- Integrate with existing infrastructure management tools and workflows
- Use in headless environments where a web browser isn’t available
Install the miru-agent package
Before provisioning a device via provisioning tokens, you must first install the miru-agent package onto the target machine.
The recommended method is via apt (shown below). However, you can also manually download the package from GitHub. Visit the agent installation documentation for more information.
Create a provisioning token
Provisioning tokens are created via the Platform API endpoint using API keys. Create the API key If you don’t have an API key, follow the instructions for creating an API key. The API key requires thedevices:provision and provisioning_tokens:write scopes.
Create the token
Once you have an API key, you can create a token using the following code samples. Keep in mind that tokens are short-lived (expire in 5 minutes) and one-time use only.
Provision the device
After retrieving the provisioning token, run the following command. Make sure to replace<token> with the actual token.
sudo -u mirusets the command to run as themiruuser.MIRU_PROVISIONING_TOKEN=<token>authenticates the request./usr/sbin/miru-agent provisionexecutes themiru-agentbinary with theprovisioncommand.
- Creates the device - creates a new device in the Miru dashboard (if a device with the provided name doesn’t already exist).
- Provisions the device - registers the agent with the Miru control plane.
Troubleshooting
If the machine you’re provisioning on has already been provisioned, the provisioning command is treated as a no-op and exits successfully. To reassociate the machine with an existing Miru device, follow the reprovisioning documentation. To provision the machine as a brand new Miru device (never been provisioned in Miru before), first uninstall themiru-agent package before continuing with the provisioning process.
Arguments
The provision command supports the following parameters to tune your installation:The name of the device in the Miru dashboard; defaults to
$HOSTNAME.Default: $HOSTNAMEVerify installation
To verify the agent was successfully installed and provisioned, navigate to the Devices page. You should see your device listed with the statusActivating before transitioning to Online.
The transition from
Activating to Online may take up to 10 seconds, depending on your network connection.
