Skip to main content
Keeping m87 updated ensures you have the latest features, bug fixes, and security improvements.

Update Command

The easiest way to update m87 is using the built-in update command:
m87 update
This downloads and installs the latest m87 binary to the same location as your current installation.
The update command works for installations in standard locations like ~/.local/bin or /usr/local/bin. For custom installations, you may need to update manually.

Updating the CLI

1

Check current version

First, check which version you’re currently running:
m87 --version
2

Run update

Update to the latest version:
m87 update
The command will:
  • Check for the latest release
  • Download the appropriate binary for your platform
  • Replace your current m87 binary
  • Preserve file permissions
3

Verify update

Confirm the new version is installed:
m87 --version

Updating the Runtime

After updating the m87 CLI, you should also update the runtime on your edge devices.

Update Local Runtime

If you’re updating the runtime on the same machine where you updated the CLI:
m87 runtime restart
This restarts the runtime service with the new binary.
Restarting the runtime will briefly disconnect any active sessions to the device.

Update Remote Device Runtime

To update the runtime on a remote device:
1

Update the binary

Execute the update command on the remote device:
m87 <device> exec -it -- 'm87 update'
2

Restart the runtime

Restart the runtime to use the new binary:
m87 <device> exec -it -- 'm87 runtime restart'
3

Verify the update

Check the runtime is running with the new version:
m87 <device> exec -- 'm87 --version'

Combined Update Command

You can combine both steps into a single command:
m87 <device> exec -it -- 'm87 update && m87 runtime restart'

Update Multiple Devices

To update multiple devices at once, use a shell loop:
for device in device1 device2 device3; do
  echo "Updating $device..."
  m87 $device exec -it -- 'm87 update && m87 runtime restart'
done
Or list all devices and update them:
m87 devices list --format json | jq -r '.[] | .name' | while read device; do
  echo "Updating $device..."
  m87 $device exec -it -- 'm87 update && m87 runtime restart' || echo "Failed to update $device"
done

Manual Update Methods

Update via Installation Script

Re-run the installation script to get the latest version:
curl -fsSL https://get.make87.com | sh
This will download and install the latest release to ~/.local/bin/m87.

Update from GitHub Releases

1

Download the latest release

Visit the releases page and download the appropriate binary for your platform:Linux (amd64):
wget https://github.com/make87/m87/releases/latest/download/m87-linux-amd64
Linux (arm64):
wget https://github.com/make87/m87/releases/latest/download/m87-linux-arm64
macOS (amd64):
wget https://github.com/make87/m87/releases/latest/download/m87-darwin-amd64
macOS (arm64):
wget https://github.com/make87/m87/releases/latest/download/m87-darwin-arm64
2

Make it executable

chmod +x m87-*
3

Replace existing binary

# Find current location
which m87

# Replace it (example for ~/.local/bin)
mv m87-linux-amd64 ~/.local/bin/m87

Update from Source

If you built m87 from source, update by pulling the latest code and rebuilding:
cd /path/to/m87
git pull origin main
cargo build --release
cp target/release/m87 ~/.local/bin/
See Building from Source for detailed build instructions.

Docker-Based Installation

If you’re running m87 via Docker:
1

Pull the latest image

cd /path/to/m87-repo
git pull origin main
docker build -f m87-client/Dockerfile -t m87 .
2

Verify the update

docker run --rm m87 --version
Your alias remains the same, so no additional configuration is needed.

Update Strategies

Scheduled Updates

For production deployments, consider scheduling updates during maintenance windows:
# Cron job to update at 3 AM every Sunday
0 3 * * 0 /home/user/.local/bin/m87 update && /home/user/.local/bin/m87 runtime restart

Staged Rollout

For large fleets, update a small subset first:
1

Test on staging devices

m87 staging-device exec -it -- 'm87 update && m87 runtime restart'
2

Monitor for issues

m87 staging-device status
m87 staging-device logs
3

Roll out to production

Once verified, update production devices in batches.

Version Compatibility

CLI and Runtime Versions

The m87 CLI and runtime are designed to be compatible across versions, but it’s recommended to keep them in sync:
  • Recommended: CLI and runtime on the same version
  • Supported: CLI up to 2 minor versions ahead of runtime
  • Not recommended: Runtime newer than CLI

Checking Versions

Local CLI version:
m87 --version
Remote runtime version:
m87 <device> exec -- 'm87 --version'

Rollback

If an update causes issues, you can rollback to a previous version:
1

Download previous release

Visit releases page and download a specific version:
wget https://github.com/make87/m87/releases/download/v0.x.x/m87-linux-amd64
2

Replace the binary

chmod +x m87-linux-amd64
mv m87-linux-amd64 ~/.local/bin/m87
3

Restart runtime if needed

m87 runtime restart

Troubleshooting Updates

Problem: m87 update returns an error.Solutions:
  • Check network connectivity: curl -I https://github.com
  • Verify write permissions to the installation directory
  • Try manual update from GitHub releases
  • Check disk space: df -h
Problem: Runtime fails to start after updating.Solutions:
# Check runtime status
m87 runtime status

# View logs
journalctl --user -u m87-runtime -n 50

# Try manual restart
m87 runtime stop
m87 runtime start
If issues persist, see Troubleshooting guide.
Problem: m87 --version still shows old version.Possible causes:
  • Multiple m87 binaries in PATH
  • Shell cached the old binary location
Solutions:
# Clear shell hash
hash -r

# Find all m87 binaries
which -a m87

# Use full path
~/.local/bin/m87 --version

Release Notifications

To stay informed about new releases:
  1. Watch the GitHub repository:
    Visit github.com/make87/m87 and click “Watch” → “Custom” → “Releases”
  2. Check for updates periodically:
    m87 update --check
    
  3. Subscribe to release RSS:
    https://github.com/make87/m87/releases.atom
Major version updates may include breaking changes. Always review the release notes before updating production systems.