This guide will show you how to use rclone to mount your Mega.nz account as a local directory on Linux systems where MegaSync is unsupported or not functioning correctly. This allows you to access Mega.nz files directly from the local filesystem and makes file synchronization straightforward.
- A Linux system (this guide has been tested on Rocky Linux 9 but should work on other distributions).
- A Mega.nz account.
- Administrative privileges (for configuring automatic mounts at boot).
-
Update repositories and install Rclone:
sudo dnf install rclone
-
Configure Rclone for Mega.nz:
- Start the
rcloneconfiguration:rclone config
- Select
nto create a new remote. - Provide a name for your remote (e.g.,
mega). - Choose
megaas the storage type. - Enter your Mega.nz credentials.
- Follow the on-screen instructions to complete the configuration.
- Start the
-
Create a mount directory:
mkdir -p ~/megamount -
Mount the Mega.nz directory:
rclone mount mega:/ ~/megamount --daemonYou can now access Mega.nz files in the
~/megamountdirectory.
-
Edit the
/etc/rc.localfile:sudo nano /etc/rc.local
-
Add the mount command before the
exit 0line:rclone mount mega:/ /home/$USER/megamount --daemon --allow-other -
Make
/etc/rc.localexecutable:sudo chmod +x /etc/rc.local
-
Create a service file for Rclone:
sudo nano /etc/systemd/system/rclone-mega.service
-
Insert the following content into the file:
[Unit] Description=Mount Mega.nz using Rclone After=network-online.target [Service] User=<your-username> ExecStart=/usr/bin/rclone mount mega:/ /home/<your-username>/megamount --daemon --allow-other ExecStop=/bin/fusermount -u /home/<your-username>/megamount Restart=on-failure [Install] WantedBy=multi-user.target
-
Reload
systemdand enable the service:sudo systemctl daemon-reload sudo systemctl enable rclone-mega -
Start the service immediately (optional):
sudo systemctl start rclone-mega
If you need to unmount the Mega.nz directory manually, run:
fusermount -u ~/megamountIf this guide has been helpful to you, consider supporting my work with a donation. You can donate using the following methods:
Lightning Network (LN): asyscom@sats.mobi
Bitcoin (BTC): bc1qcsqgmch9mr76w9ngaxys70xssjmgspvv687j37