Licensor

Getting Started with WiLicensor

Get your license management server up and running in minutes.

Quick Start

1. Prerequisites

2. Installation

# Clone the repository
git clone https://github.com/yourusername/License-Server.git
cd License-Server

# Install dependencies
npm install

3. Configuration

Create a .env file in the root directory:

# Database
DATABASE_URL=postgres://user:password@localhost:5432/wilicensor

# Session
SESSION_SECRET=your-secret-key-here

# Email (Gmail)
GMAIL_USER=your-email@gmail.com
GMAIL_APP_PASSWORD=your-app-password

Generate a secure session secret:

npm run secret

4. Start the Server

# Development
npm run dev

# Production
npm start

Visit http://localhost:5000 in your browser.

5. Create First Admin

  1. Go to http://localhost:5000/register
  2. Enter your details
  3. The first user automatically becomes an admin

First Steps

Create a Product

  1. Click Products in the navigation
  2. Click Add Product
  3. Enter:
    • Product Name: Your application name
    • Trial Days: Number of trial days (0 for no trial)
  4. Click Add Product

Create a License Key

  1. Click Keys in the navigation
  2. Click Add Key
  3. Fill in the details:
    • Key: Leave blank to auto-generate, or enter a specific key
    • Type: trial, lifetime, or subscription
    • Product: Select your product
    • Email: Customer's email
    • Condition: Set to "purchased" or "activated"
  4. Click Add Key

Integrate with Your Application

Use our client libraries to validate licenses:

Basic API example:

# Check a license key
curl "http://localhost:5000/api/check?term=LICENSE_KEY"

# Generate a trial key
curl "http://localhost:5000/api/gen?product=MyApp&machineId=abc123&machineName=PC&email=user@example.com"

Common Tasks

Managing Licenses

Task Location
View all licenses Keys page
Edit a license Click Edit button on key row
Deactivate a license Set Condition to "deactivated"
Extend a license Edit the End date

Settings

Setting Description
Auto-add Unknown Product Automatically create products when API requests unknown products
Machine Changes Per Day Limit how often a license can change machines
Theme Light or dark mode

Next Steps

Need Help?


Back to Documentation