By molecules
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!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.