Rclone setup guide for MEGA S4

Rclone is a powerful command-line tool for managing files across cloud storage platforms. It supports backing up and encrypting files to the cloud, as well as restoring and decrypting them when needed. This guide walks you through setting up Rclone for use with MEGA S4.

Create a new bucket

  1. Click Object storage on the left-hand panel.
  2. Click Create bucket.
  3. Name the bucket.
  4. Click Create.

Set up your access keys

  1. Click Object storage on the left-hand panel.
  2. Click Keys on the left-hand panel.
  3. Click Create key.
  4. Name the key.
  5. Copy the Access key and Secret key.

  1. Download and install Rclone from the Rclone website.
  2. Open the command line and execute the command rclone config to start the setup process.
  3. Enter n for new remote and enter a name, for example s4.
  4. For storage type, choose Amazon S3 Compliant Storage Providers.
  5. For provider, choose MEGA S4 Object Storage.
  6. Enter env_auth.
  7. Choose Enter AWS credentials in the next step.
  8. For access_key_id, enter the Access key you copied earlier.
  9. For secret_access_key, enter the Secret key you copied earlier.
  10. For endpoint, choose from the list provided or enter one of your choice.

The standard configuration is now finished, but the app will ask if you want to go to the advanced configuration.

  1. Enter y to go to advanced configuration settings (see below).

or

  1. Enter n to finish the configuration.
  1. Enter y to save the configuration.
  2. Enter q to quit the setup.
  • s3-upload-cutoff (default 200Mb)
    • Rclone switches from single part uploads to multipart uploads at the point specified by --s3-upload-cutoff
  • s3-chunk-size (default 5Mb)
    • The chunk sizes used in the multipart upload. The minimum limit is 5Mb which it will default to.
  • s3-force-path-style
    • If this option is set as true, Rclone will use path style instead of virtual-hosted style.

Here’s how to verify that your Rclone remote (s4) is working correctly.

  1. Create a bucket.
    rclone mkdir s4:mybucket
  2. List your buckets.
    rclone lsf s4:
    • You should see mybucket in the output.
  3. Delete the empty bucket.
    rclone rmdir s4:mybucket
  4. Confirm the bucket is gone.
    rclone lsf s4:
    • No output means it was deleted successfully.
ActionCommandExample
Lists files and directorieslsfrclone lsf s4:bucketname or rclone lsf s4: for the top level
Lists objects in a bucket with sizeslsrclone ls s4:bucketname
Lists objects in a bucket with sizes and modification timestampslslrclone lsl s4:bucketname
Remove the empty directory at the pathsizerclone size s4:bucketname
Creates a bucketmkdirrclone mkdir s4:newbucketname
Remove the empty directory at pathrmdirrclone rmdir s4:bucketname
Remove the path and all of its contentspurgerclone purge s4:bucketname
Copies objects from source to destinationcopyrclone copy C:\MyFolder s4:bucketname
Copies objects from source to destinationmoverclone move C:\MyFolder s4:bucketname
Shows the current Rclone configurationShows the total size of the bucketrclone config show
Syncs the destination to match the source exactly. Can be local to cloud storage or cloud to cloudsyncrclone sync C:\MyFolder s4:bucketname\MyFolder

More commands and configuration options can be found on the Rclone website.

The following are settings you can try, depending on the type of objects you are using.

Large object uploads – e.g., 1GB and above

Use multipart uploads

  • Set --s3-upload-cutoff to a good size, so large objects always use MPU.
    • Try value of 64Mi–256Mi.
  • Larger --s3-chunk-size means fewer API requests and less overhead, but requires more RAM.
    • A good range is 64Mi, 128Mi, 256Mi.
  • Increase --s3-upload-concurrency – The number of parts uploaded in parallel per file. Higher values can hit diminishing returns or provider throttling.
    • A range of 4 – 32 can work well for most workloads.
  • Keep --transfers low when uploading large files. Performance scaling comes from --s3-upload-concurrency, not from file-level parallelism.
    • For multiple large files, increase --transfers only if a single file upload does not fully saturate your available bandwidth.
    • If one file already fills the link, increasing --transfers will not increase total throughput. It will only increase memory usage and may trigger provider throttling.

Small objects uploads (1KB to a few MB)

Prefer single PUT over multipart

  • Set --s3-upload-cutoff higher so most “small” files stay single PUT.
    • Try 256Mi–1Gi
    • Note: Rclone’s --s3-upload-cutoff max is 5 GiB.

Use high file parallelism:

  • --transfers (file uploads in parallel)
  • --checkers (listing/stat in parallel)
  • Due to API limitations, increasing --transfers beyond approximately 45 concurrent uploads will not improve throughput.
    • The practical maximum achievable rate is around 42–45 objects per second.
    • Because of this objects-per-second cap, it is always preferable to upload larger objects whenever possible. Larger objects are not negatively affected by this limit, while very small objects are.

Reduce validation checks

These flags reduce the number of API calls and checksum operations Rclone performs. They improve performance but reduce verification.

--s3-disable-checksum Disables MD5 calculation before upload. Reduces CPU usage and startup delay for large files, but removes stored checksum metadata.

--s3-no-head Skips the HEAD request after each upload. Reduces one API call per object and improves objects-per-second performance for small file workloads.

--fast-list Reduces the number of listing API calls when scanning large directory trees before upload. Improves performance for sync and copy of many files, but increases RAM usage.

--ignore-checksum Skips checksum validation when copying, moving, or syncing. Improves performance but relies on size and timestamp instead of hash validation. See note below on using this when files are copied to S4 from Mega Cloud drive.

      Rclone assumes files are uploaded using Rclone itself, so for objects smaller than the s3-upload-cutoff value, it verifies integrity using the ETag (MD5 hash).

      However, files uploaded via MEGA software don’t store the MD5 in the ETag, causing these downloads to fail checksum validation. To avoid this, use the --ignore-checksum flag when copying, moving, or syncing files.