Adding external HDD

Hi guys,

I am running into some issues when I am trying to add my HDDs to Nextcloud.

My drive is mounted to “/media/WD”, but I am unable to add this to my Nextcloud.

The “WD” drive is discoverable, and I have set full access for everyone, so it should be seen by Nextcloud too. Maybe I need to add the drive to docker settings too?

This is the Nextcloud I have:

Any advice or idea is highly appreciate!

Hi there!

You need to create a bind mount that connects your external drive (on the host system) to a path inside the Nextcloud container. Here’s how to do it properly:

  1. First, make sure your external drive has the correct permissions:
sudo chown -R www-data:www-data /media/WD
sudo chmod 750 /media/WD
  1. Then modify your Docker configuration to include the bind mount:

In the CasaOS App Settings for Nextcloud, add a new volume:

/media/WD:/data/WD  # or another appropriate path inside the container

For BigBearCasaOS users, you could alternatively mount directly to:

/media/WD:/var/www/html/data/WD  # mounts to the Nextcloud data directory

Or you could move everything to the external hard drive:

  1. After making these changes, restart your container.

  2. You might need to run a file scan:

docker exec -u www-data nextcloud php occ files:scan --all

Important tips:

  • Avoid mounting directly to Nextcloud’s main data directory to prevent data loss during container rebuilds
  • Consider using the External Storage app in Nextcloud as an alternative approach
  • If your drive is NTFS/FAT32, you might face permission issues - EXT4 works better with Linux containers
  • Make sure your external drive mounts automatically at boot time by using fstab.
1 Like

Thanks for your reply!
Could you please tell in which tab should I add the volume? As I have 4 tabs :sweat_smile:

A few other things I might have missed adding:

  • I am running CasaOS on Debian

  • I do have the External Storage app installed

  • Both HDDs I have are EXT4 format

  • Both HDDs are mounted automatically when booting up

Also missed to say that the drive is mounted to “/media/user/WD”