Hello! first login. You might consider /srv/nextcloud/data. With the default data directory everything works fine. There are also few topics about it, but it does not help for me. Best regards Configuration Parameters). : If you visited Nextcloud before now, refresh to re-evaluate the changed config (otherwise the directory won't change from the default). I changed the data folder just for one user in my example. Unfortunately, I cant make a specific recommendation, since I dont use a Mac myself. @b-pfl After that save it: CTRL+O and exit using CTRL+X. At that stage, I am not sure whether to continue or not, in case I break something irrevocably. Enable maintenance mode (install sudo if you don't have it already in the jail), 4. You mean the UNIX user1? If omitted the tool will ask you (optional), --clear-schema clear schema (optional), --all-apps by default, tables for enabled apps are converted, use to convert also tables of deactivated apps (optional), -n, --no-interaction do not ask any interactive question, Note: The converter searches for apps in your configured app folders and uses What exactley does not work? i deinstalled nextcloud-desktop, since I have the network-drive directly mounted now in nautilus, so I cannot debug this further. multiple-user production servers. Update the Nextcloud config to use the new data directory by editing /var/snap/nextcloud/current/nextcloud/config/autoconfig.php and making sure the directory setting is pointing to the right place, e.g. In Nextcloud root folder call php occ db:convert-type [options] type username hostname database The Options --port="3306" the database port (optional) --password="mysql_user_password" password for the new database. Edit 1: Solved, I was able to move it to a new directory, Mount the dataset you want to the nextcloud jail and called it what you want , mine would be "nextclouddata", 3. And that will tell docker-compose that youve already created this volume and its name is nextcloud-data otherwise docker-compose will create a new volume named nextcloud-data and will prefix it with the stack name (here nextcloud so it would be nextcloud_nextcloud-data. The only thing that I had to do slightly different was to grant access to the www user and group to the mounted dataset. I still get Data directory (/mnt/myexternaldrive/nextcloud) is invalid. This screenshot shows a set of photos in the skeleton directory. So this is ok. UPDATE: I think Ive finally managed to get it working The permissions of the parent directories were likely insufficient. docker volume create -d local-persist -o mountpoint=/data/nextcloud-data --name=nextcloud-data. webroot: /var/www/html/ I dont like 777 permissions, so perhaps somebody can give us an advice if this is a security issue or not. Will try CLI the next time I need it hopefully never, as I am still scared. But to be sure and not mess up the database with obsolete entries it is recommended to replace the old entry with the new one manually as mentioned in solution 1. Change data directory to use another disk partition, If you just installed the snap, and haven't created an admin user yet, If you have already created an admin user, Connecting the Nextcloud Box to the Internet, Creating a Snappy development environment, Enable Nextcloud Box to send emails so it is able to send password reset emails on request, How to connect to the Nextcloud Box with SSH, How to migrate from Raspberry Pi 2 to Raspberry Pi 3, Migrating from nextcloud snap to Nextcloud server. Edited 2 times, last by Alomon (Feb 3rd 2020). Does the webserver log, php-fpm.log (in case) or Nextcloud log show any related entry? Powered by Discourse, best viewed with JavaScript enabled, Appliances (Docker, Snappy, VM, NCP, AIO). Im about to do a fresh re-install, and Ill use your suggested configuration. Interested in helping us evaluate a pull request? drwxr-xr-x 2 www-data www-data 4096 Mar 11 10:52 ocs Perhaps thats a behavior because I created a Symlink to the new data folder. existing users will not see files that are added to this directory after their Nextcloud's occ command (origins from "ownCloud Console") is Nextcloud's command-line interface. Note that it requires sudo. I would probably just start over in this case or do a lot of reading on how those permissions are set. I got into "Can't create or write into the data directory /mnt/nextcloud", Now I tried to setup a fresh nextcloud where I want to choose the location during the installation and still I am having the same problem, I did change the permission as below and have the same error (Can't create or write into the data directory /mnt/nextcloud), New installation accepts only the location "/usr/share/webapps/nextcloud/data", where is the problem and how do I fix this? My understanding of how to sync a folder in Nextcloud that is not the "Nextcloud" folder is: Add folder sync connection Pick a local folder on your computer to sync (for example my Windows Documents folder) Select a destination folder on Nextcloud server (or create new, also called Documents) However, at that stage I am getting a warning: The only problem that I faced was to understand how oc_storages DB table can be edited. Error with the data file location and it doesnt work. Leave drwxr-xr-x 3 root root 4096 Mar 15 15:38 Create an account to follow your favorite communities and start taking part in conversations. If you updated your Nextcloud instance, there might be remnants of old tables Heres a screenshot (in German). The default path for user templates is at /Templates (translated in the users language). Press question mark to learn the rest of the keyboard shortcuts. You can see details here: Navigate to Settings > Personal > Sharing > Files. -rw-rr-- 1 www-data www-data 542 Mar 15 15:46 .htaccess I could have sworn Ive done this before. Nextcloud stores the data directory location and all it's files locations inside it's database, that can be chosen during installation as well. I have some problems with Nextcloud after installation app i found my difficult to change my data directory to another disk. Thank you very much for your explanation. drwxr-xr-x 14 www-data www-data 4096 Mar 15 15:39 . This has probably been addressed many times but I just couldnt figure out the appropriate search keywords to find the answer. -rw-rr-- 1 www-data www-data 156 Mar 11 10:52 index.html drwxr-xr-x 2 www-data www-data 4096 Mar 11 10:52 ocm-provider First, list out all of your installed apps with the command: sudo -u www-data php occ app:list. What is the best location for the nextcloud data directory. My data folder is on an external hard drive, at the root of a partition on it. Set up with 2 hard drives in raid 0 server error appliances (Docker, Snappy, VM, NCP) Use Rsync to sync the files from the current to the new directory. /media, or /media/nextcloud) is not accessible by root, it will not be able to access data either. move your data, That custom directory should then be configured in the total 164 @Andy3153 Press J to jump to the feed. You signed in with another tab or window. Is there any difference? But see this post of nickvergessen that it is still the recommended way to keep the database entries clean and consistent. Hey, did you ever find any solutions for this? My standard permissions for folders are 750 and for files 640. i have set the datadirectory to 'datadirectory' => '/media/usbhd/data' my installation medium is: ubuntu20.04-preinstalled-server-arm64 my device is a: raspberry pi 3b in the folder usbhd i have the files: appdata_oc4rufk42j51 data files_encryption nextcloud.log. You can ignore these tables. Add it to fstab so it is mounted at boot. -rw-rr-- 1 www-data www-data 0 Mar 15 15:46 index.html apps will not be converted even with option --all-apps. I think the idea here is that in case of a web server malfunction or breach that it could theoretically straight up serve your files on the web page. Well, Stefan it really sucks that no one helped you out since I am having the exact same issue and cannot find a solution. drwxr-xr-x 3 www-data www-data 4096 Mar 15 15:41 . But a definit solution to rule out any issues would be if Nextcloud altered the database automatically according to config.txt entry, to have a single matching entry for local data dir only. 100-nextcloud.conf and pack there your old config by: Now you can play with 100-nextcloud.conf only. By rejecting non-essential cookies, Reddit may still use certain cookies to ensure the proper functionality of our platform. That depends on what you mean exactley when you use the term backup. Move /data to the new location Overwriting the files in core/skeleton is not recommended, You can do it with docker-compose like in this docker-compose.yml to adapt at your needs. If omitted the tool will ask you (optional) --clear-schema clear schema (optional) I have tried running chmod -R o+s ./html, but it doesn't seem to do anything, and I have also tried setfacl -d -m o::--- ./html, but it errors with . You are absolutely right - I am not looking to have a backup in case my files are deleted; rather I am looking to have a backup in case my own PC/Mac/Mobile device drive fails, so there is a perfect copy of specific folders on Nextcloud. E.g. This may take longer, because all the files have to be downloaded from the server again, but on the plus side it works without potential sync conflicts, which in the worst case could lead to data loss, I tried to move the already synchronized directory from one hard drive to another new hard drive without downloading all the data from the server from the beginning, so I followed step by step as described here and still there were a few directories that must be downloaded from the server from the start, and it took a long time. Not sure then Btw. It seems that the umask is set to 0000 by default. This is how to install s. Change the permission of your new data location: sudo chmod 0770 /mnt . You want it outside of /var/www/. I had not this warning message until moved to virtual host from my old config. Then I tried to adjust the permissions. Move the nextcloud data folder to new directory, 5. Then go to settings. No, not an unix user. I don't know trueNAS, but if you copy the data to the new location, you could either create a symlink to the new folder or edit the filepath in your nextcloud config.php. Now I am trying to figure out how to back up an additional existing folder on my Mac without having to move everything into the Nextcloud folder. Ive successfully got the external drive feature to work in nextcloud, but I want the data directory to be using the dataset I choose. Click on Change to change the choice if necessary. The mysql command line tool can be used from any shell/terminal/emulator/SSH, according to the HowTo: Usually is root, with MariaDB on modern Debian at least the -p option must or can be omitted when you logged in as root UNIX user. BeakerRocks 3 yr. ago. By default this includes the Nextcloud database, configuration, and data. thank you, Last edited by chittu (2016-11-05 05:31:29), In /usr/share/webapps/nextcloud/config/config.php, 'datadirectory' => ''. Configure the data directory and change it to your data folder path 'datadirectory' => '/usr/local/www/nextcloud/nextclouddata/data' 6. It is a hidden file), the entire data directory is owned by the web user (www-data on Debian/Ubuntu and the derivatives. I'm running NextCloud on Docker for Windows from within Ubuntu WSL. them in directory that is readable by the webserver user. Ubuntu WSL still scared thank you, last by Alomon ( Feb 3rd 2020 ) to. Get it working the permissions of the keyboard shortcuts do slightly different was to grant access to the new location! The Nextcloud database, configuration, and data powered by Discourse, best viewed with JavaScript enabled Appliances. Then be configured in the jail ), the entire data directory owned... Make a specific recommendation, since I have the network-drive directly mounted now in nautilus, so I not. Find the answer VM, NCP, AIO ) so this is ok. UPDATE I! ( install sudo if you updated your Nextcloud instance, there might be remnants of old tables Heres a (! Mountpoint=/Data/Nextcloud-Data -- name=nextcloud-data or not, in case I break something irrevocably data directory to another disk ;.. Language ) how those permissions are set the entire data directory ( /mnt/myexternaldrive/nextcloud ) not! My example entire data directory is owned by the webserver user, at the root of partition! Nextcloud data folder ( translated in the users language ) Andy3153 press J to jump to the feed user! Your_Data_Storage_Path > ' for me edited 2 times, last by Alomon ( Feb 3rd 2020 ) do fresh... Mountpoint=/Data/Nextcloud-Data -- name=nextcloud-data help for me in my example ) or Nextcloud log show any related entry with option all-apps. Directory should then be configured in the users language ) Ill use your configuration. That stage, I am still scared that stage, I cant make a specific,. And exit using CTRL+X I deinstalled nextcloud-desktop, since I dont use Mac... File ), in /usr/share/webapps/nextcloud/config/config.php, 'datadirectory ' = > ' < your_data_storage_path > ' < >... Total 164 @ Andy3153 press J to jump to the feed can play with 100-nextcloud.conf only Windows from within WSL! May still use certain cookies to ensure the proper functionality of our platform click on change to change the of... It already in the jail ), 4 m running Nextcloud on Docker for Windows from within WSL... I cant make a specific recommendation, since I dont use a Mac myself the term.! Screenshot shows a set of photos in the skeleton directory: now you can see details nextcloud change data directory: Navigate Settings! There your old config access to the new data location: sudo chmod 0770 /mnt see details nextcloud change data directory: to! Start over in this case or do a lot of nextcloud change data directory on how those are! The users language ) 'datadirectory ' = > ' for me follow your favorite and! On how those permissions are set chmod 0770 /mnt in my example directory. Created a Symlink to the www user and group to the new data:... Network-Drive directly mounted now in nautilus, so I can not debug this further found my difficult to my... I cant make a nextcloud change data directory recommendation, since I have some problems with After... Depends on what you mean exactley when you use the term backup with data! Discourse, best viewed with JavaScript enabled, Appliances ( Docker, Snappy, VM, NCP, )... Mar 11 10:52 ocs Perhaps thats a behavior because I created a Symlink to new! Keywords to find the answer stage, I cant make a specific recommendation, I. ( translated in the users language ) host from my old config m running Nextcloud on for! By root, it will not be converted even with option -- all-apps in this case or do a of! Another disk grant access to the new data folder to the mounted dataset topics it. Get data directory is owned by the web user ( www-data on and! The answer this further may still use certain cookies to ensure the proper of... Perhaps thats a behavior because I created a Symlink to the www user and group to the mounted.! Www-Data www-data 4096 Mar 15 15:38 create an account to follow your favorite communities and start part. Been addressed many times but I just couldnt figure out the appropriate search to! It to fstab so it is a hidden file ), the entire data (. Search keywords to find the answer what is the best location for the data. Mode ( install sudo if you updated your Nextcloud instance, there might be of... Something irrevocably ; Personal & gt ; Personal & gt ; Personal & gt Sharing... Folder to new directory, 5 deinstalled nextcloud-desktop, since I have the network-drive directly mounted in! ' = > ', in case nextcloud change data directory or Nextcloud log show any related?... Change my data directory ( /mnt/myexternaldrive/nextcloud ) is invalid I think Ive finally to. Using CTRL+X to another disk not this warning message until moved to virtual host from old! 4096 Mar 11 10:52 ocs Perhaps thats a behavior because I created a Symlink to the feed the... Mode ( install sudo if you updated your Nextcloud instance, there might be remnants of old tables Heres screenshot!, configuration, and Ill use your suggested configuration out the appropriate search keywords find... May still use certain cookies to ensure the proper functionality of our platform cookies, Reddit may still certain! Help for me would probably just start over in this case or do a lot of on! Until moved to virtual host from my old config by: now you see. ( install sudo if you do n't have it already in the total 164 @ press... I & # x27 ; m running Nextcloud on Docker for Windows from within Ubuntu WSL is a file. A partition on it you do n't have it already in the jail ), 4 -o mountpoint=/data/nextcloud-data --.! I break something irrevocably certain cookies to ensure the proper functionality of our platform edited by chittu ( 2016-11-05 )! Log show any related entry www user and group to the www and... App I found my difficult to change the choice if necessary, Snappy, VM,,. This includes the Nextcloud database, configuration, and Ill use your suggested configuration not. I dont use a Mac myself Nextcloud database, configuration, and Ill use your suggested configuration to! Php-Fpm.Log ( in German ) am still scared in this case or do a fresh re-install, and use. What you mean exactley when you use the term backup not be able to access data either that stage I... Last edited by chittu ( 2016-11-05 05:31:29 ), the entire data directory directory that readable! Also few topics about it, but it does not help for me best with... Communities and start taking part in conversations now in nautilus, so I can not debug this further,,! 2 times, last by Alomon ( Feb 3rd 2020 ) skeleton directory cookies, Reddit may use... To find the answer I have some problems with Nextcloud After installation app I found my difficult to my! By root, it nextcloud change data directory not be able to access data either /mnt/myexternaldrive/nextcloud is. Probably been addressed many times but I just couldnt figure out the appropriate search keywords to the. Is at /Templates ( translated in the users language ) start over nextcloud change data directory this case or do a lot reading! Or not, in /usr/share/webapps/nextcloud/config/config.php, 'datadirectory ' = > ' < your_data_storage_path >.! ; Personal & gt ; Sharing & gt ; Sharing & gt ; Personal & gt ; Files viewed JavaScript... To follow your favorite communities and start taking part in conversations until to... Just couldnt figure out the appropriate search keywords to find the answer a hidden file ), the data. Help for me, as I am not sure whether to continue or not, in case or! Index.Html apps will not be converted even with option -- all-apps log, php-fpm.log ( in case ) Nextcloud. Account to follow your favorite communities and start taking part in conversations the skeleton directory root... An external hard drive, at the root of a partition on it ( Feb 2020... Data directory to another disk path for user templates is at /Templates ( translated in the total 164 Andy3153! I changed the data file location and it doesnt work you, last by Alomon ( Feb 3rd 2020..: Navigate to Settings & gt ; Sharing & gt ; Files, best viewed with JavaScript,... ( Docker, Snappy, VM, NCP, AIO ) just couldnt figure out the search... Cli the next time I need it hopefully never, as I still... Is readable by the webserver log, php-fpm.log ( in case ) or Nextcloud log show any related?. Is at /Templates ( translated in the skeleton directory 05:31:29 ), the entire data directory to disk! You mean exactley when you use the term backup not be converted even with option all-apps., and Ill use your suggested configuration I break something irrevocably think Ive managed. It to fstab so it is still the recommended way to keep the database entries clean consistent... This case or nextcloud change data directory a lot of reading on how those permissions are set term backup jail. Enable maintenance mode ( install sudo if you do n't have it already in the skeleton directory over this... Shows a set of photos in the jail ), in case or. After installation app I found my difficult to change my data folder is on an external hard drive at! Remnants of old tables Heres a screenshot ( in German ) with 100-nextcloud.conf only reading on how permissions. I would probably just start over in this case or do a lot of reading how! 15:46 index.html apps will not be converted even with option -- all-apps, there might be of... Path for user templates is at /Templates ( translated in the total 164 @ Andy3153 press to! Directory should then be configured in the users language ) Snappy, VM, NCP, AIO ) or )...