If you sell software that runs on a customer's server, or offer your platform to several clients from one codebase, you will eventually face the question: how do we stop our product being copied, resold or modified without permission, while keeping honest customers happy? Software licensing protection is a combination of business model, technical measures and contracts. No single measure is sufficient. This guide explains the options, their realistic strength, and how to deliver updates securely.
Start with the delivery model
The strongest protection is decided before any code is written: where does the software run?
| Delivery model | Protection level | Trade-offs |
|---|---|---|
| SaaS (you host) | Highest: the customer never receives the code | You carry hosting, uptime and data responsibilities |
| Managed private instance | High: you host a dedicated copy per client | Higher hosting cost, still under your control |
| Self-hosted with encoded code | Moderate | Customer controls server; code is protected but present |
| Self-hosted with source code | Low technical protection; relies on contract | Often required by enterprise or government clients |
Many vendors offer more than one model. Some customers will pay more for source access with strict contractual terms; others prefer SaaS. Decide which you will support, and price accordingly.
Licence models
Your licence model defines what you are protecting. Common models:
- Perpetual licence with optional paid support and updates.
- Subscription where continued use or updates depend on an active plan.
- Per-domain or per-installation licences, common for web platforms.
- Per-user or per-seat licences.
- Feature tiers, where modules are enabled according to the plan purchased.
- Source-available licences that permit modification but restrict redistribution.
Keep the model simple enough that customers understand it and your system can enforce it accurately.
Technical measures for self-hosted software
Licence keys and activation
A licence key ties an installation to an agreement. A typical flow:
- The customer enters a key during installation.
- The installation sends the key plus an installation identifier, such as the domain, to your licence server.
- The server checks the key, records the activation and returns a signed response describing what is permitted.
- The installation stores the signed response and re-validates periodically.
Signing the response, using public-key cryptography, means the installation can verify it came from your server and has not been edited.
Graceful enforcement
Harsh enforcement hurts paying customers more than pirates. Good practice:
- Cache validation and allow a grace period if your licence server is unreachable.
- Warn administrators in the admin panel before anything is restricted.
- Restrict updates and admin features before ever disrupting the public-facing service.
- Provide a clear way to transfer a licence when a customer changes domain or server.
Code protection
For PHP and similar interpreted languages, the source is normally readable on the server. Options to raise the barrier:
- Obfuscation renames identifiers and restructures code to hinder reading.
- Encoding tools compile or encrypt code so it requires a loader extension to run.
- Keeping critical logic server-side, exposed through an API you host, so the most valuable parts never ship.
Each has costs: encoded code can complicate debugging and hosting compatibility, and server-side logic adds a dependency on your infrastructure.
Key takeaway: No technical protection is unbreakable. Combine a sensible delivery model, a signed licence check, reasonable code protection and a strong contract, so misuse is inconvenient, visible and legally actionable.
Secure update delivery
Updates are both a selling point and a security risk. If an attacker can push a fake update, they control every installation. A robust update system includes:
- Versioned release packages with a clear version number and changelog.
- Digital signatures on every package, verified by the installation before applying it.
- HTTPS-only distribution, with the package source restricted to your update server.
- Licence-aware access, so only entitled installations can download updates.
- Automatic backup of files and database before applying.
- Database migrations that run in order and are tested on a copy of real data.
- Rollback to the previous version if the update fails.
- An in-panel changelog so administrators know what changed.
A well-run update channel also encourages customers to stay licensed, because staying current has clear value. It ties naturally into a modular software architecture, where a shared core is updated across many installations.
Monitoring and detection
You cannot stop every misuse, but you can notice it:
- Track activations per key and flag unusual numbers or domains.
- Embed unique, harmless identifiers in each customer build so leaked copies can be traced.
- Monitor public code repositories and marketplaces for your product name.
- Log failed licence checks and review patterns.
Respect privacy: collect only what the licence check needs, document it in your agreement and privacy notice, and avoid sending customer data to your servers.
Contracts and legal protection
Technical measures make misuse harder; contracts make it actionable. A software licence agreement should typically cover:
- What is licensed, to whom, and for how many installations or users.
- Prohibited actions such as redistribution, resale, reverse engineering where permitted by law, and removal of licence checks.
- Ownership of the core product versus any client-specific customizations.
- Support, update entitlement and what happens when a subscription ends.
- Data handling, confidentiality and liability.
- Governing law and dispute resolution.
Laws on software, reverse engineering and consumer protection differ between jurisdictions such as Canada and the UAE. Have your agreement drafted or reviewed by a qualified lawyer.
Building the licence server
The licence server becomes critical infrastructure once customers depend on it, so design it with care:
- Keep it separate from your marketing website and customer support systems, so a problem in one does not affect the others.
- Protect the signing key. The private key used to sign licence responses and update packages must be stored securely, with access limited to a few people and a documented rotation plan.
- Expose a small API: activate, validate, deactivate and check for updates. Keep responses minimal.
- Rate-limit requests to prevent brute-force guessing of keys.
- Provide a customer portal where clients can see their licences, activated domains and invoices, and move a licence to a new server without contacting support.
- Monitor availability and keep the server highly available, because outages generate support tickets from every customer at once.
- Plan for your own continuity. Consider what happens to customers if your company changes ownership; some enterprise clients will ask for escrow or a fallback arrangement.
Software licensing protection for SaaS products
If you deliver as SaaS, the protection problem shifts. Code stays on your servers, so the focus moves to account security and fair-use enforcement: preventing shared logins across organizations, enforcing plan limits on users, storage or API calls, protecting your API from scraping, and ensuring tenant data is strictly separated. Plan limits should be checked in the application layer, logged, and communicated clearly before they are enforced.
Balancing protection and customer experience
Some protection is invisible to good customers; some is irritating. Before adding a measure, ask:
- Does it affect site speed or availability for the customer's own visitors?
- Will it cause support tickets when the customer migrates servers?
- Can the customer's IT team still troubleshoot problems?
If a measure creates more support burden than revenue protection, reconsider it. Our security and compliance service can review both the protection and the attack surface it creates.
Next steps
Decide your delivery models first, then design licence checks and the update channel together, since they share infrastructure. If you are commercializing a platform, DigiVort can help design the licensing server, signed update packages and admin changelog through our web applications and SaaS service. Describe your product through our project wizard.