Install Seafile Server on WD My Cloud HomeAugust 18, 2021
The WD My Cloud Home series comes with an Android operating system customized by WD. However, this has some drawbacks:
Access to the storage is only possible when an Internet connection is active and only via the official apps. There is no possibility to establish a local connection via common network protocols like SMB or FTP. SSH can also no longer be enabled, unlike the predecessor without “Home”.
However, this can be bypassed quite easily. You just have to replace the operating system with a reasonable Linux, in this case Debian with OpenMediaVault. How to do that you can read here.
If you followed the instructions, you now have a WD My Cloud Home with Debian and OpenMediaVault. But on it we can also install other software, in this case “Seafile”.
Seafile is a cloud service that can be hosted on a single board computer. It is similar to Nextcloud, but lighter and easier to install. The speed is sufficient with SQLite if only one or two users access it. It stores all files in a database that can be mounted as a drive with clients.
Smartphone apps allow automatic backup of photos. IPhone photos are automatically converted to Jpeg.
To get started you need to connect to the WD My Cloud Home via SSH.
Install Seafile Server on WD My Cloud Home with Debian
Create a new user named “Seafile” that can log in and run the commands needed to install Seafile.
adduser -home /home/seafile -shell /bin/bash seafile
Since no bashrc was created, copy the one from user buster:
cp /home/buster/.bashrc /home/seafile/.bashrc
chown seafile:seafile /home/seafile/.bashrc
chmod 755 /home/seafile/.bashrc
Create a space on the data partition for your database and files:
chown -R seafile:seafile /mnt/data/seafile
chmod -R 777 /mnt/data/seafile
Create a location to store the log files (this helps to store the seafile log and pids with folder2ram in RAM)
chown -R seafile:seafile /var/lib/seafile
chmod -R 777 /var/lib/seafile
Install both SQLite and Python before installing Seafile.
apt-get install -y sqlite3 python3
Log off from SSH.
Log in again as user Seafile.
Visit https://github.com/haiwen/seafile-rpi/releases to get the latest version of Seafile Server. Download the server version for Raspberry Pi (Debian Buster and ARM64)
tar xzfv seafile-server-8.0.5-buster-armv7l.tar.gz
Install Seafile using the script.
Before starting Seafile, move the seafile-data directory to the data partition, otherwise it will soon become too large to be stored on the root partition.
mv /home/seafile/haiwen/seafile-data /mnt/data/seafile/
ln -s /mnt/data/seafile/seafile-data /home/seafile/haiwen/seafile-data
mv /home/seafile/haiwen/pids /var/lib/seafile/
ln -s /var/lib/seafile/pids /home/seafile/haiwen/pids
mv /home/seafile/haiwen/logs /var/lib/seafile/
ln -s /var/lib/seafile/logs /home/seafile/haiwen/logs
Edit the gunicorn.conf file to make the server accessible from other computers.
In gunicorn.conf.py, change the bind line from 127.0.0.1 to 0.0.0.0. Otherwise, the server will not accept requests from outside localhost (it’s silly to use this as the default for a server program).
Save and exit.
Let Seafile start at boot time:
add mysql.service or postgresql.service depending on your database to the lin$
Save and exit
change start to start-fastcgi if you want to run fastcgi
Save and exit.