Skip to content

Support for MEGA with 2FA in Docker environment (stable, non-blocking performance) #9277

@ford22

Description

@ford22

What problem are you trying to solve?

I am using rclone with MEGA cloud storage in a Docker environment.
Currently, using MEGA with 2FA (two-factor authentication) is difficult or not well supported, especially in automated/containerized setups.

Additionally, under load (multiple transfers, background services like media servers), performance can become unstable or cause delays.

Proposed solution

  • Add full support for MEGA accounts with 2FA in rclone (including non-interactive / headless login support).
  • Provide a secure way to authenticate using tokens or session reuse that works well inside Docker containers.
  • Improve stability and performance when running rclone in Docker (no blocking, no lag under load).
  • Optional: environment variable support for authentication (for Docker usage).

Alternatives considered

  • Using manual login or disabling 2FA (not secure, not acceptable).
  • Using external scripts to refresh sessions (unstable and complex).

Additional context

Use case:

  • Docker-based homelab (NAS, media stack, backups)
  • Continuous sync with MEGA
  • Need for stable, secure, and automated operation

It would be very helpful if rclone could better support modern security (2FA) while remaining efficient in containerized environments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions