molecules
By:
molecules

Add local Digital Ocean Volume to Nextcloud as additional storage?

December 7, 2017 122 views
Storage Ubuntu 16.04

Hi, I have seen many tutorials explaining how to entirely move the Nextcloud data directory, but I'm wondering if it is possible to keep the current data director, and also add a Digital Ocean Volume located at "/mnt/new-volume"?

For example, can I list more than one directory in the config file:

 'datadirectory' => '/var/www/nextcloud/data',

Alternatively, are there security reasons for just moving outside the "/var/www/nextcloud/data" directory completely?

Thank you!

1 Answer

Keeping your data directory in the /var/www/nextcloud/data directory is not the best idea security wise because it could lead to an easier compromise for a hacker (potentially through command injection or some other method). The chances of this being the case may not be very high but still it's always a good idea to add another layer of difficulty for those trying to remotely exploit your system.

If I were you, rather than adding multiple data directories (not sure if that's even possible tbh) I would check out the External Storage plugin for Nextcloud: https://docs.nextcloud.com/server/9/admin_manual/configuration_files/external_storage_configuration_gui.html. When going to add storage you can choose local storage and select your DO volume.

You can also mount other shares using the occ command implemented in Nextcloud 9:
https://docs.nextcloud.com/server/9/admin_manual/configuration_server/occ_command.html#files-external-label.

Hopefully this gives you a helpful starting point! If you need help totally say so and I can try to start experimenting on my own Nextcloud instance and give you some sort of walkthrough on the commands you would need to use.

Have another answer? Share your knowledge.