Nextcloud Container and external HDD

Hello All,

good day.

im fairly new to the Docker Container world and im trying to move my Nextcloud server to the container.

i can deploy it successfully on a test environment, but im trying to map an externall HDD that will eventually contain all of the data (profiles/pics/data/etc) as it is on my current server.

my current setup is an ubuntu server 20.04.1 and Nextcloud 18 with an external HDD mounted for storage.

so far i havent been able to map the external drive.

can anyone provide any assistance?

Regards!

Which docker image are you using? Or have you created your own image? Why don’t you use latest 19.0.1?

Look at how the volumes are configured here:

https://help.nextcloud.com/t/howto-ubuntu-docker-nextcloud-talk-collabora/76430

You can mount them to external storage the same way.

The general format is
hostpath:containerpath
where hostpath is the path to the folder on the host, and containerpath is where that should be mounted inside the container. You can put hostpath anywhere you like, such as on a mounted external drive.

1 Like

on my physical server im using Nextcloud 18.0.7

on docker the image is 19.0.1

Im using Portainer and when testing creating volumes, they get installed on /var/lib/docker/volumes

so im a bit confused that i cant use them somewhere else.

I’m not familiar with portainer. I use docker-compose and can mount a volume from anywhere to anywhere.

Also, volumes can be two types in Docker. A volume can be stored as a Docker volume, or mounted to a folder on the host.

You can mount in portainer after clicking bind button. See example attached.

yes, i did some reading on the binding vs volume and that is what i ended up doing.

the same screenshot you sent, is what i had to do.

thanks for the follow up… :slight_smile:

It should be possible to create volumes for all the paths. But… Why the hell you should do that?!

i just need the Data folder out so i can put it on an HDD as i have it right now, otherwise my server will run out of hard drive space pretty fast.

also, backup wise will be faster and better since ill be able to backup just 2 folders withe data from users and another for the whole container… :slight_smile:

total noob error… i needed to mount the external hdd… :blush:

now it detects the hard drive as expected.

Using openmediavault makes the disk and raid handing very comfortable. E.g. you can check your disks with SMART and mount/unmount disk, create a Raid mirror etc…
I like the combination of omv with nextcloud.