FAQ - Frequently Asked Questions
Common questions and answers about CyberLicense, the software license management system.
🚀 Installation and Setup
What are the system requirements?
- Node.js: Version 18 or higher
- MongoDB: Version 4.4 or higher (local installation or MongoDB Atlas cloud)
- RAM: Minimum 512MB (recommended 1GB+ for production)
- Operating System: Windows, Linux, or macOS
- Disk Space: At least 100MB for the application and dependencies
How do I install CyberLicense?
- Ensure you have Node.js 18+ and MongoDB installed
- Clone or download the project files
- Run
npm installto install dependencies - Configure
config.ymlwith your MongoDB connection string - Run
npm run devfor development ornpm startfor production - Access the admin dashboard at
http://localhost:3000/admin
How do I configure MongoDB?
You can use either a local MongoDB instance or MongoDB Atlas (cloud).
Local MongoDB:
mongodb:
uri: "mongodb://127.0.0.1:27017/cyberlicense"
dbName: "cyberlicense"
MongoDB Atlas (Cloud):
mongodb:
uri: "mongodb+srv://username:password@cluster.mongodb.net/cyberlicense?retryWrites=true&w=majority"
dbName: "cyberlicense"
Note: For production, use environment variables to store sensitive credentials:
MONGODB_URI=mongodb+srv://...
What port does CyberLicense use?
By default, CyberLicense runs on port 3000. You can change this in config.yml:
server:
port: 3000 # Change to your desired port
Or use the PORT environment variable:
PORT=8080 npm start
🔐 Security and Authentication
How does admin authentication work?
CyberLicense uses Discord OAuth 2.0 for admin authentication:
- Admins log in via Discord OAuth
- The system verifies if the Discord user is configured as an admin in the database
- If authorized, a session is created and the admin can access the dashboard
- Sessions are stored in MongoDB and expire after 24 hours (configurable)
To add an admin:
- The Discord user ID must be added to the
Admincollection in MongoDB - Alternatively, the first user to log in via Discord may be automatically granted admin access (depending on configuration)
How do I enable two-factor authentication (2FA)?
- Log in to the admin dashboard
- Navigate to Settings → Security → 2FA
- Click Enable 2FA
- Scan the QR code with Google Authenticator, Authy, or any TOTP app
- Enter the verification token to confirm and enable 2FA
- Important: Save the backup codes in a secure location!
How can I protect my APIs?
Multiple security features are available:
- Rate Limiting: Configure in
config.ymlto limit requests per IP - JWT Tokens: Use JWT tokens for public API authentication
- CORS: Configure CORS to limit allowed origins
- Panic Mode: Emergency feature to disable all public APIs instantly
- IP Whitelisting: Restrict API access to specific IPs (requires custom configuration)
Example rate limiting configuration:
api:
rateLimit:
enabled: true
windowMs: 900000 # 15 minutes
max: 200 # 200 requests per window
What is Panic Mode?
Panic Mode is an emergency security feature that:
- Disables all public APIs (returns 503 Service Unavailable)
- Blocks license validation requests
- Keeps only the admin dashboard accessible
- Can be enabled instantly in
config.ymlor via environment variable
Enable Panic Mode:
security:
panicMode: true
Or set the environment variable:
PANIC_MODE=true npm start
📋 License Management
What types of licenses can I create?
CyberLicense supports 4 types of licenses:
- Fixed - License with fixed duration (e.g., 30 days, 1 year, lifetime)
- Trial - Temporary trial license with optional automatic conversion to full license
- Consumption - Credit/usage-based license (credits decrease with each use)
- Enterprise - Team license with multiple users and role management
How do IP and HWID limits work?
- IP Limit: Maximum number of different IP addresses that can use the license
- HWID Limit: Maximum number of different hardware IDs that can use the license
When a limit is exceeded:
- License validation fails automatically
- A violation is recorded
- The admin is notified (if notifications are enabled)
- Automated actions can be triggered (e.g., suspend or revoke license)
Example: If ipLimit: 1 and hwidLimit: 1, the license can only be used from one IP address and one hardware ID.
How do I manage expired licenses?
Expired licenses can be:
- Renewed manually from the admin dashboard (extend expiration date)
- Renewed automatically via payment webhooks (Stripe, BuiltByBit)
- Converted from trial to fixed license if auto-conversion is enabled
- Suspended automatically using automated actions
How do I temporarily suspend a license?
- Go to the admin dashboard
- Navigate to Licenses → Select the license
- Click Edit or Suspend
- Set
suspended: trueand optionally add a reason - The license will remain in the database but cannot be validated until reactivated
What are Master/Child licenses?
Master/Child licenses allow you to create a parent license with multiple child licenses:
- Master License: Parent license that controls child licenses
- Child Licenses: Sub-licenses linked to the master license
- Useful for resellers or team licenses where you want to distribute licenses to multiple users
🔔 Notifications
How do I configure email notifications?
Configure SMTP settings in config.yml:
notifications:
email:
enabled: true
host: "smtp.gmail.com"
port: 587
secure: false # true for 465, false for other ports
user: "your-email@gmail.com"
password: "your-app-password" # Use App Password for Gmail
from: "noreply@yourdomain.com"
For Gmail:
- Enable 2-Step Verification
- Generate an "App Password" in your Google Account settings
- Use the App Password instead of your regular password
What events trigger notifications?
You can receive notifications for:
- License expiration warnings
- License violations (IP/HWID limit exceeded)
- Detected anomalies (suspicious activity)
- Security events (failed login attempts)
- Completed transactions
- Automated action executions
- Custom events (via API)
How do I enable SMS or Telegram notifications?
SMS (Twilio/Vonage):
notifications:
sms:
enabled: true
provider: "twilio" # or "vonage"
apiKey: "your-api-key"
apiSecret: "your-api-secret"
Telegram:
notifications:
telegram:
enabled: true
botToken: "your-bot-token" # Get from @BotFather
chatId: "your-chat-id" # Your Telegram chat ID
📊 Reports and Analytics
How do I export license data?
Via Admin Dashboard:
- Go to Export → Licenses
- Select format (CSV or PDF)
- Apply filters if needed
- Click Export
Via API:
- CSV:
GET /api/export/licenses/csv - PDF:
GET /api/export/licenses/pdf
See the API Reference for details.
What statistics are available?
- Total number of licenses (active, inactive, expired, suspended)
- Licenses by type (fixed, trial, consumption, enterprise)
- Usage statistics (IP addresses, HWIDs per license)
- Revenue tracking (if Stripe/BuiltByBit is configured)
- Validation request statistics
- Geographic statistics (if geolocation is enabled)
🔄 Integrations
How do I integrate Discord?
- Create a Discord application at https://discord.com/developers/applications
- Go to OAuth2 and get Client ID and Client Secret
- Set redirect URI:
http://localhost:3000/auth/discord/callback - Configure in
config.yml:
integrations:
discord:
clientId: "YOUR_CLIENT_ID"
clientSecret: "YOUR_CLIENT_SECRET"
enabled: true
- Add your Discord user ID to the
Admincollection in MongoDB
How do I integrate BuiltByBit?
- Get your webhook secret from BuiltByBit
- Configure in
config.yml:
integrations:
builtByBit:
webhookSecret: "your-webhook-secret"
enabled: true
- Set up webhook endpoints on BuiltByBit to point to:
https://yourdomain.com/api/builtbybit
How do I integrate Stripe for payments?
- Get your Stripe API keys from https://dashboard.stripe.com/apikeys
- Configure in
config.yml:
revenue:
stripe:
apiKey: "sk_live_..." # or sk_test_... for testing
webhookSecret: "whsec_..." # Get from Stripe webhook settings
enabled: true
Note: Stripe integration is not currently implemented in the API. Revenue tracking can be done through the admin dashboard and export features.
🛠️ Troubleshooting
The server doesn't start. What do I do?
-
Check MongoDB connection:
- Verify MongoDB is running:
mongoshormongo - Check the connection string in
config.yml - Test connection:
mongosh "your-connection-string"
- Verify MongoDB is running:
-
Check port availability:
- Verify port 3000 (or your configured port) is not in use
- Change port in
config.ymlif needed
-
Check logs:
- Look for specific error messages in the console
- Enable debug logging:
logging:
level: "debug"
format: "text"
- Check Node.js version:
- Ensure Node.js 18+ is installed:
node --version - Update if necessary
- Ensure Node.js 18+ is installed:
Licenses are not being validated. Why?
Common causes:
- License not active: Check if
active: truein the database - License suspended: Check if
suspended: true - License expired: Check
expiresAtdate - IP/HWID limit exceeded: Check
usedIpsandusedHwidsarrays - Invalid license key: Verify the key matches exactly (case-sensitive)
- Panic mode enabled: Check
security.panicModein config
Check API logs for specific error messages.
Email notifications are not working. How do I fix it?
- Verify SMTP credentials in
config.yml - For Gmail:
- Use an "App Password" instead of your regular password
- Enable "Less secure app access" (if still available) or use OAuth2
- Check firewall: Ensure SMTP ports (587, 465) are not blocked
- Test connection: Use a tool like
nodemailerto test SMTP settings - Check logs: Look for specific error messages in the logs
How do I enable debug mode?
Modify config.yml:
logging:
level: "debug" # instead of "info"
format: "text" # instead of "json" (easier to read)
Or set environment variable:
LOG_LEVEL=debug npm start
🔐 Advanced Security
How do I enable audit logging?
Audit logging is enabled by default. It automatically records:
- All admin actions (create, update, delete)
- License creation/modification/deletion
- Login/logout events
- Data export/import
- Security events (failed logins, violations)
View audit logs:
- Admin Dashboard: Audit Logs section
- API:
GET /api/audit
How do I configure rate limiting?
Configure in config.yml:
api:
rateLimit:
enabled: true
windowMs: 900000 # Time window in milliseconds (15 minutes)
max: 200 # Maximum requests per window
Customize per route:
- Rate limiting is applied globally to
/apiroutes - You can create custom rate limiters for specific routes if needed
How do I secure my API keys and secrets?
Best practices:
-
Use environment variables for sensitive data:
export MONGODB_URI="mongodb+srv://..."
export DISCORD_CLIENT_SECRET="..."
export JWT_SECRET="..." -
Don't commit secrets to version control:
- Add
config.ymlto.gitignoreif it contains secrets - Use a
.envfile (and add to.gitignore)
- Add
-
Rotate secrets regularly:
- Change JWT secrets periodically
- Rotate API keys if compromised
📈 Performance and Scalability
How many licenses can CyberLicense handle?
CyberLicense can handle thousands of licenses simultaneously. Performance depends on:
- MongoDB performance: Use MongoDB Atlas for better performance
- Available RAM: More RAM = better performance
- Server configuration: CPU and network speed
- Database indexes: Ensure proper indexes are created
Recommended for production:
- MongoDB Atlas (cloud) with appropriate tier
- At least 2GB RAM
- Proper database indexing
- Load balancer for high traffic
How do I improve performance?
- Use MongoDB Atlas (cloud) for better database performance
- Enable database indexes for frequent queries
- Increase rate limiting if needed (but be careful of abuse)
- Use a load balancer to distribute load across multiple instances
- Enable caching for frequently accessed data (requires custom implementation)
- Optimize queries - Use projection to limit returned fields
How do I scale CyberLicense?
- Horizontal scaling: Run multiple instances behind a load balancer
- Database scaling: Use MongoDB replica sets or sharding
- Caching: Implement Redis for session storage and caching
- CDN: Use a CDN for static assets
- Monitoring: Set up monitoring and alerting (e.g., PM2, New Relic)
💰 Revenue Tracking
How do I track payments?
- Configure Stripe or another payment gateway in
config.yml - Enable revenue tracking:
features:
revenueTracking: true
revenue:
stripe:
enabled: true
apiKey: "sk_live_..."
webhookSecret: "whsec_..."
- Set up webhooks to automatically create transactions
- View statistics in the admin dashboard under Revenue
How do I generate financial reports?
Via Admin Dashboard:
- Go to Export → Transactions
- Select format (CSV or PDF)
- Apply filters (date range, customer, status)
- Click Export
Via API:
- CSV:
GET /api/export/transactions/csv - PDF Summary:
GET /api/export/summary/pdf
🤖 Automation
How do I create automated actions?
- Go to Automated Actions in the admin dashboard
- Click Create New Action
- Configure:
- Name: Descriptive name for the action
- Description: What the action does
- Trigger: Event that activates the action (e.g.,
license_expired) - Conditions: Optional criteria for activation
- Actions: What to do when triggered (e.g., revoke license, send email)
- Enable the action
- Save
What events can I use for triggers?
Available trigger events:
license_created- When a license is createdlicense_expired- When a license expireslicense_revoked- When a license is revokedviolation_threshold- When violation count reaches thresholdanomaly_detected- When suspicious activity is detectedtransaction_completed- When a payment transaction completescustom- Custom events via API
What actions can be automated?
- Revoke License - Automatically revoke a license
- Suspend License - Temporarily suspend a license
- Send Notification - Send in-app notification
- Send Email - Send email notification
- Send SMS - Send SMS (if configured)
- Send Telegram - Send Telegram message (if configured)
- Create License - Automatically create a new license
- Update License - Modify license properties
- Webhook - Call external webhook
- Custom - Custom actions via API
📞 Support
Have more questions?
- Check the API Reference for detailed API documentation
- Review the codebase for implementation details
- Check the logs for error messages
- Contact support through your preferred channel
Last Updated: 2025