MyCloudHome and Linux Integration
So, some time ago I bought WD (Western Digital) My Cloud Home HDD 6TB (Product Link) for project sync (I’m working on a directory in my workspace and then sync it to the cloud), data backup (disaster recovery in case something bad happen) and time-machine snapshot for my computers both Windows, Linux Fedora, and Mac (Macbook Pro 2020 Intel i5. The device has been returned to the office per my resignation at Feb 25, 2022.).
Found out, the official apps didn’t support for Linux operating system. Meanwhile I do some freelance works and most of the time I’ll use my Fedora Linux. One day come where I need to sync my freelance works to the cloud like I’m used to be working at Mac.
Later, I found out that linux-based machine can integrate well with WD My Cloud Home, but you need additional tools to make it works named MCH FUSE. Thanks to mnencia.
MCH FUSE basically mount the WD My Cloud Home (MCH) to your local machine using FUSE (Filesystem in USErspace) using WD MCH Device API). The setup is pretty simple and straight forward. Here’s the required steps that you need to do.
- Download the latest binary from the releases page or download the binary directly using cURL. Don’t worry about the platform architecture since the shell script automatically detect it.
curl -sSfL https://github.com/mnencia/mchfuse/raw/main/install.sh | sudo sh -s -- -b /usr/local/bin
- Create a new folder where the MCH will be mount (in my case I’ll name it
cloud
and put it under/mnt/
directory) and a new plaintext file namedmchfuse.conf
on your disk. Basically there is no strict rule where you put the file in, but I preferrably put it on config directory located in$HOME/.config/mchfuse/mchfuse.conf
. Don’t forget to create the directory first.
$ mkdir -p $HOME/.config/mchfuse /mnt/cloud
$ cat > $HOME/.config/mchfuse/mchfuse.conf << 'EOF'
username = "EMAIL" # email to login to home.mycloud.com
password = "PASSWORD" # password to login to home.mycloud.com
uid = 65534 # your linux user id
gid = 65534 # your linux group id
EOF
Basically, it will create a file named mchfuse.conf
that contains the username and password to login to home.mycloud.com and the UID/GID of the owner of the files in the disk. 65534 is owned by nobody
so everyone in the machine can access the disk. If you need to restrict the user, you can replace it by your own UID/GID by checking it from /etc/passwd
.
- Before mounting the disk, you need to check the MCH disk name. By checking the current device page (take a look at picture below) or you can try random name until the
mchfuse
will inform you available disk name in the network later. Now execute this command
mchfuse -c $HOME/.config/mchfuse/mchfuse.conf "{{ DEVICE_NAME }}" "{{ MOUNT_PATH }}"
You can replace DEVICE_NAME with your MCH disk name (mine is “Vinsen’s My Cloud Home”) and MOUNT_PATH with the fullpath where you want to mount the MCH disk (mine in
/mnt/cloud
).
- Done, you can works with your MCH disk on your Linux machine and open the files inside like normal external HDD. You’re good to go.