Desktop/Mobile Clients to have WOL capabilities prior to sync


Please refer to this file sync study done here NextCloud synchronisation mechanics - WOL compliant maybe? - #2 by fab

I would like to see a feature that allows client apps send a magic packet (for wake-on-lan) to the server hosting NextCloud prior to encapsulate the TCP packets for the data transfer.

Ideally, we have an option with the app settings to enable or disable WOL and if enabled we would enter the MAC address of the Server hosting the NextCloud. This UDP traffic has the ability to listen if the server woke, then such confirmation would automatically evoke the TCP connection establishment (handshake) hence the data transfer could be made.

European environmental protection polices are tightening in to reduce the carbon footprints even more, hence data centers should in a way or other reduce lesser energy and if possible go on hibernation until needed.

Comments are welcome

I fully agree on the idea of your feature request. And for small installations (as mine :wink:) hibernation/wol might be something where you can safe resources realistically.

But unfortunately most big installations (like data centers) I know are designed to run 24/7 and minimize carbon footprint by an “optimized” use of resources.

So depending on your installation this feature will have more or less value for you. This is what you have to keep in mind.

For me personal and my installation this would be a great feature and I do hope that somebody will realize it in the near future.

@Hollerauer thanks for your support. I work with a Government body and our data centers are subject to a lot of audits (ISO 27000, ISO 22300) and energy audits aimed to reduce carbon footprints. Its Europe and polices keep popping like popcorn :wink:

In principle, I can see it working with NextCloud as users have the ability to store data on their local folders then sync on the server when the server is available. Basically the server does not need to be up 24/7 and can hibernate past peak hours.

From a security perspective, myself being an infosec, I would prefer to have servers offline, but available for legitimate users with magic packets (the users would have the MAC address) as its incredible the amount of root login attempts I get from the likes of China despite that we have no domain name but use a static public ip.

@fab I really appreciate your Idea about the “scheduled sync” and hibernate/WOL. And I want to continue the discussion with you to shape the idea.

  • For me one scenario (with the possibilities nextcloud has today) “scheduled sync” can not handle is collaborative work on shared files/folders. This requires an active host managing and publishing changes. And for me this process should not be time driven but event driven. You could argue that a client could have this host-role as well, but this would be something totally different to my understanding of the cloud idea.

  • Another point to mention is, that most of functionality provided by the apps is only usable via the web interface. Means you may not only have sync-client-user, but also web-user. How would you deal with this user group? For me they must legitimate on something like a proxy-server, which will trigger the WOL and forward to the nextcloud-server, to meet your security needs. But this is only possible if you do not use public links (which might be true for your use-case).

One question aside our discussion based on your experience:

How do you deal with this issue at the moment?

@Hollerauer I am absolutely on the same page as you are with regards to availability for collaboration and web browser clients but this can be reduced from 24/7. From a corporate perspective, availability is to reflect the ISP (information security policy - basically ISO 27000, COBIT, etc.) to achieve the CIA (confidentiality, integrity and availability) of data.

There are times of absolutely no traffic even at corporate level. Taking my scenario as an example, office hours are the same for all users and its only occasionally that we connect remotely past the office hours. So keeping to this scenario as an example I would need the servers available for 8 hours a day Monday to Friday, then rely on WOL for any remote off hours connections. This would save up to 128 hours of power consumption per week (6656 hours per year at 1kw/h) as we only work 40 hours a week.

Obviously, different needs require different set-ups that need their respective optimization, hence my request to have WOL as an optional setting :wink:

As to how I deal with the remote root login attempts, I rely on hardening of the server and make use of fail2ban. Not really happy about the last as in itself is at times creating a DoS to legitimate users and truth be said, I was thinking to seek a better replacement.

@fab Save energy is one of my favorite topics :+1:
Unfortunately Nc has no client developer at the moment . For my opinion this could change in the near future as a stable and strong client is key for enterprise installations.
What you can do anyway is a feature request on Nc github, for hibernate/WOL functionality. As you mentioned allready scheduled up time would also be nice.

@Hollerauer I have carried out an overnight test on purpose for this cause were I captured all the network traffic using wireshark. All I got past office hours are Client Hello, TCP and cypher exchanges… No need to keep a 1kw/h power house running for nothing over a span of 15 hours a night :wink:

Here is a screenshot of the capture