Downloading from Mega.nz directly on my NAS?

Currently reading
Downloading from Mega.nz directly on my NAS?

4
0
NAS
DS1817+ 8GB
Operating system
  1. macOS
  2. Windows
  3. other
Mobile operating system
  1. iOS
Hey everyone, first of all. Happy new year!

I have a DS1817+ 8GB and I use Download Station frequently to download files from some sources.
Now, I have a paid membership to Mega.nz and I would like to know a way to download / synch my mega folders directly with my NAS. There is no package available.
And the only thing I can find is using the Terminal of some sorts (I am not familiar with that program).

Any help is highly appriciated.

:)
 

Rusty

Moderator
NAS Support
2,463
738
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
While MEGA was still under KimDot, I was waiting for the integration but nothing came to light apart some custom scripts wow ssh. Since I don’t use it no more I didn’t follow up on it but as far as I know there is still no support for it unless there is something inside CloudSync server package.
 
4
0
NAS
DS1817+ 8GB
Operating system
  1. macOS
  2. Windows
  3. other
Mobile operating system
  1. iOS
@Rusty Hey! Thank you for your fast reply. That is quite unfortunate I was hoping there was a way, or work-around. I have tried to use CloudSync but no luck. Or I am doing it wrong :)

Thank you anyway!
 
Last edited:
I doubt there is anything with a fency ui. Though, there is the inofficial command line client 'megatools'.

You can download, extract and move the executable to /usr/local/bin like this:
Bash:
# create temp folder
mkdir -p /tmp/megatools
# download archive
wget 'https://megatools.megous.com/builds/experimental/megatools-1.11.0-git-20180930-linux-x86_64.tar.gz' -O  /tmp/megatools.tar.gz
# extract archive into temp folder
tar xzf /tmp/megatools.tar.gz  --strip-components=1 -C /tmp/megatools
# add executable flag
sudo chmod +x /tmp/megatools/megatools
# move binary into /usr/local/bin
sudo mv /tmp/megatools/megatools /usr/local/bin/megatools
# remove temp folder
rm -rf /tmp/megatools

And perform downloads with this command:
Bash:
megatools dl --path /path/to/target 'https://mega.nz/#!xxxxxxxx!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

I did find it helpfull to query the sharename and use it inside the download path.
Bash:
SHARE_NAME=downloads
SHARE_PATH=$(synoshare --get $SHARE_NAME | grep -oE '/volume\w*/\w*')
megatools dl --path ${SHARE_PATH}/ 'https://mega.nz/#!xxxxxxxx!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

You will get following error message, even though the download will succeed:
dynamic loading not supported
Failed to load module: /usr/lib/gio/modules/libgiolibproxy.so
Dynamic loading not supported
Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so
Dynamic loading not supported
Failed to load module: /usr/lib/gio/modules/libgiognutls.so

You could create a simple bash script, where you just pass the mega.nz token as parameter. Still it is a PITA having to access the shell to query downloads...

Update: Never mind, the spk repos container a precompiled command line tool: MEGAcmd - Zusatzpakete | Synology Inc.. Which seem to be able to sync folders and what not. UserGuide: meganz/MEGAcmd
 
4
0
NAS
DS1817+ 8GB
Operating system
  1. macOS
  2. Windows
  3. other
Mobile operating system
  1. iOS
@one-eyed-king Thank you for your detailed reply. I will try to follow you instructions but unf. I kinda wish there was a fancy GUI haha :)
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Top