Mosyle MDM Deployment (macOS)
Deploy AI Endpoint Shield across your macOS fleet with Mosyle MDM using a single install.sh Custom Command with auto-update.
Overview
AI Endpoint Shield is deployed to macOS devices from Mosyle with a single script, install.sh — the same script used for Jamf MDM Deployment. It runs as a Mosyle Custom Command at user sign-in and:
Fetches the version manifest (
latest.json) from the URL you provideCompares the installed version against the manifest and exits early if the device is already current
Downloads the signed and notarized
.pkgand installs itWrites
config.env(token and feature flags) into the console user's home directoryLets the pkg's embedded
postinstallhandle file placement, LaunchAgent setup, and hook installation
No package upload to Mosyle is required — the script downloads the pkg itself, so a new Akto release reaches your fleet without touching the Custom Command.
Mosyle has no encrypted script-parameter field equivalent to Jamf's $4–$7, so the values are set in the CONFIG block at the top of the script instead.
Architecture
Script execution
Root (Mosyle default) — auto-detects the console user
Installation type
Per-user (~/.akto-endpoint-shield/)
Services
LaunchAgents (run as the user, not system-wide)
Auto-update
Manifest (latest.json) — devices update at next sign-in
Reinstall
FORCE_REINSTALL=true
Token storage
~/.akto-endpoint-shield/config/ (permissions 600)
Prerequisites
1. Akto credentials
AKTO_API_TOKEN— from the Akto platformAKTO_API_BASE_URL— your guardrails URL, e.g.https://<account_id>-guardrails.akto.io
2. MANIFEST_URL
Provided by Akto during onboarding. This is what enables auto-update: devices check it on each run to decide whether a newer version is available.
3. Mosyle admin access
Permissions to create and manage Custom Commands, device group assignments, and execution results.
4. Device enrolment
Target Macs must be enrolled and visible in your Mosyle dashboard, with internet access to the manifest and pkg hosts, to https://<account_id>-guardrails.akto.io, and to https://ultron.akto.io.
Set a custom device name and email
Before the Custom Command runs, you can stage an identity.json file on the device so it shows up in Akto with a specific device name and email instead of whatever hostname and username Mosyle reports. See Custom Device Name and Email.
install.sh configuration
install.sh reads its values from environment variables, falling back to the CONFIG block at the top of the script. Fill in these four before uploading:
MANIFEST_URL
Recommended
HTTPS URL to latest.json — this is what enables auto-update
AKTO_API_TOKEN
Yes
Your Akto API token
AKTO_API_BASE_URL
Yes
https://<account_id>-guardrails.akto.io
PKG_URL
Fallback
Direct HTTPS URL to the .pkg, used only if MANIFEST_URL is not set
FORCE_REINSTALL
No
true forces a reinstall even when the version already matches
All other values — hook flags, MCP wrap flags, TCC guard — can be left at their defaults; they are managed from the Akto dashboard after install.
Security note. The configured copy of install.sh contains a live token. Keep it in Mosyle or a secrets manager — do not commit it to version control.
Deployment
Request the artifacts from Akto
Contact support@akto.io for:
install.shanduninstall.shYour
MANIFEST_URLConfirmation of your
AKTO_API_TOKENandAKTO_API_BASE_URL
Fill in the CONFIG block as described above.
Configure execution settings
Open the Execution Settings tab and configure:
Execute command
Select: Immediately when saving the profile, upon assignment, or based on schedule or events
Execution trigger
Tick Every user sign-in ✅
Schedule
Always (Event Required) ✅

Leave all other options unchecked and click Save.
Monitor deployment
Go to Management → Custom Commands, select the profile, and click View Results:
Success — installation completed
Pending — awaiting user sign-in
Failed — see Troubleshooting

Background item approval (macOS 13+)
macOS 13 and later require every LaunchAgent label to be approved as a background item before launchd will start it. Without approval, a fully signed and notarized install can sit loaded but never running, with no logs.
Deploy a com.apple.servicemanagement configuration profile from Mosyle that pre-approves Akto's Team Identifier, so users are never prompted. Without that profile, each user must approve the agent manually under System Settings → General → Login Items & Extensions → Allow in the Background.
Contact Akto for the Team Identifier and a sample profile payload.
Verification
On a target Mac after the user has signed in:
check-config should print provisioned.
Checklist
Updating AI Endpoint Shield
With Every user sign-in + Always (Event Required), updates are automatic: Akto updates latest.json, and devices upgrade on the next sign-in. No change to the Custom Command is needed.
To force an immediate reinstall on all devices: edit the script in Mosyle, set FORCE_REINSTALL="true", save, and let it run — then set it back to false.
Uninstall
In Mosyle → Custom Commands → Add new profile
Paste the contents of
uninstall.sh(it takes no configuration)Name it
Akto Endpoint Shield - UninstallExecution Settings: trigger Every user sign-in, schedule Only once (Event Required)
Assign to the target devices
Remember to unassign the install profile first, or it will reinstall at the next sign-in.
Troubleshooting
Mosyle shows Failed
See the install log
tail -50 ~/.akto-endpoint-shield/logs/install.log and /var/log/akto-endpoint-shield-install.log
Neither PKG_URL, PKG_PATH, nor MANIFEST_URL is set
CONFIG block left empty
Set MANIFEST_URL in the script body
AKTO_API_TOKEN empty in the log
CONFIG block missing the token
Fill in AKTO_API_TOKEN and re-save the profile
No console user logged in
Command ran with nobody signed in
Expected — it retries at the next sign-in
Already at latest version — nothing to do
Manifest version matches the installed version
Expected. Set FORCE_REINSTALL="true" to override
Services show - instead of a PID
Token missing or invalid
Run check-config; check the install log
Services loaded but never start, no logs
macOS 13+ background item not approved
Manifest URL unreachable
Firewall or proxy
curl -I "$MANIFEST_URL" from the device
For device-level diagnosis, see macOS Troubleshooting. For EDR and antivirus exclusions, see Allowlist in Security Software.
File locations
/usr/local/bin/akto-endpoint-shield
Main binary
/Library/Application Support/Akto/
Asset bundle installed by the pkg (also where you stage identity.json, see Custom Device Name and Email)
~/Library/LaunchAgents/io.akto.akto-endpoint-shield.plist
HTTP proxy service
~/Library/LaunchAgents/io.akto.akto-endpoint-shield-agent.plist
Agent service
~/.akto-endpoint-shield/config/
Token + feature flags (permissions 600)
~/.akto-endpoint-shield/logs/install.log
Install log
/var/log/akto-endpoint-shield-install.log
Root-context install log
Related documentation
Get support
In-app Intercom in the Akto dashboard
Last updated

