Guides

Software licensing guides for developers

Practical guides to adding license keys to software your customers install: how a license check works, how to validate keys in C#, C++, Python and Node.js, and how offline use, device binding, key security and subscription billing fit together. Each guide explains the technique first, then shows how Velsigil implements it.

Last updated

The basics

How a license check works

Most license systems for installed software follow the same loop. The details differ; the parts are the same.

  1. Step 1: License key

    The customer gets a key when they buy. Your server keeps the record behind it: plan, expiry, features and how many devices may use it.

  2. Step 2: Server check

    When your application starts, it sends the key and an identifier of the device to your license server.

  3. Step 3: Signed answer

    The server decides and signs its answer with a private key only it holds. The application verifies the signature with the public key built into it, so a fake server or an edited answer is rejected.

  4. Step 4: Device binding

    The first check from a new device activates it, up to the license’s device limit. A secret the server issues to the device lets it recognize the same device later.

  5. Step 5: Offline lease

    A successful answer can carry a signed, time-limited lease, so the application keeps working for a while when the server cannot be reached.

Add licensing to your app

Validate license keys in the language you ship in. Each guide covers installation from source, the startup check, results, offline use, updates and hardening for that ecosystem.

C# license key validation

Validate license keys in C# and .NET: signed server answers, device binding, offline leases and update checks for WinForms, WPF, console apps and Unity.

C++ license key validation

Validate license keys in C++17: Ed25519-signed answers via libsodium, device binding, offline leases and static Windows builds with CMake and vcpkg.

Python license key validation

Add license key validation to a Python app: verify signed server answers, bind devices, cache offline leases and know the limits of bytecode obfuscation.

Node.js license key validation

Validate license keys in Node.js and Electron: signed answers, device secrets, offline leases, and why the check belongs in the main process.

Licensing concepts

How the parts of a license check work, what they protect against and where their limits are.

Offline license activation

How software checks a license without internet: signed offline leases, signed license files, grace periods, clock tampering and what each one trusts.

Hardware-locked licensing

How hardware-locked licenses bind a key to a device: machine IDs per OS, why hardware IDs can be spoofed, device secrets, limits and customer resets.

License key security

How license keys get shared, forged or replayed, and the defenses that work: signed answers, replay protection, hashed keys, device secrets, rate limits.

Run and sell

Operating your own license server and connecting it to how you sell.

Self-hosted license server

What a self-hosted license key server does, what it needs to run, and how to decide between building, renting or running one yourself on Linux or Windows.

Subscription licensing with Stripe

Tie license keys to Stripe subscriptions: paid renewals extend the license, cancellations let it lapse, and full refunds or lost disputes revoke it.

Scope

What these guides do not cover

These guides are about license keys for software that customers install and run: desktop applications, command-line tools, plugins and self-hosted server software. Some licensing models are out of scope, because Velsigil does not implement them.

  • Floating or concurrent licenses: a pool of seats shared by whoever is using the program on a company network at the moment.
  • Usage metering: billing by API calls, compute time or other measured use.
  • A hosted licensing service: Velsigil runs on your own server, and we do not host installations.

Early access

Request early access

Early access is free. In exchange, we ask for your feedback while we prepare the paid launch. Spots are limited, and we reply to every request by email.

  • Free until paid subscriptions launch
  • 30% off your first year on either plan when they do
  • For businesses established in the United States

Early access ends when paid subscriptions launch; we will tell members by email before then. To keep using Velsigil after that, you need a subscription. The 30% discount applies to the first 12 months of either plan, paid monthly or yearly.

Request early access

Opens your email app with a short template: company, what you sell, your platforms and languages, expected license volume and how you plan to deploy. You can also write to hello@velsigil.com.