Informational only. Not legal advice. Read more.

» Guide

Fair code and source-available licenses

What 'fair code' means, why it is not open source, and when it is a good fit.

Fair code is an informal term for licenses that are:

  • source-available (the code can be read and often modified),
  • free to use in most scenarios, but
  • restricted in at least one dimension that makes them incompatible with the Open Source Definition.

The most common restrictions:

  • No hosting as a service — you cannot offer the software as a managed service that competes with the licensor. Examples: SSPL, Elastic License 2.0, Confluent Community License.
  • Non-commercial — you cannot use the software commercially without a separate agreement. Examples: PolyForm Noncommercial, Commons Clause derivatives.
  • Field of use — the software cannot be used in a named industry or for a named purpose. Examples: some Hippocratic-style licenses.
  • Time-delayed conversion — restricted now, becomes open source automatically after a specified period. Example: Business Source License (BUSL).

Why not just use an OSI licence?

Venture-backed infrastructure companies discovered a pattern: they build a piece of open-source software (MongoDB, Elasticsearch, Redis), a cloud provider forks it and offers it as a managed service, and the cloud provider out-competes the original authors on distribution because they already run the data plane.

Fair-code licenses are a response: keep the source open, keep use broadly free, but block the specific “host it as a service and out-compete me” scenario.

The OSI disagrees. Per the Open Source Definition, a licence must not discriminate against fields of endeavour — and “offering as a service” is a field of endeavour. So SSPL, ELv2, BUSL, and similar licenses are not OSI-approved.

When to use fair code

  • You are the author of infrastructure software and your business model depends on being the primary managed-service provider.
  • You want the visibility and contributor model of open source but cannot afford the hyperscaler-runs-my-software-as-a-service scenario.
  • You are willing to accept the downside: smaller community, some users will avoid the license on principle, regulatory uncertainty in some industries.

When not to use fair code

  • You want the software to be used as widely as possible with no restrictions.
  • You are a dependency maintainer — fair-code licenses are harder to include transitively in open-source projects.
  • You need OSI approval for procurement reasons.
Notice

Informational only

Nothing on yourlicense.ca is legal advice. Confirm with a lawyer before you license anything that matters.

Read the disclaimer →