Save Seafile data to external hard drive

Running your own cloud with Seafile on the Raspberry Pi* is a great cost-effective way to store, manage and share your data with full control. The joy can be quickly clouded when the storage capacity of the SD card* is reached. It is obvious to use an external hard drive*. I recommend a hard drive with its own power supply.

A few lines of code are enough and your storage capacity has already been greatly increased.

First, we connect the hard drive to the Pi and identify it in the terminal with:

sudo blkid -o list -w /dev/null

You should get the following output (or similar):

device fs_type label mount point UUID
/dev/mmcblk0p1 vfat boot /boot 5203-DB74
/dev/mmcblk0p2 ext4 rootfs / 2ab3f8e1-7dc6-43f5-b0db-dd5759d51d4e
/dev/mmcblk0 (in use)                       
/dev/sda1 ext4 /mnt/cloud a219dccf-fe75-4423-8b85-ea913fe039a5

We are interested /dev/sda1 (mmcblk* is the memory card). We now format the hard drive (ATTENTION: all data will be lost!) and create the right file format directly:

sudo mkfs.ext4 /dev/sda

Then we create a mountpoint (path to the hard drive). In the example above, you can see that I have already mounted this under /mnt/cloud.

sudo mkdir /mnt/cloud #the Mountpoint you can choose freely

Now we instruct the Pi to connect the hard drive automatically when restarting. To do this, we open the fstab and insert the line at the end.

sudo nano /etc/fstab
/dev/sda1 /mnt/cloud ext4 rw 0 0

The hard drive can now be connected correctly to:

sudo mount -a

Now we create a folder on the hard drive and assign write rights for seafile:

sudo mkdir /mnt/cloud/seafile
sudo chown -R seafile:seafile /mnt/cloud/seafile

Finally, we stop Seafile, switch to the user seafile, move the data and create a symbolic link. Then start Seafile.

sudo systemctl stop seafile seahub
sudo su seafile
mv seafile-data/ /mnt/cloud/seafile
ln -s /mnt/cloud/seafile/seafile-data/ /home/seafile/seafile-data
sudo systemctl start seafile seahub

From now on, all files are located on the external hard drive*.

Bring Seafile Online and create SSL certificate

Switching to HTTPS – signed SSL certificate

This is only necessary if you want to reach the Seafile server on the go. To do this, you have to create a DynDNS address in advance, for example in the case of or You’ll have to include this in your router and release ports to the Raspberry Pi. The following port is required:

The Raspberry Pi, as a standard user, will continue:

Continue reading “Bring Seafile Online and create SSL certificate”

Install Seafile Server on Raspberry Pi – Instructions


A RaspberryPi (for example, the “Starter Kit“)* is available, the operating system “Raspian” is installed and of course connected to the network. You know the IP address of the RaspberryPi. You can find them in your router or enter in the console ifonfig. SSH access is enabled. I always put an empty file named “ssh” in the boot partition. Then we install Seafile.


Log in to the Raspi by SSH – ssh pi@raspberrypi (password: raspberry)

Continue reading “Install Seafile Server on Raspberry Pi – Instructions”