### Copy environment example file Source: https://www.intuneget.com/docs/docker Copies the example environment file to .env.local for configuration. ```bash cp .env.example .env.local ``` -------------------------------- ### Start, view logs, and stop with Docker Compose Source: https://www.intuneget.com/docs/docker Commands to start IntuneGet in detached mode, view logs, and stop the containers. ```bash # Start in detached mode docker-compose up -d # View logs docker-compose logs -f # Stop docker-compose down ``` -------------------------------- ### Install and run IntuneGet packager as a Windows service with NSSM Source: https://www.intuneget.com/docs/getting-started Use this PowerShell script (run as Administrator) to install the IntuneGet packager as a Windows service using NSSM. It requires Chocolatey to install NSSM, and sets environment variables for the API URL, API key, and Azure credentials. Start the service with nssm start. ```powershell # Install NSSM (Non-Sucking Service Manager) choco install nssm # Create a service nssm install IntuneGetPackager "C:\Program Files\nodejs\node.exe" nssm set IntuneGetPackager AppParameters "C:\Users\\AppData\Roaming\npm\node_modules\@ugurkocde\intuneget-packager\dist\index.js" nssm set IntuneGetPackager AppDirectory "C:\" nssm set IntuneGetPackager AppEnvironmentExtra "INTUNEGET_API_URL=http://your-server:3000" "PACKAGER_API_KEY=xxx" "AZURE_CLIENT_ID=xxx" "AZURE_CLIENT_SECRET=xxx" # Start the service nssm start IntuneGetPackager ``` -------------------------------- ### Clone, configure, and start IntuneGet with Docker Compose Source: https://www.intuneget.com/docs/docker Use this snippet to clone the IntuneGet repository, copy the environment template, and start the application with Docker Compose. The compose command uses --env-file .env.local to read environment variables. The application will be available at http://localhost:3000. Docker Compose defaults to DATABASE_MODE=supabase; SQLite is supported for limited features. ```bash # Clone your fork (or the main repo) git clone https://github.com/YOUR_USERNAME/IntuneGet.git cd IntuneGet # Copy and configure environment cp .env.example .env.local # Edit .env.local with your values # (Use your favorite editor) # Start the application (Compose reads .env.local only via --env-file) docker-compose --env-file .env.local up -d ``` -------------------------------- ### Deploy with Docker using Docker Compose Source: https://www.intuneget.com/docs/getting-started Clone the IntuneGet repository, configure environment variables, and start the service with Docker Compose. Requires a configured .env.local file with database, packager, and Azure AD settings. ```bash # Clone the repository git clone https://github.com/ugurkocde/IntuneGet.git cd IntuneGet # Copy and configure environment cp .env.example .env.local # Edit .env.local with these values: # DATABASE_MODE=sqlite # DATABASE_PATH=/data/intuneget.db # PACKAGER_MODE=local # PACKAGER_API_KEY= # NEXT_PUBLIC_AZURE_AD_CLIENT_ID= # AZURE_CLIENT_SECRET= # NEXT_PUBLIC_URL=http://localhost:3000 # Start with Docker Compose docker-compose up -d ``` -------------------------------- ### Configure environment variables in .env.local Source: https://www.intuneget.com/docs/docker Example .env.local file with required environment variables for SQLite mode, local packager, Entra ID, and application URL. ```bash # Database (SQLite mode for self-hosting) DATABASE_MODE=sqlite DATABASE_PATH=/data/intuneget.db # Local Packager PACKAGER_MODE=local PACKAGER_API_KEY=your-secure-random-key # Entra ID NEXT_PUBLIC_AZURE_AD_CLIENT_ID=your-client-id AZURE_CLIENT_SECRET=your-client-secret # Application URL NEXT_PUBLIC_URL=http://localhost:3000 ``` -------------------------------- ### Check container logs with docker-compose logs Source: https://www.intuneget.com/docs/docker Command to view logs for the IntuneGet container, useful when the container fails to start. ```bash docker-compose logs -f ``` -------------------------------- ### GET /api/package Source: https://www.intuneget.com/docs/inventory-reports-uploads Lists packaging jobs by user or fetches one job. ```APIDOC ## GET /api/package ### Description Lists packaging jobs by user or fetches one job. ### Method GET ### Endpoint /api/package ### Parameters #### Query Parameters - **user** (string) - Optional - User scope for listing jobs. - **id** (string) - Optional - Job ID to fetch a specific job. ### Response #### Success Response (200) - List of packaging jobs or a single job. #### Response Example ```json [ { "id": "string", "status": "active | completed | failed" } ] ``` ``` -------------------------------- ### GET /api/intune/apps Source: https://www.intuneget.com/docs/inventory-reports-uploads Retrieves a list of Intune Win32 apps for the inventory dashboard. Supports search, sort, and grid/list view. ```APIDOC ## GET /api/intune/apps ### Description Retrieves a list of Intune Win32 apps for the inventory dashboard. ### Method GET ### Endpoint /api/intune/apps ### Response #### Success Response (200) - List of Intune Win32 apps with assignment information and intent types. #### Response Example ```json [ { "id": "string", "name": "string", "assignments": [ { "intent": "Required | Available | Uninstall | Update Only" } ] } ] ``` ``` -------------------------------- ### GET /api/intune/apps/[id] Source: https://www.intuneget.com/docs/inventory-reports-uploads Retrieves details for a specific Intune Win32 app, including assignment information and intent types. ```APIDOC ## GET /api/intune/apps/[id] ### Description Retrieves details for a specific Intune Win32 app. ### Method GET ### Endpoint /api/intune/apps/[id] ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the app. ### Response #### Success Response (200) - App details including assignment information and intent types. #### Response Example ```json { "id": "string", "name": "string", "assignments": [ { "intent": "Required | Available | Uninstall | Update Only" } ] } ``` ``` -------------------------------- ### Webhook payload data structure Source: https://www.intuneget.com/docs/settings Example JSON payload showing the machine-readable 'data' object included in every webhook, containing event details, tenant info, summary, and update list. ```json { "data": { "event": "app_updates_available", "timestamp": "2026-06-25T12:40:07Z", "tenant_id": "00000000-0000-0000-0000-000000000000", "tenant_name": "Contoso", "summary": { "total": 1, "critical": 0 }, "updates": [ { "displayName": "Notepad++", "wingetId": "Notepad++.Notepad++", "intuneAppId": "11111111-1111-1111-1111-111111111111", "fromVersion": "8.9.4", "toVersion": "8.9.6", "isCritical": false } ] } } ``` -------------------------------- ### GET /api/sccm/migrations Source: https://www.intuneget.com/docs/sccm-migration Lists migrations, retrieves a single migration, or gets migration stats. This endpoint is used to view the status and details of migrations. ```APIDOC ## GET /api/sccm/migrations ### Description List migrations, single migration, or stats. ### Method GET ### Endpoint /api/sccm/migrations ### Parameters No parameters documented. ### Request Example No request body documented. ### Response No response schema documented. ``` -------------------------------- ### GET /api/updates/history Source: https://www.intuneget.com/docs/updates-policies Read auto-update history and statuses. ```APIDOC ## GET /api/updates/history ### Description Read auto-update history and statuses. ### Method GET ### Endpoint /api/updates/history ``` -------------------------------- ### GET /api/analytics/export Source: https://www.intuneget.com/docs/inventory-reports-uploads Exports analytics data in CSV format. ```APIDOC ## GET /api/analytics/export ### Description Exports analytics data in CSV format. ### Method GET ### Endpoint /api/analytics/export ### Parameters #### Query Parameters - **dateRange** (string) - Optional - Preset date range: 7, 30, 90, 365 days. ### Response #### Success Response (200) - CSV file containing analytics data. ``` -------------------------------- ### Configure SQLite with environment variables in .env.local Source: https://www.intuneget.com/docs/database-setup Set DATABASE_MODE to 'sqlite' to enable self-hosted mode. Optionally set DATABASE_PATH to a custom location; default is './data/intuneget.db'. ```bash # Enable SQLite mode DATABASE_MODE=sqlite # Optional: Custom database path DATABASE_PATH=/data/intuneget.db ``` -------------------------------- ### Docker Compose configuration for IntuneGet Source: https://www.intuneget.com/docs/docker Production-ready docker-compose.yml with SQLite persistence, healthcheck, and volume for data persistence. ```yaml version: '3.8' services: intuneget: build: context: . dockerfile: Dockerfile ports: - "3000:3000" environment: - DATABASE_MODE=sqlite - DATABASE_PATH=/data/intuneget.db - PACKAGER_MODE=local - PACKAGER_API_KEY=${PACKAGER_API_KEY} - NEXT_PUBLIC_AZURE_AD_CLIENT_ID=${NEXT_PUBLIC_AZURE_AD_CLIENT_ID} - AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} - NEXT_PUBLIC_URL=${NEXT_PUBLIC_URL} volumes: - intuneget-data:/data restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s volumes: intuneget-data: ``` -------------------------------- ### Automated daily backup with cron Source: https://www.intuneget.com/docs/database-setup Add a cron job to copy the database daily at 2am. The date is appended to the backup filename. ```bash # Add to crontab (daily at 2am) 0 2 * * * cp /data/intuneget.db /backups/intuneget-$(date +\%Y\%m\%d).db ``` -------------------------------- ### Restore SQLite database from backup Source: https://www.intuneget.com/docs/database-setup Stop the container, replace the database file, and restart. Ensure the container is stopped before copying to avoid corruption. ```bash # Stop the container first docker-compose down # Replace the database file cp ./backup-20240115.db /path/to/data/intuneget.db # Restart docker-compose up -d ``` -------------------------------- ### Update IntuneGet deployment with git and docker-compose Source: https://www.intuneget.com/docs/docker Commands to pull the latest changes, rebuild the Docker containers without cache, and restart the deployment. Run these from the project root. ```bash # Pull latest changes git pull origin main # Rebuild and restart docker-compose down docker-compose build --no-cache docker-compose up -d ``` -------------------------------- ### GET /api/analytics Source: https://www.intuneget.com/docs/inventory-reports-uploads Retrieves analytics data for reports, including summary cards, trend chart, top apps, and recent failures. Supports date range presets. ```APIDOC ## GET /api/analytics ### Description Retrieves analytics data for reports, including summary cards, trend chart, top apps, and recent failures. ### Method GET ### Endpoint /api/analytics ### Parameters #### Query Parameters - **dateRange** (string) - Optional - Preset date range: 7, 30, 90, 365 days. ### Response #### Success Response (200) - Summary cards, trend chart data, top apps, and recent failures. #### Response Example ```json { "summary": {}, "trend": [], "topApps": [], "recentFailures": [] } ``` ``` -------------------------------- ### Set Environment Variables for Local Packager on Windows Source: https://www.intuneget.com/docs/getting-started Set environment variables for the IntuneGet packager on Windows, including API URL, packager API key, and Azure credentials. Must match the web app's API key. ```bash set INTUNEGET_API_URL=http://your-docker-host:3000 set PACKAGER_API_KEY= set AZURE_CLIENT_ID= set AZURE_CLIENT_SECRET= ``` -------------------------------- ### POST /api/package Source: https://www.intuneget.com/docs/inventory-reports-uploads Queues package jobs. ```APIDOC ## POST /api/package ### Description Queues package jobs. ### Method POST ### Endpoint /api/package ### Request Body - **jobDetails** (object) - Required - Details of the package job to queue. ### Request Example ```json { "jobDetails": {} } ``` ### Response #### Success Response (200) - Confirmation that the job was queued. ``` -------------------------------- ### Inspect SQLite database with sqlite3 CLI Source: https://www.intuneget.com/docs/database-setup Open the database and run common queries to list tables and view jobs, including filtering for failed jobs. ```bash # Using sqlite3 CLI sqlite3 /data/intuneget.db # Common queries .tables # List all tables SELECT * FROM packaging_jobs; # View all jobs SELECT * FROM packaging_jobs WHERE status = 'failed'; # View failed jobs ``` -------------------------------- ### Clone the IntuneGet repository Source: https://www.intuneget.com/docs/docker Clones the IntuneGet repository from GitHub and changes into the project directory. ```bash git clone https://github.com/YOUR_USERNAME/IntuneGet.git cd IntuneGet ``` -------------------------------- ### Verify deployment with container status and health endpoint Source: https://www.intuneget.com/docs/docker Commands to check container status and test the health endpoint. ```bash # Check container status docker-compose ps # Test health endpoint curl http://localhost:3000/api/health ``` -------------------------------- ### Verify write permissions in /data directory Source: https://www.intuneget.com/docs/docker Command to list the /data directory inside the running container to check write permissions, relevant for database errors. ```bash docker exec intuneget ls -la /data ``` -------------------------------- ### Docker Compose configuration for SQLite with volume mount Source: https://www.intuneget.com/docs/database-setup Defines a Docker service for IntuneGet with SQLite mode, environment variables, and a volume to persist the database at /data. Mounting a volume is required to avoid data loss on container recreation. ```yaml version: '3.8' services: intuneget: build: . ports: - "3000:3000" environment: - DATABASE_MODE=sqlite - DATABASE_PATH=/data/intuneget.db - PACKAGER_MODE=local - PACKAGER_API_KEY=${PACKAGER_API_KEY} volumes: - intuneget-data:/data restart: unless-stopped volumes: intuneget-data: ``` -------------------------------- ### Caddy reverse proxy configuration with automatic SSL Source: https://www.intuneget.com/docs/docker Caddyfile that reverse proxies to localhost:3000 and automatically provisions and renews SSL certificates from Let's Encrypt. ```text intuneget.yourdomain.com { reverse_proxy localhost:3000 } ``` -------------------------------- ### Backup SQLite database from Docker host or volume Source: https://www.intuneget.com/docs/database-setup Copy the SQLite database file to create a backup. Use docker cp for containers or cp for volume mounts. ```bash # From Docker host docker cp intuneget-intuneget-1:/data/intuneget.db ./backup-$(date +%Y%m%d).db # Or if using a volume mount cp /path/to/data/intuneget.db ./backup-$(date +%Y%m%d).db ``` -------------------------------- ### Pull latest changes and rebuild deployment Source: https://www.intuneget.com/docs/docker Command to update IntuneGet to the latest version by pulling changes and rebuilding the Docker containers. ```bash git pull && docker-compose up -d --build ``` -------------------------------- ### POST/PATCH /api/sccm/migrate Source: https://www.intuneget.com/docs/sccm-migration Previews or executes migration and updates per-app settings. This endpoint is used to run the migration and manage app-level settings. ```APIDOC ## POST/PATCH /api/sccm/migrate ### Description Preview/execute migration and update per-app settings. ### Method POST, PATCH ### Endpoint /api/sccm/migrate ### Parameters No parameters documented. ### Request Example No request body documented. ### Response No response schema documented. ``` -------------------------------- ### Check runtime configuration in browser console Source: https://www.intuneget.com/docs/docker JavaScript command to run in the browser console to confirm the client ID is being injected at runtime, relevant for the AADSTS900144 error. ```javascript window.__RUNTIME_CONFIG__ ``` -------------------------------- ### Update Environment Variables in .env.local Source: https://www.intuneget.com/docs/github-setup Set the required environment variables for GitHub Actions integration. GITHUB_OWNER and GITHUB_REPO must match your fork, GITHUB_PAT is your personal access token with repo and workflow scopes, and CALLBACK_SECRET must match the secret configured in GitHub. ```bash GITHUB_OWNER=your-github-username GITHUB_REPO=IntuneGet GITHUB_PAT=ghp_your-personal-access-token CALLBACK_SECRET=same-secret-as-in-github ``` -------------------------------- ### GET/POST/PATCH /api/sccm/match Source: https://www.intuneget.com/docs/sccm-migration Reads, runs, and adjusts matching state. This endpoint is used to manage the automatic matching of SCCM apps to IntuneGet apps. ```APIDOC ## GET/POST/PATCH /api/sccm/match ### Description Read, run, and adjust matching state. ### Method GET, POST, PATCH ### Endpoint /api/sccm/match ### Parameters No parameters documented. ### Request Example No request body documented. ### Response No response schema documented. ``` -------------------------------- ### Generate Secure API Key with openssl Source: https://www.intuneget.com/docs/getting-started Run this command in your terminal to generate a secure random API key. The output is a 32-byte hexadecimal string used for the PACKAGER_API_KEY environment variable. ```bash openssl rand -hex 32 ``` -------------------------------- ### POST /api/package/callback Source: https://www.intuneget.com/docs/inventory-reports-uploads Pipeline status callback updates. ```APIDOC ## POST /api/package/callback ### Description Pipeline status callback updates. ### Method POST ### Endpoint /api/package/callback ### Request Body - **status** (string) - Required - The status update from the pipeline. ### Request Example ```json { "status": "string" } ``` ### Response #### Success Response (200) - Confirmation that the callback was received. ```