Getting Started with WiLicensor
Get your license management server up and running in minutes.
Quick Start
1. Prerequisites
- Node.js 16+
- PostgreSQL 12+
- Gmail account (for email notifications)
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
- Go to
http://localhost:5000/register - Enter your details
- The first user automatically becomes an admin
First Steps
Create a Product
- Click Products in the navigation
- Click Add Product
- Enter:
- Product Name: Your application name
- Trial Days: Number of trial days (0 for no trial)
- Click Add Product
Create a License Key
- Click Keys in the navigation
- Click Add Key
- 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"
- Click Add Key
Integrate with Your Application
Use our client libraries to validate licenses:
- C# Client - For .NET applications
- Python Client - For Python applications
- JavaScript Client - For Node.js/browser
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?
- Click the ? button on any page for contextual help
- Check the Troubleshooting Guide
- Review the Documentation Index