> For the complete documentation index, see [llms.txt](https://docs.duplicati.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.duplicati.com/backup-destinations/provider-specific-destinations/mega.nz-destination.md).

# Mega.nz Destination

This page describes the Mega.nz storage destination

{% hint style="warning" %}
The destination is currently using the [MegaApiClient](https://github.com/gpailler/MegaApiClient) which is **no longer maintained**. Since there is little documentation on how to integrate with Mega.nz, it is not recommended that this storage destination is used anymore.
{% endhint %}

## User interface

<figure><picture><source srcset="/files/gulvpGo7ysmUZKushDbl" media="(prefers-color-scheme: dark)"><img src="https://2363712449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7cMJiGuXy340g9NzpxLY%2Fuploads%2Fgit-blob-18e4c73a637806e8be687f37c505511103de0be5%2FScreenshot%202025-11-03%20at%2015.32.59.png?alt=media" alt="Configure the Mega.nz destination"></picture><figcaption></figcaption></figure>

To configure the Mega.nz backend, enter a unique path for the backup to be stored at, the username and password.

## URL format for Commandline

To use the [Mega.nz](https://mega.io) storage destination, you can use the following URL format:

```
mega://<folder>/<subfolder>
  ?auth-username=<username>
  &auth-password=<password>
```

## Two-factor authorization

If the account has two-factor authentication enabled, provide the shared secret with the option `--auth-two-factor-key`. This is the Base32 string shown when two-factor authentication was set up on the account (the value behind the QR code), not the 6-digit code from the authenticator app. Duplicati uses the secret to compute the current TOTP code on each login, so the value does not change and is suitable for automated backups.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.duplicati.com/backup-destinations/provider-specific-destinations/mega.nz-destination.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
