Problems activating your account? Send notification email to:
Host4Fun Budget VPS Hosting
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MegaFuse Installation on Debian/Ubuntu
Hello Post4VPS Community

Today I have been going through some older guides I have written and posted on because I wanted to put my NanoKVM VPS in use.

One guide I used was the "IPv4 reverse proxy for IPv6 only web hosting" tutorial to run a web server on the usual ports 80 and 443 while not having a dedicated IPv4 IP address but a full IPv6 prefix. And given that my NanoKVM VPS only has 10 GB disk space I decided to check this article I posted previously on FreeVPS to expand storage on my VPS somehow. Thanks to @deanhills for reposting this great tool here.

As can be seen in the reposted topic by @deanhills there are some open questions. This tutorial will address the installation process of MegaFuse on Debian or Ubuntu (thus also any Linux distribution that is based on one of the both). Unfortunately I cannot cover CentOS or other Linux distributions because I don't use them and don't have a server at hand to test it out. This guide can however be easily adopted to pretty much any other Linux distribution by finding out the corresponding packages names for the needed tools to compile MegaFuse.

Feel free to post your questions and feedback below. Let us begin now.

Use an account with administrative permission or sudo with a user that is allowed to perform sudo operations to peform the commands in this guide.

Prerequisite Installation

You need tools to compile the MegaFuse source code and build the executable file. MegaFuse is only available in the form of its source code. So the installation process is the compilation of this source code by hand. This requires compilation tools such as make, gcc, pkg-config and many others. Run the command below to install all necessary packages.
apt-get install build-essential make pkg-config wget zip unzip ca-certificates fuse -y

Prepare Source Code

After all the tools that you need are installed it is time to download the latest MegaFuse source and and extract it. That is also why the command in the first step included wget and both of the ZIP programs zip and unzip. This tools will help to download the source code and extract it.

Download the source code to your server:

Extract the source code:

Go to the folder with the source code:
cd MegaFuse-master

Compile MegaFuse Source Code

Now as we have the extracted source code on the server it is time to compile it and build the executable file. To do that you have to run a single command in the folder with the source code (MegaFuse-master).

Depending on the performance of your server the compilation task might take a while. Just wait for it to complete. Once it is done your cursor will be back at the normal terminal. You can run the ls command and check if you now have the file "MegaFuse" inside the MegaFuse-master folder. If the file is there everything has worked out. If the file is not there check the compilation output for any errors. Feel free to post them here to get help with a solution to make it work.

Start MegaFuse

You are almost ready to go. First however you need to set correct permission on the MegaFuse executable file and after that you have to configure the MegaFuse configuration file with your MEGA account information and other settings. Please make sure you are still in the MegaFuse-master folder!

Set execute permission for MegaFUSE:
chmod +x MegaFuse

Configure MegaFUSE:
nano megafuse.conf

Inside the file uncomment the following entries:

Change the values for these entries. USERNAME is the username/e-mail address of your MEGA account and PASSWORD is of course your password. MOUNTPOINT is the folder where you want the content of your MEGA cloud to be mounted in. This folder has to exist on the server!

After you have adjusted all entries save the file and close the text editor. The configuration is basically done at this point. Now we can start MegaFUSE.

Start MegaFuse:
~/MegaFuse-master/MegaFuse -c ~/MegaFuse-master/megafuse.conf -f -o allow_other -o uid=1000

If MegaFuse started successfully you will see the message "MegaFuse is ready". Unfortunately MegaFuse has no service daemon, yet. So when you reboot your server you will have to run it manually and you will have to use tools like screen or tmux to run it constantly in the background.

You can now change directory to the mount point that you defined in the configuration file and run ls to see the content. You should see the contents of your MEGA cloud account. You can download files simply by copying them to a different folder. Uploading files is as easy as simply moving them to the mount point.

Be aware that due to how this remote mounted storage works there might be slight delay when downloading/uploading or changing files. A good Internet connection on the server will help quite a bit to combat as much delay as possible. File size of course also matters. The speed you work with is far away from the speed of a local disk.

That's it folks!

P.S. You can use the mount point together with a web server to serve the files you have over your page. Be warned: PHP and similar will NOT work! This can only be merely used to share files, download or view them. You cannot host applications on this mount point (I tried and it didn't work even after several attemtps and some research).


If anyone is able to write a good systemd daemon script I will gladly share it here with (of course) the right amount of respect and credits.
With best regards
Hidden Refuge
IT specialist for system integration

Friedrich Nietzsche Wrote:The advantage of a bad memory is that one enjoys several times the same good things for the first time.
Nice tutorial. Smile

I would suggest to use rclone instead of megafuse though.

By using rclone, you are not limited to mount MEGA only, you can also mount Google drive, OneDrive, Yandex, Dropbox and many others, even WebDAV.

For systemd script, something like this should work:
Special thanks to VPSVortex for a great KVM VPS.

I liked the tutorial.
I didn't get NanoKVM yet xD
Well done bro and thanks for this useful tutorial Heart
Gimme +rep Heart
[Image: img.php?userid=496]
Thanks For Post4VPS and Virmach for the amazing VPS 9

Possibly Related Threads...
Thread Author Replies Views Last Post
  Setting Up a SMF Forum On Ubuntu Rehan 0 53 08-01-2019, 06:27 AM
Last Post: Rehan
  install ogp agent in linux ubuntu os Khadeer143 2 142 07-10-2019, 04:02 PM
Last Post: Rehan
  Installation of Peerflix on Ubuntu 16.04 LTS Server Hidden Refuge 8 1,199 08-25-2018, 09:39 PM
Last Post: K1r1k4z3
  How to set up new VPS with a WordPress Installation deanhills 4 891 06-20-2018, 04:34 PM
Last Post: deanhills
  SSL/TLS Installation via FileZilla Server Rehan 0 488 06-13-2018, 03:24 AM
Last Post: Rehan

Forum Jump:

Users browsing this thread: 1 Guest(s)

Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - SSDBlaze - VPSlices - Abc-Hosters - Hyper Expert - Shadow Hosting - Bladenode - HostDoc - Hostlease

About Post4VPS

Post4VPS is a forum/destiny where you can Delploy Your Free VPSs just by the Power of Posts.

We Provide VPSs of many locations like Germany,US,Canada,France,London,etc.

We also Provide VPSs of Both Linux and Windows OS.