Why research software is a special case
Research software is bought by labs and departments on grants, used by students who graduate, and run on machines that nobody has full control over. Three conditions can break a naive license check.
- Clusters. Login nodes usually have internet. Compute nodes behind a scheduler can have none, or reach out only through a proxy.
- Time. A result is reproduced years after it is published, on a different machine, with the exact software version.
- Prices. A university group, a student and a company that uses the tool in industry are three prices.
Run on the cluster
A signed token is a small document that says “this license is valid for product 12 until a given time”, signed with the product’s Ed25519 key. The software verifies it with a public key that ships in the program and makes no network call. The token’s documented properties matter on a cluster:
- It is not bound to a device. The same token verifies on any machine, until its
refresh_by, 14 days after it was issued. - It carries
pidfor the product,valid,expfor licenses that expire, and the buyer’s email. - It is signed, not encrypted: anyone who holds it can read it.
That leads to this pattern for batch jobs:
| Where the software runs | How it gets a license state | Notes |
|---|---|---|
| Laptop or workstation | activate once, validate at launch |
The normal desktop flow |
| Login node with internet | The same as a workstation | Also the place to refresh the token |
| Compute node, no internet | Reads the token file from the shared home directory and verifies the signature | A login-node job or cron entry validates daily and rewrites the file |
| Container (Apptainer, Docker) | The token is bind-mounted or passed as an environment variable | Do not bake a token into the image |
| Archived machine, years later | Verifies the signature and exp only |
See below |
If the token on shared storage is world-readable, anyone on the cluster can use it. That may be fine for a department license and wrong for a personal one. Set permissions deliberately, and size the device limit to match who you intend to allow.
A job scheduler can start hundreds of jobs at once. Each job must not call the License API: the limit is 60 requests a minute per key and 120 per IP address, and nodes may share one outbound address. Verify locally.
Reproducibility and old versions
A published analysis cites a software version. Someone reruns it in 2030. An honest policy for that:
- Perpetual licenses carry no
exp. The software accepts a token with a valid signature and a product id even ifrefresh_byhas long passed. - Subscriptions carry
exp. After it, current versions refuse to run, as the customer has stopped paying. - Archived versions can run in a documented offline mode: one that checks the signature of a license file issued at purchase and ignores
refresh_by. State in your documentation that this is how old results can be reproduced.
A token is a statement of what was true at one time. If you disable a license, an old token still verifies until refresh_by. For research software, that is usually an acceptable trade. The offline page lists what a token cannot tell you.
Distribution
Research tools reach users through Python wheels, conda packages, containers, installers and source tarballs. A public package index cannot enforce a license. Options that can:
- Gate the download. Upload wheels, tarballs and installers as Clavem release files with platform labels such as
linux-x86_64andmacos-arm64. A valid key gets a signed link, valid for an hour, fromGET /v1/releases/:productId/latest?platform=.... Each file can be up to 5 GiB. - Ship a free build plus a licensed component. The open part is public; the licensed part is a separate file.
- Verify at run time. The package contains a check and the public key.
Clavem does not run a package index or a container registry; downloads are files behind a link.
Academic and commercial prices
Create two Stripe prices on the same Stripe product, or two products, one for academic use and one for commercial use. Clavem maps a Stripe price, not only a product, to a Clavem product, and a label on the mapping becomes the variant name on the license, such as Academic or Commercial. A site license for a department is a key with a higher device limit. Decide how to verify academic status, or accept it on trust with a license term that forbids misuse.
There is no floating license server on the institution’s network. If a department expects a pool of seats lent out as jobs start, a key with a device limit sized to the number of machines is the closest equivalent.
Recommended setup
| Setting | Suggested value | Why |
|---|---|---|
| License type | Annual subscription, or perpetual with paid major versions | Grants fund annual costs; old results need perpetual access |
| Device limit | 3 for a personal license; a site key for a department | A researcher’s laptop, workstation and a cluster login |
| Trial | 30 days, or a free academic evaluation key | Labs test before they fund a purchase |
| Updates | Releases endpoint, files labelled per platform | Researchers pin a version; keep old ones available |
Doing this with Clavem
Create a product, connect Stripe, map the academic and commercial prices. A buyer gets a key and an order page. Your software activates on a workstation or login node and verifies the signed token everywhere else. The Python guide and the Rust guide show verification; the C++ guide covers native code common in numerical software.
Guides to follow
- Offline license verification in Python
- Offline license verification in C++
- License key validation in Python
- Software updates in Python
Questions
How can a licensed tool run on cluster nodes with no internet?
Validate from a machine that has internet, such as a login node, and give the job the signed token. A token is not bound to a device, so any node can verify it offline with the public key in your software, until the token's refresh date.
Will a license check break reproducibility years later?
It can if the check needs a server. Verifying a signed token needs only the public key, which ships in the software. For archived versions, decide that tokens past their refresh date still run, or provide a documented offline mode, and say so in the paper's reproducibility notes.