WD NAS App Builder

All apps

ValKey 9.1.3

A fast in-memory key/value database, and a drop-in replacement for Redis

databases

Download

NASSizeSHA256
My Cloud PR41002 MBDownload23b8c77216169ae2…
My Cloud PR21002 MBDownloade5015a6aac6072dd…
My Cloud DL41002 MBDownload1636e38e13543928…
My Cloud DL21002 MBDownload7a8b0ca62b006e06…

Not available for: My Cloud EX4100, My Cloud EX2100, My Cloud EX2 Ultra, My Cloud Mirror (Gen 2), My Cloud (Gen 2), WD Cloud.

Easier: install it from the Store, which also updates it.

ValKey is an open-source, fairly licensed, drop-in replacement for Redis. By default it will run on: 0.0.0.0:6379 and can be accessed via the valkey-cli (or redis-cli) command. The config file is available at /etc/valkey/valkey.conf.

Password

ValKey listens on all interfaces, so a random password is generated on first install. It is the requirepass line in the config file (readable by root only):

grep requirepass /etc/valkey/valkey.conf

Connect with REDISCLI_AUTH=<password> valkey-cli, or run valkey-cli and type AUTH <password>. Avoid valkey-cli -a <password> where you can, as it leaves the password in your shell history and the process list.

Changing the password

The easiest way is ValKey's page in the NAS dashboard (Apps → ValKey): it shows the password and can change it - to one you choose, or a generated one. The change takes effect immediately and is saved, so update your clients too. Only NAS admins can use the page (see Management pages).

It can also be done over SSH:

  1. Generate a new password (or choose your own, letters and numbers only):

``sh tr -dc A-Za-z0-9 </dev/urandom | head -c 32; echo ``

  1. Edit the requirepass line in the real config file, which lives in persistent storage on the installation volume, e.g.:

``sh vi /mnt/HD/HD_a2/Nas_Prog/_valkey/valkey.conf ``

Don't edit through /etc/valkey/valkey.conf with sed -i or similar tools: /etc/valkey/valkey.conf is a symlink into a RAM disk, and those tools replace the link with a plain file, so the change is silently lost on reboot.

  1. Apply it without a restart:

``sh valkey-cli AUTH <old_password> CONFIG SET requirepass <new_password> ``

Connections that are already logged in stay open. Don't use CONFIG REWRITE, as it writes to /etc and has the same symlink problem as above.

Alternatively, restart ValKey to load the file (adjust the volume to match your install):

``sh /mnt/HD/HD_a2/Nas_Prog/valkey/stop.sh /mnt/HD/HD_a2/Nas_Prog/valkey /mnt/HD/HD_a2/Nas_Prog/valkey/start.sh /mnt/HD/HD_a2/Nas_Prog/valkey ``

  1. Update any apps or clients that connect to ValKey with the new password.

If the requirepass line is ever deleted, a new random password is added the next time the app initialises (on reboot or reinstall). The config file survives reinstallations, so the password is kept.