Introduction: How to Create Your Own Private DropBox With WD MyCloud

About a year and a half ago I bought Western Digital’s 2TB MyCloud, which is a cheap private NAS (Network-Attached-Storage). In other words - It’s a hard-drive with processing and networking abilities, mounted in a nice, clean white form-factor.

During the last year a few good people who also own MyCloud have been exploring the device, eventually providing knowledge and even some nice apps they compiled especially for it (MyCloud runs a lean version of Linux Debian as an OS). Indeed, changing the device’s software voids WD's warranty, but since mine is already over and it’s possible to unbrick it if I do something stupid, I figured - why not?

WARNING: You should take into consideration that messing up with the device's file system voids your warranty and could result in bricking the device. Proceed at your own risk!

In this Instructable I will explain how to set-up a one-way synchronization between a Android phone and MyCloud. This setup can be an addition or a replacement for using your online storage such as DropBox or Google Drive etc. In my case I use this setup to help my girlfriend safely backup her photos and videos.
To allow the synchronization we install and use a protocol called Rsync. This little guy is doing the same thing DropBox does: making sure that two folders remain identical and that a change in one folder takes effect on the other too. Our two folders in this case would be a folder on MyCloud and the photos folder on my girlfriends' phone.

In order to install the necessary app on the MyCloud device we use SSH (Secure Shell). Essentially it's a protocol allowing us to gain access to the MyCloud OS and command prompt. If you have a Linux or OS X machine then you're all settled. Windows users should use applications which allow you to connect to other machines with SSH. PuTTY is a very famous example for such an app (and it's free too!). Here I will use OS X native terminal.

The steps to complete this Instructable are as follow:

1) Create a shared folder on MyCloud for the files we want to backup

2) Configure MyCloud to support Rsync

3) Configure your Android phone to support Rsync

3) Install and execute Rsync on MyCloud

4) Install and execute Rsync on the Android phone

Before we start, make sure you have the MyCloud connected to your home router

Step 1: Create a Shared Folder on MyCloud for the Files We Want to Backup

Go into your MyCloud control center. you can do this by typing the devices' name or IP address in your favourite web browser (in my case it's \\MyCloud\).

Click "Shares" and then click the plus sign (+) under the list of the shared folders. Give name to your shared folder as you desire (mine was "MyPhotos").

Step 2: Configure MyCloud to Support Rsync

Still on MyCloud main control panel, click "Settings" --> "Network"

On this screen we need to take care of two things:

A) Configure a static address to MyCloud (so we won't need to deal with network dynamics). We do that by clicking "Static" near "Network mode" and then clicking "details". A pop-up screen is opened with the network configuration, in which we enter the following values:

- IP address: the IP address we want the device to have. Write this value down for later use.

- Netmask: usually

- Gateway and DNS1: your home router IP address

B) Turn SSH on. Another pop-up screen will be opened with a friendly warning and your SSH login details (user and password). Write them down too.

Step 3: Configure Your Android Phone to Support Rsync

In order for your phone to support Rsync we need to do 2 things: Configure a static IP address like we did with the MyCloud device and install a supporting app. There are lots of apps which support Rsync. In this Instructable I will use SyncMe, which is pretty handful and also freeware.

In order to configure a static IP address:

A) Take your phone and unlock it.

B) Go to Menu --> Settings --> Wi-Fi

C) Long press on your home network and then choose "Change network"

D) Scroll down and mark "Advanced options"

E) Press "IP settings" --> "Static"

F) Scroll down, choose an IP address and write it down.

That's it! you can install SyncMe from google play, however we will go back to it in a few steps.

Step 4: Install and Execute Rsync on MyCloud

Open your terminal or ssh client. My case is the former so my screenshots are from my terminal.

Execute the following commands line by line:

ssh [user]@[mycloudIPaddress] (where user and IP address are the ones we got on the previous step)

(you'll need to type in the password you were given in the previous step)

echo "deb wheezy-64k main" > /etc/apt/sources.list

apt-get update

apt-get install rsync

rsync -r -u /DataVolume/shares/[your_shared_folder_name] [Your_Android_IP_Address]/storage/emulated/0/DCIM/Camera

Step 5: Install and Execute Rsync on the Android Phone

Now back to your phone:

A) Open SyncMe. Make sure you're connected to your home network.

B) Press "Add Computer" --> "Computer name"

C) Wait for it to complete scanning your network, then choose your MyCloud Device from the list

D) Enter your login details under "user" and "password" (those are your WD MyCloud user and password, not the ones you got for the SSH access)

E) After login you'll be back on the main screen and MyCloud will be added to it. Long press the device, press "Add folder" and choose the path to the shared folder.

F) Under "Schedule" choose the timing of the synchronization (I usually do it on the middle of the night)

G) Under "Copy To" choose "Copy to computer and to device"

H) Press "Save"

Step 6: That's It!

Congratulations! From now on your phone will be backing up your photos to the MyCloud folder according to the schedule you have decided. Plus, every change you make on the folder (like deleting a photo) will affect your phone gallery too.