Self-waking Computer For DIY Cloud Storage


[Dominic] decided to take control of his cloud storage by switching to OwnCloud. Unlike most cloud storage solutions, this isn’t a company offering you free space. It’s an open source software package which your run on your own machine. [Dom] didn’t want to leave his box running 24/7 as it would be unused the majority of the time. So he hacked this router to switch on the computer whenever he tries to access the storage.

Obviously this is a Wake-On-Lan type of situation, but the hardware he has chosen to use doesn’t include those features. Since he already had this TP-Link 703n on hand he decided to use it as a controller for the computer. His method is quite clever. The router is running a script that monitors the computer and the bandwidth it’s using. When traffic from the network stops, the router will issue a shutdown command within just a few minutes. It then assigns itself the computer’s IP address so that it can listen for incoming requests and use the relay on that breadboard to turn the box back on. Obviously running the embedded system is much more efficient than having an entire computer turned on all the time, and it’s WiFi capabilities mean no cords to run to the home network.

39 thoughts on “Self-waking Computer For DIY Cloud Storage

  1. I’ll just pick that nit and mention this is just remote storage, it’s not ‘cloud’ storage. Cloud storage has multiple redundancy across multiple locations.

    But a nice hack to use a router to control the uptime of a machine. I can see a lot of uses for that.

    1. This is also not just a WOL. There’s no magic packet being sent, the router is waiting watching for “any traffic on port 443 or port 80”.

      This means that you wouldn’t need to use a separate router web gui or an app to send magic packets.

  2. I recently solved a very similar problem. I started out with a similar approach with a server + a router to help it wake up. Problem was that ip stealing for monitoring wakeup requests was very fragile. Server and router could get out of sync and bad things would happen.
    Instead I wrote a tool that monitors arp requests and issues wakeup commands based on those. Arp starts broadcasting once the machine has not been reachable for a while.

    1. the ARP packets were the first things I noticed and started to code for. during testing, however, ARP was significantly delayed after the machine powered off, so it was unsatisfactory.

      as far as the server and router getting out of sync, i handled that by plugging the server INTO the router, and this is the interface through which the router pings the server. not the most elegant solution, but reliable and fast.

  3. I always get a good laugh when I see ‘professional solutions’ with illiterate people behind it. Especially the cloud solutions that not only lack actual cloud infrastructure, but claim to have FIPS certification on a blade they rent and have no physical access to…

    But hey we’re all hackers, geeks, and physicists XD

    1. But hey, luckily everyone is not a know it all jerk like you! Some people just think it is cool to see other people share their projects, perfect or not. They probably learned more getting it to work than you learned making fun of them. Oh, and the correct sentence would be “when I see “professional solutions” with illiterate people behind THEM. Plural. Or, a “professional solution” with illiterate people behind IT. Idiot.

      1. lol… I’m not even English and I know how to use quotes better than you… I was paraphrasing, so I was correct and whoever taught you to use double-quotes to paraphrase sucks at English grammar… American ammmaright?

    2. I’m sure your mother is proud of you and your constructive criticism.
      Tough guys and geniuses of the internet:
      Why do you try so hard to get a rise out of people by belittling them?
      And if you are truly as invaluable as you claim, how do you have the time to squabble
      with those whom are not your intellectual equals?
      Shouldn’t you be counting your money and plowing your troves of women?
      Don’t reply to this. It would be a waste of your precious time. The world needs you.

  4. The cpu’s io pins are interfacing directly to the relay? Yikes, put a transistor and diode on that stat, else your router won’t be the one waking up sometime due to inductive kick-back stress.

    1. still need to do this. every transistor i had on hand is tied up in another project, and i’ve never actually bothered to purchase diodes. i will be salvaging some parts from dead electronics and adding this soon. thanks for the constructive criticism!

        1. It uses webdav, which is…. common, open standard. ssh/scp is all very well, but if you have files that you want to just sync between your linux and android and iOS and OSX and Windows devices, and you don’t want the space limitations and possible implications of giving all your data to a 3rd party, then OwnCloud is a very good solution.

    1. allows you to say cloud because it’s not on the local physical device…

      Scary thing: People who don’t know what cloud infrastructure actually is are the ones getting jobs with infrastructure companies because an ape can pass the CCN* and get a degree in America…

      Related to this article: Most systems have firmware level support for wake-on-lan and all OSes have sleep state APIs with page-to-disk support built into kernel…

    2. A neat GUI with PIM and built-in viewers that can be used to it’s fullest extent from any device that has an HTML5 browser without leaving any marks or having to install anything that an average non-techie’s computer doesn’t already have installed and can be extended with custom functionality such as that found here:

      I don’t use any of these new “cloud” things either but I openly admit that it’s because I’m old and old people doesn’t like change, not because they have nothing good to offer (they do).

    3. The biggest attraction is the availability of integrated smartphone client tools. There are iPhone and Android clients that can upload, download, edit and view photos, music, stupid cat videos, PDFs, Word documents, password files, or whatever. There are iPhone apps that have other data transfer needs that can incorporate OwnCloud as their storage mechanism. (Granted, the iPhone database I use is the completely awesome MyStuff2, and it can do FTP so I don’t need it to have OwnCloud integration. I do, however, have to be home as I won’t FTP over the intarwebz.)

      Think about the many people who need smartphone integration and have less than technical users who use something like DropBox for easy shared access to files.

      The problem with DropBox, Google Drive, iCloud (and their ilk) are that they’re owned and run by others on a for-profit basis, and who are monetizing them in strange ways. For example, a friend started getting a lot of online web ads for Spaghetti-Os, which he found odd as he’s never eaten them. He then realized he’d uploaded a Word document with a short story about Spaghetti-Os to DropBox, and determined that they scan the materials being stored inside them, looking to sell data to advertisers. Running your own instance of OwnCloud won’t betray you in such a fashion.

  5. This is very brilliant! I never would’ve considered a solution to the problem of storage power usage; I just have my FTP server running 24/7 [although it’s just a Raspberry Pi + Powered USB Hub + 500GB USB Drive]. This is one of those interesting articles that keeps me coming back to HaD!

  6. Absolutely not trying to take anything away from this rather nice hack, but it’s the same idea as Apple’s Sleep Proxy. As a network admin I don’t like sleep proxy, purely because at first sight it looks like someone is trying to run an arp-spoofing attack!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.