Run MEGAsync as a Windows Service with AlwaysUp

How to run MEGA Desktop App as a Windows Service with AlwaysUp

Automatically start syncing your files to MEGA cloud storage as soon as your PC boots and keep it up and running 24/7. No need to log in first

MEGA offers secure cloud storage solutions focused on privacy.

The MEGA Desktop App (MEGAsync) is a native Windows application that keeps data on your computer in sync with your MEGA Cloud drive. Unfortunately it only starts after you log in — but AlwaysUp will help you fix that.


To install MEGA Desktop App (MEGAsync) as a bulletproof Windows Service:

  1. Download and install the MEGA desktop app, if necessary.

    Set up MEGAsync for file synchronization or backup and ensure that everything runs as you expect. It's important to establish a solid, working baseline before introducing AlwaysUp.

    For this tutorial, we installed MEGAsync version 5 (64-bit) and configured basic file synchronization:

    MEGAsync version 5 Installed

  2. Next, download and install AlwaysUp, if necessary.

  3. Start AlwaysUp.

  4. Select Application > Add to open the Add Application window:

    Add Application

  5. On the General tab:

    • In the Application field, enter the full path to the MEGAsync executable. By default, you'll find that here:

      C:\Users\[USER-NAME]\AppData\Local\MEGAsync\MEGAsync.exe

      where [USER-NAME] is the name of your Windows account — where you installed and configured MEGAsync.

    • In the Start the application field, choose Automatically, but shortly after the computer boots. With this setting, the MEGA Desktop App will start a couple of minutes after boot — after all your machine's critical networking services are up and running.

    • And in the Name field, enter the name that you will call your application in AlwaysUp. We stuck with the default of MEGAsync but feel free to specify another name if you like.

    MEGAsync Windows Service: General Tab

  6. Switch to the Logon tab and enter the user name and password of the Windows account where you installed MEGAsync. The program needs to run in that account to find its settings:

    MEGAsync Windows Service: Logon Tab

  7. If you'd like AlwaysUp to babysit MEGAsync and restart the application if it ever stops communicating with the cloud, move to the Monitor tab. We'll set up a network sanity check to do the monitoring.

    1. Check the Whenever it fails a periodic sanity check box and click the Set button on the right:

      MEGAsync Windows Service: Enable sanity check

    2. In the Add Sanity Check window, select the Check that your application has open network connections option and click Next to proceed:

      Add a network connections check

    3. The following page allows you to specify what kind of network connections to look for. Since we expect MEGAsync to maintain one or more connections to the MEGA cloud servers, check the Fail if there are no outbound/remote connections box:

      MEGAsync network connections sanity check: Options

      Click Next to continue.

    4. At this point, specify how often AlwaysUp should check that MEGA desktop has a cloud connection. Every 5 minutes should be good enough but feel free to adjust as you see fit:

      MEGAsync network connections sanity check: Frequency

      After you're done, click Next to move on.

    5. And to wrap up the sanity check, confirm your settings:

      Confirm your MEGAsync sanity check settings

      If everything looks good, click Add to record your new sanity check and return to the Monitor tab.

  8. Finally, switch to the Startup tab.

    • Since MEGAsync relies on the TCP/IP stack to so its work, check the Ensure that the Windows networking components have started option.

    • And to empower AlwaysUp to start its copy of MEGA desktop without conflict, check the Stop all copies of the application running on this computer box and the two options below it.

    MEGAsync Windows Service: Startup Tab

  9. We're done configuring MEGA Desktop App as a Windows Service so click the Save button to record your settings.

    In a couple of seconds, an application called MEGAsync (or whatever you called it) will show up in the AlwaysUp window. It is not yet running though and the state will be "Stopped":

    MEGAsync Windows Service: Installed

  10. To start MEGA desktop from AlwaysUp, choose Application > Start "MEGAsync". In a few seconds, the status column will change to "Running" and MEGAsync will be doing its thing in the background:

    MEGAsync Windows Service: Running

    Note that MEGA's task tray icon (MEGA desktop app tray icon) won't come up on your desktop. That's because the program will be running in the isolated Session 0 — the place where Windows Services operate. However that shouldn't be a problem; your files will be synchronized as normal. Now's a good time to open your web browser and confirm that.

    By the way, if you wish to see MEGAsync to make changes or confirm that it's working properly, select Application > Restart "MEGAsync" in this session from AlwaysUp:

    Restart MEGAsync in your desktop session

    That will bring MEGAsync visibly onto your desktop where you can work with it.

  11. And that's it! Next time your computer boots up, MEGA desktop will start up immediately, in the background, without anyone needing to log on. Please restart your computer now and test that everything works as expected after Windows returns to life.

    Finally, please feel free to edit MEGAsync in AlwaysUp and explore the many other settings that may be appropriate for your environment. For example, send an email if the program crashes or stops, set up a weekly restart to cure nagging memory leaks, and much more.



MEGA Desktop not working properly as a Windows Service?

  • Check the MEGAsync log file for warnings an errors that may indicate what's going wrong.

    You can find the log file here

    C:\Users\[USER-NAME]\AppData\Local\Mega Limited\MEGAsync\logs\MEGAsync.log

    where [USER-NAME] is the name of your Windows account.

    Even though the log entries are very technical, they may provide inspiration:

    MEGAsync log file

  • Consult the AlwaysUp Troubleshooter — our online tool that can help you resolve the most common problems encountered when running an application as a windows service.

  • From AlwaysUp, select Application > Report Activity > Today to bring up an HTML report detailing the interaction between AlwaysUp and MEGAsync. The AlwaysUp Event Log Messages page explains the messages that may appear.

  • Browse the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.

  • Contact us and we'll be happy to help!

Our 12,000+ customers include...
AlwaysUp is compatible with Windows 11 AlwaysUp is compatible with Windows Server 2022 AlwaysUp is compatible with Windows 10
Over 97,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 20+ years!