Skip to main content

Overview

The m87 runtime is a service that runs on edge devices to enable remote access from the m87 CLI. Runtime management commands allow you to install, configure, and control this service using systemd.
Runtime commands are only available on Linux systems. These commands manage the systemd service on edge devices, not on your local workstation.

Prerequisites

  • Linux system (amd64 or arm64)
  • systemd installed and running
  • sudo access (commands automatically use sudo when needed)

Runtime Commands Overview


Runtime Login

Register the device as a runtime (headless flow, requires approval).

Syntax

Options

You must specify either --org-id or --email, but not both.

Examples

Approval Process

  1. Run m87 runtime login on the edge device
  2. The device shows up as “pending” in your device list
  3. From your workstation, approve the device:
  4. The device is now accessible remotely

Runtime Logout

Remove runtime credentials from the device.
This deregisters the device and removes local authentication tokens.

Start Runtime Service

Start the runtime service immediately and enable auto-start on boot.

Syntax

Options

Behavior

  1. Installs systemd service file
  2. Enables service to start on boot
  3. Starts the service immediately
  4. Registers device if not already registered

Examples

Use m87 runtime start as the quickest way to set up a new device. It handles installation, registration, and startup in one command.

Stop Runtime Service

Stop the running service (keeps enabled at boot).

Syntax

Behavior

  • Stops the currently running service
  • Service remains enabled to start on next boot
  • Device becomes unreachable until service is started again

Example

Stopping the runtime makes the device inaccessible remotely. You’ll need physical or local network access to start it again.

Restart Runtime Service

Restart the service (starts if stopped).

Syntax

Options

Behavior

  • If running: restarts the service
  • If stopped: starts the service
  • Matches standard systemd restart behavior

Examples

Remote Update and Restart

Update a remote device’s runtime:

Enable Runtime Service

Configure service to auto-start on boot.

Syntax

Options

Behavior

  • Without --now: Enables service for next boot (doesn’t start now)
  • With --now: Enables service AND starts it immediately

Examples


Disable Runtime Service

Remove auto-start on boot.

Syntax

Options

Behavior

  • Without --now: Disables auto-start (keeps running now)
  • With --now: Disables auto-start AND stops service immediately

Examples


Runtime Status

Show local runtime service status.

Syntax

Example Output


Runtime Run (Advanced)

Run the runtime daemon directly (used by systemd service).

Syntax

Options

Behavior

  • Runs in foreground (blocking)
  • Registers device if needed
  • Waits for approval if pending
  • Handles incoming connections
This command is typically only used by the systemd service. For normal operation, use m87 runtime start instead.

Example


Complete Setup Workflow

On Edge Device

On Workstation


Service Management

The runtime service:

  • Runs as your user (not root)
  • Managed by systemd (start/stop/restart)
  • Auto-starts on boot (when enabled)
  • Handles privilege escalation with sudo when needed
  • Logs to journald (view with journalctl -u m87-runtime)

View Service Logs


Troubleshooting

Service Won’t Start

Device Unreachable

Permission Errors


Command Behavior Summary

Start vs Enable

  • start: Enable on boot + start now
  • enable: Only enable on boot (doesn’t start now)
  • enable --now: Same as start

Stop vs Disable

  • stop: Stop now (keeps enabled on boot)
  • disable: Only disable on boot (keeps running now)
  • disable --now: Disable on boot + stop now

Restart

  • Restarts if running
  • Starts if stopped
  • Standard systemd behavior

Best Practices

Runtime management tips:
  1. Always enable on boot - Use start or enable --now for production
  2. Monitor logs - Check journalctl after startup for issues
  3. Update regularly - Keep runtime updated with m87 update && m87 runtime restart
  4. Use organizations - Register devices under org IDs for better fleet management
  5. Document devices - Keep track of device names and registration details