Install

To install the Miru agent on a device, navigate to the Devices page. Create a device by clicking the New Device button in the top right, naming the device, and clicking Create.
Next, click the Provision button on the device you just created.
Skip the optional staging step by clicking Skip.
Copy the installation command shown in the dialog and paste it the terminal of the device you want to install the agent on.
curl must be installed and sudo privileges may be required.
The installation command is composed of the following parts:
  • curl -fsSL <installation-script-url> downloads the installation script from the Miru agent repository.
  • | pipes the script to the shell.
  • env MIRU_ACTIVATION_TOKEN=<activation-token> sets the activation token environment variable.
  • sh executes the script.
You can review the contents of the installation and activation scripts here. The script first downloads the Miru agent debian package and installs the agent as a systemd service. Next it downloads the activation script and activates the agent. Upon successful installation, a message will confirm that the agent has been activated.
Successfully activated the miru agent as the Robot A device!
Navigating back to the Devices page will show the device as Online.

Socket Permissions

The Miru agent serves API requests over the Unix socket /run/miru/miru.sock, which is created with the root:miru permissions (user root and group miru). Any access to the socket must be executed with a user that is a member of the miru group.
Access to the socket is granted to the root user but this is not recommended for security best practices.
To add a user to the miru group, run
sudo usermod -a -G miru <username>
To add the current user to the miru group, run
sudo usermod -a -G miru $USER
You must log out of your desktop or SSH session and log back in for group changes to take effect permanently.
To temporarily run the current shell session as a member of the miru group, run
newgrp miru
Any new shell sessions will require you to run newgrp miru again until you’ve logged out of your desktop or SSH session and logged back in.

Verify

Invoke the agent’s test endpoint to verify the installation.
sudo curl --unix-socket /run/miru/miru.sock http://localhost/v1/health
You should see something similar to the following
{"status":"ok"}

Uninstall

To remove the agent but maintaining the configuration files, run:
sudo apt remove miru-agent
To remove the agent and all configuration files, run:
sudo apt purge miru-agent