# MEGA LIMITED CODE LICENCE

This licence grants you the rights, and only the rights, set out below in
respect of Mega's code. If you take advantage of these rights, you accept this
licence. If you do not accept the licence, do not access the code.

Words used in the [Mega Limited Terms of Service](https://mega.io/terms) have the
same meaning in this licence. Where there is any inconsistency between this
licence and those Terms of Service, these terms prevail.

## Section 1: Definitions

- "code" means the Mega code made available from time, in our sole
  discretion, for access under this licence at [GitHub](https://github.com/).
  Reference to the code includes any part of it, including permitted 
  modifications and compilations.
- “compilation” means to compile the code from ‘source code’ to ‘machine code’.
- "defect" means a defect, bug, backdoor, security issue or other deficiency in the code.
- “non-commercial distribution” means distribution of the code or any compilation
  of the code, or of any other application or program containing the code or any
  compilation of the code, where such distribution is not intended for or directed
  towards commercial advantage or monetary compensation.
- "permitted modifications" means modifications made exclusively to achieve 
  compatibility, platform portability, or to address defects, provided these modifications
  do not materially alter Mega's intended functionality, integrate competing services, or
  undermine Mega's business model.
- "review" means to access, analyse, test and otherwise review the
  code as a reference, for the sole purpose of analysing it for defects.
- "you" means the licensee of rights set out in this licence.

## Section 2: Grant of Rights

1. Subject to the terms of this licence, we grant you a non-transferable,
   non-exclusive, worldwide, royalty-free licence to access, review,
   compile, modify (solely as permitted modifications), and distribute 
   the code strictly for non-commercial purposes.
2. You may provide the code to anyone else and publish excerpts of it for the
   purposes of review, compilation and non-commercial distribution, provided
   that when you do so you make any recipient of the code aware of the terms of
   this licence, they must agree to be bound by the terms of this licence and
   you must attribute the code to Mega.
3. Other than in respect of those parts of the code that were developed by other
   parties and as specified strictly in accordance with the open source and
   other licences under which those parts of the code have been made available,
   as set out on our website or in those items of code, you are not entitled to
   use or do anything with the code for any commercial or other purpose, other
   than review, compilation and non-commercial distribution in accordance with
   the terms of this licence.
4. Subject to the terms of this licence, you must at all times comply with and
   shall be bound by our [Terms of Use](https://mega.io/terms),
   [Privacy and Data Policy](https://mega.io/privacy) and [Takedown Guidance Policy](https://mega.io/takedown).

## Section 3: Limitations

1. This licence does not grant you any rights to use Mega's name, logo, or
   trademarks and you must not in any way indicate you are authorised to speak
   on behalf of Mega.
2. You must not:
    - Use the code or modifications thereof for commercial purposes, including integration with competing cloud storage services, commercial sales, monetised services, or distribution intended for monetary compensation or commercial advantage;
    - Modify the code to circumvent, undermine, or compromise Mega's security measures, authentication systems, or business model.
3. If you issue proceedings in any jurisdiction against Mega because you
   consider Mega has infringed copyright or any patent right in respect of the
   code (including any joinder or counterclaim), your licence to the code is
   automatically terminated.
4. THE CODE IS MADE AVAILABLE "AS-IS" AND WITHOUT ANY EXPRESS OF IMPLIED
   GUARANTEES AS TO FITNESS, MERCHANTABILITY, NON-INFRINGEMENT OR OTHERWISE. IT
   IS NOT BEING PROVIDED IN TRADE BUT ON A VOLUNTARY BASIS ON OUR PART AND IS
   NOT MADE AVAILABLE FOR ANY USE OUTSIDE THE TERMS OF THIS LICENCE. ANYONE
   ACCESSING THE CODE MUST ENSURE THEY HAVE THE REQUISITE EXPERTISE TO SECURE
   THEIR OWN SYSTEM AND DEVICES AND TO ACCESS AND USE THE CODE IN ACCORDANCE
   WITH THE TERMS OF THIS LICENCE. YOU BEAR THE RISK OF ACCESSING AND USING THE
   CODE. IN PARTICULAR, MEGA BEARS NO LIABILITY FOR ANY INTERFERENCE WITH OR
   ADVERSE EFFECT ON YOUR SYSTEM OR DEVICES AS A RESULT OF YOUR ACCESSING AND
   USING THE CODE IN ACCORDANCE WITH THE TERMS OF THIS LICENCE OR OTHERWISE.

## Section 4: Termination, suspension and variation

1. We may suspend, terminate or vary the terms of this licence and any access to
   the code at any time, without notice, for any reason or no reason, in respect
   of any licensee, group of licensees or all licensees including as may be
   applicable any sub-licensees.

## Section 5: General

1. This licence and its interpretation and operation are governed solely by New
   Zealand law. You agree to submit to the exclusive jurisdiction of the New
   Zealand arbitral tribunals as further described in our Terms of Service and
   you agree not to raise any jurisdictional issue if we need to enforce an
   arbitral award or judgment in New Zealand or another country.
2. Questions and comments regarding this licence are welcomed and should be
   addressed to support@mega.nz.

Last updated 14 May 2025.
