Question

Add local Digital Ocean Volume to Nextcloud as additional storage?

Posted December 7, 2017 3.6k views
Ubuntu 16.04Storage

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
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.

Submit an Answer