Featured image of post Compile your own binaries for WD MyCloud OS5

Compile your own binaries for WD MyCloud OS5

Compile your own binaries for your Western Digital MyCloud OS5 like a pro. Just need a docker and follow the steps described here

Recently, I bought a WesternDigital MyCloud PR2100 NAS. It runs a simple Linux OS with some pre-built packages but somehow I feel it’s not enough and it could be used for more stuff, so I thought “can you imagine running Docker and deploying your own Dockerfiles on this thing?”. And well, now I have an answer for that: “yes, you can!”.


Let’s see how it works. The NAS has a simple hardware setup:

  • Intel Pentium N3710 quad-core @ 1.60Ghz x86_64
  • 4GiB DDR3 1600Mhz 2x2gb dual-channel
  • 2 ports gigabit ethernet (bonding configurable)
  • 2x SATA3 6Gbps ports hot-swap

This setup it’s already far from brand-new and has been present for a few years, mainly for non-technical audience. However, those are not bad specs at all. Just remember the latest Raspberry Pi v4 with 8GiB of RAM, for example. It’s not that far from it, right?

Anyway, you’re here because you want to install more packages in your WD MyCloud OS5, so let’s focus on that.

Grabbing the binaries

First of all, you need a computer with Docker engine already installed, say a laptop for example, then go ahead and clone this repository. It is where the WD Community puts its own source packages to be compiled locally and installed in your NAS:

$ git clone https://github.com/WDCommunity/wdpksrc.git
$ cd wdpksrc

Now, its time to let Docker work:

docker build -t wdpk .
docker run -it -v $(pwd):/wdpksrc wdpk /bin/bash

If everything went right, you will see some like this:

root@021ca29af42e:/wdpksrc# ls
Dockerfile  LICENSE  README.md	build.sh  build_and_install.sh	mksapkg-OS3  mksapkg-OS5  packages  tests  wdpk

On this environment, we can build any package inside wdpksrc directory. On this example, we are compiling a Docker package, so just run:

cd wdpksrc/docker

The process will take around 1 minute or so.

Installing packages on a WD NAS running OS5

After the process has been completed, you will have available a .tar.gz file containing the binaries on the packages/ directory. Uncompress the .tar.gz and install the package through your WD MyCloud OS5 web UI.

When you are done installing it, connect via SSH to your NAS. Then you should have available the docker command. Beside this installation, you will also have a Portainer web UI available on this URL: http://IP_NAS:9000/

That’s it! Now you can explore the public Docker images and run whatever you want in your NAS. If you are thinking of running a PiHole instance, just hold on and read the next post.


Built with Hugo