Open Source · Self-Hosted · Free

License Management
Built for Developers

A complete self-hosted platform for license key management, user authentication, session control, OTA updates, and app distribution — all in one lightweight PHP server.

Get Started API Reference Admin Panel
15+
API Endpoints
2
Auth Systems
OTA
Update System
0
Dependencies
SQLite
Zero-Config DB

Everything You Need to Protect & Manage Your Apps

Built-in systems for licensing, authentication, real-time sessions, OTA updates, and a complete admin panel.

License Key System

Generate, activate, and manage license keys with support for time-based expiry (days, weeks, months), lifetime keys, HWID binding, multi-device limits, pause/resume, and batch generation.

Account-Based Auth

Full user account system with username/password authentication, registration, expiry management, HWID binding, and profile management — perfect for SaaS-style apps.

Real-Time Sessions

Track active sessions with heartbeat monitoring, auto-cleanup of dead sessions, device-level control, and forced logout capabilities.

OTA Update System

Distribute updates to your apps with version checking, file manifests (add/update/delete actions), mandatory update flags, ZIP download, and changelog management.

Multi-Tenant Admin

Superadmin manages all apps; Developers can create and manage multiple applications. Developer self-registration with multi-app support. Full SPA admin panel included.

Security Built-In

JWT authentication, bcrypt password hashing, IP-based rate limiting, app secret validation, CORS control, and comprehensive audit logging for every action.

Built For Any App Type

Whether you're building desktop software, mobile apps, or SaaS platforms.

Desktop Apps

License key activation with HWID binding and OTA updates for Windows/macOS/Linux apps.

Mobile Apps

Account-based logins with device limits, session control, and push-style update checks.

SaaS / Web

User account management with plan types, expiry dates, and real-time session monitoring.

Bots & Tools

Quick license validation for CLI tools, automation bots, and scripts with minimal overhead.

Full REST API Reference

All endpoints accept/return JSON with X-App-Secret header authentication for client endpoints.

Authentication

POST /api/auth/login.php License key login with HWID binding

Headers

HeaderValue
X-App-SecretYour app's secret key

Request Body

{
  "license_key": "XXXXX-XXXXX-XXXXX-XXXXX",
  "hwid": "unique-device-id"
}

Response

{
  "success": true,
  "session_id": "uuid",
  "license": {
    "key_type": "months",
    "expires_at": "2026-04-18T00:00:00Z",
    "days_remaining": 30,
    "max_devices": 1
  },
  "app": {
    "app_name": "My App",
    "current_version": "1.0.0",
    "login_message": "Welcome!"
  }
}
POST /api/auth/account-login.php Account-based user login

Request Body

{
  "username": "user1",
  "password": "pass123",
  "hwid": "device-id"
}

Response

{
  "success": true,
  "session_id": "uuid",
  "user": {
    "username": "user1",
    "key_type": "months",
    "expires_at": "2026-04-18T00:00:00Z",
    "days_remaining": 30
  }
}
POST /api/auth/heartbeat.php Keep session alive

Request Body

{
  "session_id": "your-session-id"
}

Response

{
  "success": true,
  "message": "Heartbeat received"
}
POST /api/auth/logout.php End current session

Request Body

{
  "session_id": "your-session-id"
}

OTA Updates

POST /api/update/validate.php Validate license without login

Request Body

{
  "license_key": "XXXXX-XXXXX-XXXXX-XXXXX"
}

Response

{
  "success": true,
  "valid": true,
  "license": {
    "key_type": "months",
    "status": "active",
    "expires_at": "2026-04-18T00:00:00Z",
    "days_remaining": 30
  }
}
POST /api/update/check.php Check for new version & file manifest

Request Body

{
  "current_version": "1.0.0"
}

Response (update available)

{
  "success": true,
  "update_available": true,
  "update": {
    "version": "2.0.0",
    "changelog": "New features...",
    "is_mandatory": false,
    "file_size": 5242880,
    "download_url": "api/update/download.php?v=2.0.0",
    "files": [
      { "file_name": "app.exe",    "file_size": 5242880, "action": "update" },
      { "file_name": "module.dll", "file_size": 2048,    "action": "add" },
      { "file_name": "old.dll",    "file_size": 0,       "action": "delete" }
    ]
  }
}
GET /api/update/download.php?v=2.0.0 Download update ZIP file

Response

Returns binary ZIP file with Content-Type: application/zip headers. The download is logged in the audit trail.

Data Endpoints

GET /api/auth/slides.php Get app slides/banners

Response

{
  "success": true,
  "slides": [
    { "image_url": "...", "line1": "...", "line2": "...", "sort_order": 1 }
  ]
}
GET /api/auth/status.php App health & maintenance status

Response

{
  "success": true,
  "status": "online",
  "maintenance_mode": false,
  "current_version": "1.0.0"
}

Admin API (requires JWT)

POST /api/admin/register.php Developer self-registration

Request Body

{
  "username": "my_company",
  "password": "securepass",
  "email": "[email protected]"
}

Response

{
  "success": true,
  "token": "eyJhbGciOi...",
  "admin": { "id": 5, "username": "my_company", "role": "app_admin", "app_id": null },
  "message": "Registration successful. Create your first app to get started."
}
POST /api/admin/login.php Admin login → JWT token
{
  "username": "admin",
  "password": "admin123"
}
GET /api/admin/{resource}.php Full CRUD: keys, accounts, apps, slides, updates, logs, admins

All admin resources support GET (list/detail), POST (create), PUT (update), DELETE (remove).
Requires Authorization: Bearer <JWT> header. App admins are automatically scoped to their own app.

Available Resources

EndpointDescription
dashboard.phpStats overview (keys, sessions, accounts, apps)
keys.phpLicense key management + batch generate
accounts.phpUser account CRUD + actions (ban, pause, reset)
apps.phpApplication management (superadmin)
slides.phpIn-app slide/banner management
updates.phpOTA update management + ZIP upload
sessions.phpSession monitoring + force disconnect
logs.phpAudit log viewer with filters
admins.phpApp admin management (superadmin)

Get Started in 3 Minutes

From zero to a fully working license server — no external dependencies required.

1

Deploy the Server

Copy the pwf-license-server folder to your PHP hosting (Apache/Nginx + PHP 8.0+). No Composer, no npm, no database setup — SQLite auto-initializes on first request.

# Just copy the files — that's it!
/your-web-root/
  └── pwf-license-server/
        ├── admin/        # Admin panel SPA
        ├── api/          # REST API endpoints
        ├── includes/     # Core PHP files
        └── index.php     # This page
2

Register as a Developer

Visit the Admin Panel and click "Register as Developer". This creates your developer account. After logging in, go to "My Apps" to create your first application and get your App Secret.

# Or register via API:
curl -X POST http://your-domain/api/admin/register.php \
  -H "Content-Type: application/json" \
  -d '{
    "username": "my_company",
    "password": "secure_password",
    "email": "[email protected]"
  }'
3

Generate License Keys

From the admin panel, go to License Keys"Generate Keys". Choose key type (days/weeks/months/lifetime), duration, and number of keys. Or create User Accounts for account-based auth.

# Generate keys via API:
curl -X POST your-domain/api/admin/keys.php \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "app_id": "your-app-uuid",
    "key_type": "months",
    "duration_value": 1,
    "count": 10
  }'
4

Integrate in Your App

Use simple HTTP requests from any language. Here's how a client app authenticates:

# Login with a license key:
curl -X POST your-domain/api/auth/login.php \
  -H "X-App-Secret: YOUR_APP_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "license_key": "XXXXX-XXXXX-XXXXX-XXXXX",
    "hwid": "unique-device-id"
  }'

# Check for updates:
curl -X POST your-domain/api/update/check.php \
  -H "X-App-Secret: YOUR_APP_SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "current_version": "1.0.0" }'

Simple Tech Stack

No heavy frameworks. No complicated setup. Just PHP and SQLite.

PHP 8.0+
SQLite (PDO)
JWT (HS256)
bcrypt
SPA Admin
REST API

Ready to Get Started?

Register as a developer and start protecting your apps in minutes.

Open Admin Panel