Skip to main content
This page details how to authenticate to the Device API from an application running on the device. If you use a Miru Device SDK, the SDK handles the authentication for you as long as you grant file system access to the application.

Local server

On Linux, the Miru Agent serves API requests over the Unix socket /run/miru/miru.sock. The socket exists only on the device, so other machines cannot connect to it.Authenticate to the ServerOpening the socket is the credential. The agent accepts every request from a process that can connect to /run/miru/miru.sock.Example
The localhost host is only the HTTP request target. curl sends the request through the socket.
If using a Device SDK, the authentication complexities are handled for you as long as you grant file system access to the application running the SDK.

Granting access

Any access to the socket must be executed with a user who 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.
1

Add the user to the miru group

To add the current user, use $USER as the username.
2

Sign out and sign back in

Group membership is only read when a session starts. Until you log out of your desktop or SSH session and log back in, the user still can’t access the socket.For an application that runs as a systemd service, restart its service instead.To use the new group in the current shell without signing out, run newgrp miru. It only applies to that shell; other shells, including new ones, still need you to sign out and back in.
3

Verify the group membership

The output includes miru.
Last modified on October 16, 2026