Business Software, ERP & SaaS

Protecting Commercial Software: Licensing, Encryption and Updates

How software vendors protect commercial products with licence models, activation, code protection, signed updates and solid contracts, without frustrating customers.

Illustration of a software package sealed with a digital key and padlock, with a secure update arrow flowing from a vendor server to client installations

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:

  1. The customer enters a key during installation.
  2. The installation sends the key plus an installation identifier, such as the domain, to your licence server.
  3. The server checks the key, records the activation and returns a signed response describing what is permitted.
  4. 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:

  1. Versioned release packages with a clear version number and changelog.
  2. Digital signatures on every package, verified by the installation before applying it.
  3. HTTPS-only distribution, with the package source restricted to your update server.
  4. Licence-aware access, so only entitled installations can download updates.
  5. Automatic backup of files and database before applying.
  6. Database migrations that run in order and are tested on a copy of real data.
  7. Rollback to the previous version if the update fails.
  8. 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.

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:

  1. Keep it separate from your marketing website and customer support systems, so a problem in one does not affect the others.
  2. 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.
  3. Expose a small API: activate, validate, deactivate and check for updates. Keep responses minimal.
  4. Rate-limit requests to prevent brute-force guessing of keys.
  5. 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.
  6. Monitor availability and keep the server highly available, because outages generate support tickets from every customer at once.
  7. 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.

Frequently asked questions

Can software be made impossible to copy?

No. Software that runs on a customer's server can ultimately be analysed by a determined, skilled person. The realistic goal is to make misuse inconvenient, detectable and legally actionable, while keeping legitimate customers comfortable. Hosting the product as SaaS is the strongest technical protection.

What is the difference between obfuscation and encryption of source code?

Obfuscation makes code hard to read by renaming and restructuring it while keeping it runnable. Encoding or encryption tools transform the code so it needs a loader to run, which adds a further barrier. Neither is absolute protection, but both raise the effort required to copy or modify the product.

Should licence checks stop the software if the licence server is unreachable?

Usually not immediately. A grace period with cached validation avoids punishing customers for network problems or outages on your side. After the grace period, limiting updates or admin features is often fairer than disabling the customer's live service.

How should updates be delivered to self-hosted customers?

Use versioned release packages, signed so the installation can verify they came from you, with database migrations and a rollback plan. Provide a changelog in the admin panel. Back up before every update.

Do I still need a licence agreement if I use technical protection?

Yes. The licence agreement defines what customers may and may not do, and gives you legal remedies when technical measures are bypassed. Have it drafted or reviewed by a lawyer familiar with software in your jurisdictions.