Licensing Details for Iroh: Dual MIT and Apache-2.0 License Guide
The Iroh codebase is released under a dual MIT OR Apache-2.0 license, allowing downstream users to choose either the permissive MIT License or the Apache License 2.0 (which includes an explicit patent grant) when redistributing or modifying the software.
The n0-computer/iroh repository distributes all Rust crates under a consistent dual-license model that maximizes flexibility for developers. Understanding the licensing details for Iroh is essential for anyone integrating this networking stack into commercial or open-source projects, as it determines compliance requirements and legal protections available under either the MIT or Apache-2.0 terms.
Dual-License Model Overview
The Iroh project employs a dual-license strategy represented by the SPDX identifier MIT OR Apache-2.0. This means you may choose to use, modify, and redistribute the code under the terms of either license. Both licenses are permissive and allow for commercial use, but they differ in specific protections and attribution requirements.
The MIT License Option
The MIT License is a short, permissive license that grants broad rights with minimal requirements. When you choose this option, you must include the original copyright notice and the full MIT license text in any substantial portions of the software you distribute. The full text resides in the repository at LICENSE-MIT.
The Apache License 2.0 Option
The Apache License 2.0 provides similar permissions to MIT but adds an explicit patent grant—a clause that protects users from patent claims by contributors. This option is often preferred by corporate legal teams because it clarifies patent rights. The complete text is available at LICENSE-APACHE.
License Declaration in Source Files
Every crate within the n0-computer/iroh repository declares the dual-license in its manifest file. This ensures consistent licensing across the entire project, from the core library to auxiliary components.
In iroh/Cargo.toml, the license field appears as:
[package]
name = "iroh"
version = "0.4.0"
license = "MIT OR Apache-2.0"
The same declaration appears in iroh-relay/Cargo.toml, iroh-base/Cargo.toml, and iroh-dns-server/Cargo.toml, confirming that all components—including the relay server and base libraries—follow the identical licensing policy.
Key License Files and Their Locations
| File Path | Purpose |
|---|---|
LICENSE-MIT |
Contains the full text of the MIT License. |
LICENSE-APACHE |
Contains the full text of the Apache License 2.0. |
iroh/Cargo.toml |
Declares the dual-license for the main crate. |
iroh-relay/Cargo.toml |
Declares the dual-license for the relay component. |
iroh-base/Cargo.toml |
Declares the dual-license for base utilities. |
These files collectively establish that any code downloaded from the n0-computer/iroh repository complies with the MIT OR Apache-2.0 dual-license model.
Compliance Guidelines for Developers
When adding Iroh as a dependency, you do not need to take immediate action regarding licensing. However, when you redistribute Iroh's source code or distribute binaries that include Iroh, you must comply with the terms of your chosen license.
If you select the MIT License, retain the original copyright notice and the full MIT license text. If you select the Apache License 2.0, include the original Apache notice and the full Apache license text. You do not need to display both licenses simultaneously—choosing one satisfies the dual-license requirement.
For example, when redistributing source code, your documentation might include:
This project uses Iroh, licensed under the MIT License.
See LICENSE-MIT for the full text.
Or alternatively:
This project uses Iroh, licensed under the Apache License 2.0.
See LICENSE-APACHE for the full text.
Summary
- Iroh uses a dual-license model:
MIT OR Apache-2.0, declared in every crate'sCargo.toml. - Users choose one license: Either the MIT License (simple, permissive) or Apache-2.0 (includes patent grant).
- Full license texts are located at
LICENSE-MITandLICENSE-APACHEin the repository root. - All crates are consistent:
iroh,iroh-relay,iroh-base, andiroh-dns-serverall use the same licensing terms. - Compliance requires preserving notices: Pick one license and include its full text and copyright notices when redistributing.
Frequently Asked Questions
Can I use Iroh in commercial projects?
Yes. Both the MIT and Apache-2.0 licenses are permissive and allow commercial use, modification, and distribution without requiring you to open-source your own code. You may choose whichever license better fits your organization's legal requirements.
Do I need to include both license notices when redistributing Iroh?
No. The MIT OR Apache-2.0 syntax means you can choose either license. You do not need to display both the MIT and Apache notices. Simply comply with the terms of your chosen license by including the appropriate copyright notice and full license text.
What is the difference between choosing MIT or Apache-2.0 for Iroh?
The MIT License is shorter and requires only that you preserve the copyright notice and disclaimer. The Apache License 2.0 includes these requirements plus an explicit grant of patent rights from contributors to users. Apache-2.0 also provides more detailed rules about attribution and requires stating changes when modifying files. Many enterprises prefer Apache-2.0 for its patent protections.
Where are the licensing details declared in the Iroh source code?
The licensing details are declared in each crate's Cargo.toml file using the line license = "MIT OR Apache-2.0". You can verify this in iroh/Cargo.toml, iroh-relay/Cargo.toml, iroh-base/Cargo.toml, and other crate manifests throughout the n0-computer/iroh repository.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →