Operators

Server setup

Configure capnis.one to serve MDM enrollment, device API, and the public agent APK.

1

Environment variables

Add to .env on the Laravel host (see .env.example):

.env
MDM_PUBLIC_BASE_URL=https://capnis.one
MDM_DPC_COMPONENT=com.capnis.mdm/.AdminReceiver
MDM_AGENT_APK=storage/app/mdm/mdm-agent.apk

MDM_PUBLIC_BASE_URL is embedded in enrollment QR payloads. MDM_DPC_COMPONENT must match the agent manifest. MDM_AGENT_APK is the path to the file served at /api/public/mdm-agent.apk.

2

Database

Artisan
php artisan migrate

MDM tables include devices, enrollment profiles, commands, managed apps, and groups.

3

Deploy agent APK

  1. Build release: cd apps/android/mdm-agent && .\gradlew.bat assembleRelease
  2. Copy signed APK to storage/app/mdm/mdm-agent.apk (or path set in MDM_AGENT_APK).
  3. Verify download: GET /api/public/mdm-agent.apk
  4. Current production version: 3.0.1 (versionCode 23), package com.capnis.mdm.
4

Cache & routes

After config or view changes
php artisan config:clear
php artisan route:clear
php artisan view:clear
5

Optional tuning

VariableDefaultPurpose
HEARTBEAT_TIMEOUT_MINUTES30Mark device offline
COMPLIANCE_OFFLINE_HOURS24Non-compliant threshold
DEVICE_AUTH_REQUIREDtrueHMAC on device API
APK_STORAGE_DIRstorage/app/mdm/apksManaged app uploads
6

Smoke test