How to Install Bittorrent Sync on the WD My Cloud (Windows)

Hello all, 

I thought there might be others who would be interested in how to get BTsync on their My Cloud.  Personally, I have very very little experience with SHH or Linux, as a result it took me a dreadfully long time to find posts with instructions that I could understand, and all the information I did find was on separate web pages and wasn’t tailored to the My Cloud.

So, I thought I’d put a little tutorial together with the intention of helping other users who know very little about Linux or SHH etc etc.  I’d like to make you aware that I am unsure of WD’s stance on doing this and your warranty, I would imagine it would void your warranty, and whilst this worked for me I can’t be held responsible if you mess it up or it doesn’t work for you.

Tampering could BRICK your system and VOID your warranty, if you understand the risks, and accept them, lets continue!

1). Firstly you will need to download Bittorrent Sync, specifically the ARM variant. 

http://www.bittorrent.com/sync/downloads/complete/os/arm

2). Once downloaded, you will need to access your My Cloud and extract the file you just downloaded (should be called btsync_arm.taz.gz) into your ‘Public’ folder.  Realistically, you could place this elsewhere, but as a novice user I would suggest keeping it in public, as if it isn’t this tutorial won’t work for you.

3). Now you will need to log into your router using your web browser to enable something called SHH.  I get to mine using http://192.168.0.5   This may be different for you, apparently you should be able to get to it by using http://wdmycloud/  sadly I can’t.   Once there goto settings → Network → enable SHH (should be a slide box you can click)

4). Download something called Putty to your computer. 

http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

5). Open and enter the IP to your My Cloud, mine was 192.168.0.5

6). username: root

Password welc0me

^^ yes that is a zero, in welcome not a letter

7). Now you’re in, type 

cd …

press enter.

8). next type

chmod +x /shares/Public/btsync

press enter

9). next type

/shares/Public/./btsync

press enter.

10). It is installed :slight_smile: and should be working.  To get to BTsync its your routers IP:8888 

so mine is 168.192.0.5:8888

Sadly, if your Mycloud powers down, BTsync wont automatically restart unless you go back in using Putty and writing

cd…

enter

/shares/Public/./btsync

 

If you would like an install script so BTsync automatically restart, keep reading.  This works perfectly for me.

1). Close Putty.exe, then start putty.exe again and re login using the same information we used at the top of the page (User: root      Password: welc0me ).

then type 

sudo nano /etc/init.d/btsync

enter

2). Then copy the bold text below, and when you right click in putty, it should automatically paste it in.

 

#! /bin/sh

# /etc/init.d/btsync

#

 

# Carry out specific functions when asked to by the system

case “$1” in

start)

    /shares/Public/btsync

    ;;

stop)

    killall btsync

    ;;

*)

    echo “Usage: /etc/init.d/btsync {start|stop}”

    exit 1

    ;;

esac

 

exit 0

 

3). Aslong as you originally extracted the btsync_amd.tar.gz into the public folder, the above script should work perfectly, if you extracted elsewhere, will need to change the section in bold and italic.

4). To save your changes, you need to press CTRL and x (at the same time) and then press ‘y’ to save your changes.

5).  Next type

sudo chmod 755 /etc/init.d/btsync

enter.

6). next type

sudo /etc/init.d/btsync start

enter.

7). Then type;

sudo /etc/init.d/btsync stop

enter.

8). Finally type

sudo update-rc.d btsync defaults

enter.

You’re all done :).  I’d log back into your Dashboard and disable SHH untill you personally need it again.

As mentioned, I found this information from different sources and tweaked it slightly to suit our cause and then put it together in one place.  The original information can be found;

http://blog.bittorrent.com/2013/08/20/sync-hacks-how-to-sync-without-data-loss-using-btsync-raspberry-pi/

http://forum.bittorrent.com/topic/17214-help-installing-bt-sync-on-wd-mybook-live/

8 Likes

Thanks to take your time to share this!  :smiley:

Please add an advise in bold that procedure will void warranty. 

Newbies (and not so newbies)  are very prone to softbrick their MyCloud without knowledge of this “little”  detail… 

No problem :slight_smile: really all I did was put two sources together, I know very little about what I did, just that it worked.  Added the disclaimer.

1 Like

This works great, thanks a lot!

THANK YOU! 

definitely seems very easy… gave you a kudos… will definitely try on a rainy day

* SOLVED

Just found the solution I needed, posted by nicopizza here:

http://community.wd.com/t5/My-Book-Live/BitTorrent-Sync-installation-script/td-p/588057


Thanks for these instructions

This worked for me on the MyCloud but when I try to install btsync on my MBL I get the error:

-bash: ./btsync: cannot execute binary file

Any suggestions please?

Thanks folks.

I managed to follow the instructions (well written)

But, I must have made something wrong.

In my Bittorrent GUI ( http://192.168.1.163:8888/gui/en/index.html)) it looks allright:

Folder *********************** Size**************Connected devices and status

 

/shares/Public/sync      *       13,7 MB in 5 files  *  FUJITSU2012  *  Synced on 05/02/14 14:53:40

                                          *                                       *   M1176        *         Synced on 05/02/14 14:03:05

Here’s my problem:

When I open my folder in File Explorer (Windows 7) its empty.

\WDMYCLOUD\Public\sync

If I try to add a file or folder to \WDMYCLOUD\Public\sync

I’ll get a permission message:

“You need permission to perform this action” (Translated from Swedish Windows 7)

What’s wrong with my setup

/Peter

Hi Peter,

Did you get this sorted already?

It seems like you are trying to add a file from the via the windows share. You must understand your windows pc does not access the WD My Cloud as the same user that created the folder (Root) or the same group, and thus has no permission to write to that folder. You therefore need to add  pwrite ermissions for “others” to your shared folders (chmod o+w /shares/Public/sync -R).

Cheers,

Yahav

yahavrave wrote:

Hi Peter,

Did you get this sorted already?

It seems like you are trying to add a file from the via the windows share. You must understand your windows pc does not access the WD My Cloud as the same user that created the folder (Root) or the same group, and thus has no permission to write to that folder. You therefore need to add  pwrite ermissions for “others” to your shared folders (chmod o+w /shares/Public/sync -R).

Cheers,

Yahav

    • *> It works now.> Don’t know exactly what I did :-)> I think it started after a reboot of my WDMyCloud…> /Peter

 

Just a small note… it’s actually SSH , not SHH… it stands for Secure Shell.

Anyway, my real question is that I have really been wondering about Sync ever since it came out. I understand how it can improve performance and be of utility over a distributed network and over a WAN, but hypothetically, if you are using Sync strictly for LAN transfers… what benefit, if any, would it provide over just a standard file copy?

Example: I have a recorded video on my iPhone and I can use Sync to transfer that movie over to another single local destination, or I can get it to the drive by any number of other means… the WD app, I could FTP in and transfer, just connect to the SMB share and copy the file over, ad nauseum.

So that’s what has been bothering me. I see no benefit for using this tech in a LAN-only environment as a strict “file transfer” utility.

In fact, transferring movies from the iPhone to my PC (gigabit hardwired PC + wireless-N on phone)  I get a pretty miserable 1,200KB/s transfer/upstream iPhone->PC.

Am I correct in assuming that torrent technology is all but useless without multiple sources holding/seeding the same data? Due to its nature, it was never meant as a direct point-to-point (1:1) protocol. Therefore, in assuming that-- what are you guys using this daemon for on the NAS? Like give me a practical example or two if you would.

I’m not at all confused by the torrent technology or distributed/pooled resources, (or tech concepts in general)… I actually have a Computer Science degree, but lately my brain is so zonked I can’t think straight and when this came out, my thought was simply “what is this doing or able to do that I couldn’t do using a bittorrent client and just manually setting this up?”… is it just simplicity or not having to go through the whole process to create and set up a pretty pointless single point-to-point torrent transfer?

Someone just please clear my head up. I feel like a complete ■■■■■ since I’ve never had the kind of cognitive problems I’ve had lately and I find it increasingly difficult to visualize basic concepts that I have known in great detail for years. I find myself completely scrambling structure/order/abstraction type ideas. There’s some problem developing upstairs that is progressive and troubling, actually. But sorry. Tangiential blabbing. Younger peeps-- this is what happens once you hit 30. It’s downhill from there, I’m seeing it first hand! Ahh! :cry:

But in your explanation, you can be as technical as you want. I can understand things fine when told by others to me, I just can’t understand them when I’m pulling abstract/concept ideas from my own mind/memory. And for some reason, this is one of those simple things that I just cannot wrap my head around: Why this “new” (not really) application is any better than the original concept, which it’s based on anyway?! Why was it even created, unless for pure simplicity and portability (likely another powerful motive, being able to have torrent tech integrated into NAS devices and other things like expanding it to mobile devices, etc).

So I see 1- convenience/less trouble to do something simple 2- opening of the tech to allow for seamless cross-architecture compatibility. Maybe I’m overthinking it. Likely, I am…

Thanks in part to this thread, I was able to get btsync installed and running on my WD My Cloud Mirror 8TB. I set up one synchronized folder as a test, and also tested the camera roll backup from the Btsync iOS client.

It worked great for a couple days, but then randomly btsync stopped running. The webserver (port 8888) wasn’t responding, and when logging in via SSH I could verify that btsync was no longer in /usr/bin where I had placed it, and my /etc/init.d/btsync was also no longer there. 

Thinking it was a glitch, I reinstalled, set up my folders again, and all was good for another day or two and then the same thing happened, it seems that somehow my modifications are getting clobbered. Perhaps the drive reboots itself (I have it set to not sleep)? Is it something to do with the way the RAID works between the two drives? Is /usr or /etc off-limits? Should I put btsync in /mnt/HD/HD_a2/Nas_Prog, does that protect it? And if so, how do I make sure btsync restarts after a reboot?

Anyone have any suggestions? 

great help!

thank you.

Hi:

One question:

in you init.d file, can I define the priority of the btsync, so that the sync work starts in a lower priority?

BTW, in the  http://community.wd.com/t5/My-Book-Live/BitTorrent-Sync-installation-script/m-p/588105/highlight/true#M24724 , how can we get log into the web page like the pic?

thank you so much.

So while i’ve got this running on the ED cloud (This was simplest addon/mod for this drive by the way so far.)

I see that the ARM version only comes with the btsyn binary file that you simply run to start the service.

Where is the advanced config for this program? e.g what if i want to use options like, use read only mode, or skip certain subfolders etc…

I’ve read online and the powerpc version seems to have a “btsync.conf” file which doesnt seem to exist for the arm version.

The gui interface only has the basic option of adding a folder.

Thanks

Just wantd to add that while btsync is super cool. it DOES NOT let the wd cloud drive to goto sleep.

The drive keeps waking up after 50sec after going into standy

Jun 30 17:08:09 nas1 logger: exit standby after 50 (since 2014-06-30 17:07:14.123186001 -0400)

Jun 30 17:18:09 nas1 logger: exit standby after 50 (since 2014-06-30 17:17:14.103186001 -0400)
Jun 30 17:28:09 nas1 logger: exit standby after 50 (since 2014-06-30 17:27:14.083186001 -0400)
Jun 30 17:38:09 nas1 logger: exit standby after 50 (since 2014-06-30 17:37:14.103186001 -0400)
Jun 30 17:48:09 nas1 logger: exit standby after 51 (since 2014-06-30 17:47:13.943186001 -0400)
Jun 30 17:58:09 nas1 logger: exit standby after 50 (since 2014-06-30 17:57:14.113186001 -0400)
Jun 30 18:08:09 nas1 logger: exit standby after 50 (since 2014-06-30 18:07:14.083186001 -0400)
Jun 30 18:18:09 nas1 logger: exit standby after 50 (since 2014-06-30 18:17:14.093186001 -0400)
Jun 30 18:28:09 nas1 logger: exit standby after 50 (since 2014-06-30 18:27:14.083186001 -0400)

Thank you for the guide. it works well on my device now.

I have two questions here:

  1. what should we do if bt sync get updated? especially, it has been said that all the bt sync versions need to be the same for them to function.

  2. what will happen if we update the firmware? will that erase all the installation and we need to reinstall the software?

thanks

btsync is not really installed. Its just a binary file that is run to start the btsync process.

As long you as keep the btsync.sh in a folder that is not over written or something during updrage, an upgrade should not be an issue.

same goes for the btsync update. If there is a new package that is out, simply download that put/run on the drive.

do you mean that, if there is a new version of btsync, I just unzip it into the public folder, overwriting the old version? do I need to stop the bysnc running before I do it? if so, what command I should use?

Thanks

my “my cloud” automatically update it. and now it does not work. when I use "

/shares/Public/./btsync"

it says “killed”.

is seems my cloud kill everything. any suggestion?