Setup NextCloud docker running config on RPi4's ntfs external drive?

Hi all, this is my first time setting up NextCloud so forgive me when I’m asking some stupid questions here.

My goal is to set up NextCloud docker in rasbian OS and store the important configurations in the external drive. I hope that if I screw up my OS later, I can still bring my nextcloud back up with the stored configurations, especially my albums back online (I’m not sure where and how nextcloud store the info about which photos go into which albums, so I’m going to assume it is in the configuration).

Right now I have nextcloud docker installed, but I failed when I want to redirect my volumes to the external ntfs drive. The error I got was

“Your data directory is readable by other users. Please change the permissions to 0770 so that the directory cannot be listed by other users.”

I guess I need to work on my fstab file a bit more to resolve this issue, but I found another post saying my method might not be a good idea since nextcloud only accept ext4 external drive. What’s the better way to achieve my goal if this is not a good setup?

Thanks.

Hi @tamashika!

This is what backups are for. Regardless of what countermeasures you take now please please implement a backup strategy too.

The album info will be in your database (mostly) so MySQL/MariaDB/etc, but the photos themselves will be stored in your configured data directory as regular files.

Why NTFS? Is that a hard requirement for you? (The answer will probably drive the answer to your remaining question so I’ll not address it directly for now).

P.S. Not sure which Docker image you’re trying to use. You may be interested in the All-in-One image which is pre-optimized: GitHub - nextcloud/all-in-one: The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.

Thanks for the clarification. Good to know they are stored in the database.

Yes, it has to be NTFS. This is the hard drive that I may have to physically connect to another windows OS when my RPi4 is down. The hard drive is currently being network shared using RPi4’s SMB, and some of the folders in the drive will be syncing to cloud once I finish this nextcloud installation.

Thanks.

You could use btrfs and install winbtrfs on your windows pc. There is even ext?4 drivers for windows, but i think support is not as good as for btrfs, which in turn is the better option anyway.
Ntfs is missing the needed permission handling for nextcloud use btw.
The only other way to use a ntfs drive would be to mount it as external media in nextcloud.

Got it. Unfortunately ntfs is the only option at the moment.

I have very little knowledge to nextcould, so could you explain a bit more about how mounting ntfs as external media would solve the issue? Does nextcloud have an app or something allowing me to move or backup those database and config files into ntfs drive if I mount it in nextcloud?

Thanks.

There is an external storage app in the appstore, you need to install it and then you can configure it in the settings in Nextcloud

Sorry, could you hint me what is the keyword I should be looking for in the setting? I tried to read through every single one but still not sure where I can configure it…

Thanks.

You have the external storage app installed? Then you find it under Administrstion/External Storage

https://your.cloud.tld/settings/admin/externalstorages

Yes I do have it installed. I guess this external storage app will allow me to mount local drive, but I still don’t understand how I can set up so that the config files (such as the files in /var/www/html) and database files can be stored in the external drive without being prompted with 0770 permission error…

Thanks.

They cant, you only can mount this into a folder in your nextcloud drive and use this as data storage.

Thats the Problem, 0770 permission does not exist on ntfs, windows permission handling works different from unixoids. There would be another way probably, that includes creating a virtual volume on the ntfs volume somehow and use that.

for future users, please read the following link to remove permission:

1 Like

@tamashika Thanks a Lot !!! … you have no idea what a great help this post was. I was in the exact same situation. Have a nice Day :blush: