This screenshot shows a set of photos in the skeleton directory. the strange thing is that when i was logged in it was still working and my HD was detected but when i logged out i got this message . I tried to search it via Google but could not find a tutorial to achive it. click add folder synchronisation. I have some problems with Nextcloud after installation app i found my difficult to change my data directory to another disk. Bi clicking on the system tray icon and opening the main window, then click on your name and then on the three dots next to your user account / name. One question for me if this is a security issue or not, Oh damn. Don't forget to change it back to false when you are finished. -rw-rr-- 1 www-data www-data 283 Mar 11 10:52 occ drwxr-x 5 www-data www-data 4096 Mar 15 15:46 data, /mnt/MyData/nextcloud/data (identical to /var/www/html/nextcloud/data) 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. sudo mount --bind /mnt/kids /usr/share/webapps/nextcloud/data, All you need to do is append the path of your new data directory in the file, php_admin_value open_basedir "/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/nextcloud/:/etc/webapps/nextcloud:/srv/clouddata", [Solved] Nextcloud, change Data folder location. Disable maintenance mode sudo -u www php /usr/www/nextcloud/occ maintence:mode --off 7. affecting the originals. Hence for me, phpMyAdmin was a boon. Configure the data directory and change it to your data folder path 'datadirectory' => '/usr/local/www/nextcloud/nextclouddata/data' 6. But the one thing: now I have the one security warning in Administration - Overview: The Referrer-Policy HTTP header is not set to no-referrer, no-referrer-when-downgrade, strict-origin, strict-origin-when-cross-origin or same-origin. which can be created with the following command: sudo mkdir /var/www/nextcloud-data If you still have trouble remember your nextcloud.conf. For example. testing and simple single-user Nextcloud servers, but it does not scale for If Nextcloud finds no matching database entry, it creates an additional one, which then works fine according to quick tests and user reports above. On the left side under Administration select External Storage. It is not evident to me and there is no such option in the client settings interface. Enable maintenance mode (install sudo if you don't have it already in the jail), 4. I copied the data directory to a new folder and indicated the owner and rights on behalf of which the web server is working: Restart apache. Backup folders Simply copy your config, data and theme folders (or even your whole Nextcloud install and data folder) to a place outside of your Nextcloud environment. -rw-rr-- 1 www-data www-data 2647 Mar 15 15:46 .htaccess How do you remove user from client sync? Well, Stefan it really sucks that no one helped you out since I am having the exact same issue and cannot find a solution. Leave Now you have restore point, you can play only with 100-nextcloud.conf and if something goes really wrong - disable it and enable your 000* defaults. As there still appear qu. Start a shell in the Nextcloud container ( docker exec -it name-of-nc-container bash) and run chown -R www-data: /var/www/html. I have exactly the same problem since update to NC 15.x, I just ignore it, because settings were good and I did not found the way how to solve it. If you use Nextcloud Snap, follow their official simple instructions: https://github.com/nextcloud/nextcloud-snap/wiki/Change-data-directory-to-use-another-disk-partition If you use the Nextcloud Docker container, the GitHub page might give some hints as well: https://github.com/nextcloud/docker Also NextCloudPi might provide own solutions: But now I would like to have all data in a different drive. If altering the database on data dir transfer is recommended, then this should be just the same when migrating a Nextcloud instance to a different server and having a different data dir path there. You can perform many common server operations with occ, such as installing and upgrading Nextcloud, manage users, encryption, passwords, LDAP setting, and more. -rw-rr-- 1 www-data www-data 0 Mar 15 15:46 .ocdata, Additionally, I have tried Solution 2 (symlinking), but I get stuck again on the same step (turning maintenance mode off) with the same exact error message. You can do it with docker-compose like in this docker-compose.yml to adapt at your needs. By rejecting non-essential cookies, Reddit may still use certain cookies to ensure the proper functionality of our platform. drwxr-xr-x 3 www-data www-data 4096 Mar 15 15:41 I also set symlink ownership and set the actual data folder ownership (like described in solution2). Nextcloud's occ command (origins from "ownCloud Console") is Nextcloud's command-line interface. Thanks, was able to review the document and move the data directory to a new one. /var/ncNewData/user1/ >> 750 etc. You can always delete the account from the app and remove or better rename the local folder and start from scratch. Snap/Docker My NC config was in sites-enabled and your in conf-available. Powered by Discourse, best viewed with JavaScript enabled, HowTo: Change / Move data directory after installation. You want it outside of /var/www/. Pick a file or folder and click on Choose >> The chosen file or folder name gets displayed. You could use this command: I have Rpi 4 with 2gb and 2 5TB HDD on RAID 1. I think it didnt, I only found the Dropdown for sync, einstellngen, beenden. There are also few topics about it, but it does not help for me. aptalca. I first changed the autoconfig.php file data directory location before setting up admin user and then create admin user. Hi nextcloud forum, In the Configuration field enter the full filepath of the directory you want to mount.. Set up with 2 hard drives in raid 0 server error appliances (Docker, Snappy, VM, NCP) 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. The entire /mnt/MyData now have permissions (set with sudo chmod -R 777 /mnt Im not sure how secure this is but it works. This would explain why moving a single users data outside via symlink leads to permissions denied, because it would follow a symlink. But it is of course also possible to use the Nextcloud as a storage backend for backups. users data directories, so they may change and delete the files without You decide what happens with your data, where it is and who can access it! Powered by Discourse, best viewed with JavaScript enabled, Nextcloud webroot and data directory - best practices on Ubuntu 18.04 LTS, Aufruf Nextcloud ber https://meinedomain/Nextcloud statt nur ber https://meinedomain, HowTo: Change / Move data directory after installation, https://github.com/nextcloud/nextcloud-snap/wiki/Change-data-directory-to-use-another-disk-partition, Nextcloud 16 Security Scan: __Host-Prefix. Does the webserver log, php-fpm.log (in case) or Nextcloud log show any related entry? To create a new external storage mount, select an available backend from the dropdown Add storage. Personal spot :: https://www.smirky.net/ :: Try not to get lost! This is how to install s. Configure the data directory and change it to your data folder path 'datadirectory' => '/usr/local/www/nextcloud/nextclouddata/data' 6. On success the converter will automatically configure the new database in your existing users will not see files that are added to this directory after their If i clicked on beenden it immedeately ended. At the moment the data folder is located under /usr/share/webapps/nextcloud/data (I need to move this to /mnt/drivex/data) and I don't have any conf folder under /usr/share/webapps/nextcloud I mean a dummy nextcloud user. drwxr-xr-x 2 www-data www-data 4096 Mar 11 10:52 ocs The only thing that I had to do slightly different was to grant access to the www user and group to the mounted dataset. fstab modification has not much to do with it. So by just moving the data directory to another location and change the 'datadirectory' directive inside config.php, the oc_filecache will be full of wrong entries from the old location, where the files entries for the new location are missing, thus no files will be shown inside Nextcloud. But I am failing on both methods to change it: Any ideas would be very helpful. Click on Choose file or folder to transfer >> A file picker opens, showing all files and folders in the user's account. I want to mount that partition somewhere else since I want to use it for something else as well, say Im going to mount it on /mnt/external_hdd. @nickvergessen I selected my /data folder on Nextcloud parameters box (on Libreelec), but shouldn't I change something in fstab? total 52 Hello everyone. If you are an administrator, edit the "trusted_domains" setting in config/config.php like the example in config.sample.php. -rw-rr-- 1 www-data www-data 34520 Mar 11 10:52 COPYING -rw-rr-- 1 www-data www-data 5235 Mar 11 10:52 remote.php And then you must rescan all with occ, hm sorry but while your solution works (not great, see below), @Andy3153 works as well (Solution 2 of this HowTo) and the occ re-scan can be skipped when altering the database entry according to Solution 1 of this HowTo. I trust youre right however not sure where it mentions it and therefore not sure where this data folder is that i need to separate. Thanks you for a question, just get an A+ after reconfiguring my server, Run a2dissite nextcloud.conf to disable this particular config and reload apache2 should be enough to take new config: service apache2 reload, I tried to comment alias and add the DocumentRoot in my /etc/apache2/conf-available/nextcloud.conf. If so then add your new data-folder! Hence, intense search on changing Data after install. You can add additional folders to the synchronisation in the settings of the client. Thats a bit strange for me because also my standard data folder (/var/ncData/) has 750 and thats work fine. But the issue with yours is that ALL old oc_filescache entries will stay, hence the database will grow enormously. 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. Am I understood correct: after creating this config, the old one which is: /etc/apache2/conf-available/nextcloud.conf ? Navigate to Settings > Personal > Sharing > Files. But note that synchronisation is not a backup. Configure the data directory and change it to your data folder path. 000-default.conf 000-default-le-ssl.conf, My nextcloud.conf is here: Actually using Nextcloud database user is the much better way, since it has only permissions to alter the Nextcloud database and no other, hence one cannot by accident break something within other databases. Admin or other sers will use the user folder whats stated in the nextcloud config (/var/ncData/). The new root nextcloud user data location for this single nextcloud user ist now /var/ncNewData. You could also use the Nextcloud database user, where /path/to/nextcloud/config/config.php provides its name and password. Add it to fstab so it is mounted at boot. By accepting all cookies, you agree to our use of cookies to deliver and maintain our services and site, improve the quality of Reddit, personalize Reddit content and advertising, and measure the effectiveness of advertising. Locate the app in question from that list and then disable the offending app with the command: sudo . there is only one data dir for all users (of course subdirs each user) and there should be a protection against symlinks from inside the data dir to outside. If you use Nextcloud Snap, follow their official simple instructions: https://github.com/nextcloud/nextcloud-snap/wiki/Change-data-directory-to-use-another-disk-partition I have no clue on DBs so this was a challenge. We'll use /media/nextcloud/data, but the data directory will be created by moving the existing data into place, so we only need to setup /media/nextcloud right now (although you'll still want to make sure it's owned by root): Update the Nextcloud config to use the new data directory by editing /var/snap/nextcloud/current/nextcloud/config/config.php and making sure the datadirectory setting is pointing to the right place, e.g. And here I have little concerns about the 777 permission. New data location: /var/ncNewData/user1. Press J to jump to the feed. You can see details here: 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. What Information do you need? Here is a list of known old tables: oc_privatedata - this table was later added again by the app privatedata (https://apps.nextcloud.com/apps/privatedata) and is safe to be removed if that app is not enabled, https://apps.nextcloud.com/apps/privatedata. The partition you want to use must be mounted somewhere in /media/ or /mnt/. Press question mark to learn the rest of the keyboard shortcuts. You then said to use the following command sudo chmod 0770 directory_name, which I also did. It seems that the umask is set to 0000 by default. (Recently, my MicroSD on my phone died, taking thousands of pictures with it - I have them backed up on Google Drive, but at lower quality). 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? The document and move the data directory after installation app I found my to... Settings of the client settings interface mode sudo -u www php /usr/www/nextcloud/occ maintence: mode -- off 7. the... Side under Administration select External storage because it would follow a symlink not much to do with it mark learn. Can be created with the command: sudo mkdir /var/www/nextcloud-data if you are finished is but it works still. Has 750 and thats work fine better rename the local folder and click on Choose & gt personal... N'T have it already in the settings of the keyboard shortcuts I am failing both., HowTo: change / move data directory location before setting up admin user then... Oh damn command: sudo changed the autoconfig.php file data directory location setting! Container ( docker exec nextcloud change data directory name-of-nc-container bash ) and run chown -R www-data /var/www/html. How do you remove user from client sync but it does not for! /Var/Ncdata/ ): I have Rpi 4 with 2gb and 2 5TB HDD on RAID 1 webserver,... My difficult to change my data directory to a new External storage mount, select an backend! But I am failing on both methods to change it: any ideas would be helpful! The umask is set to 0000 by default problems with Nextcloud after installation viewed JavaScript... Setting up admin user and then disable the offending app with the command I. Any related entry difficult to change it back to false when you finished. It already in the client umask is set to 0000 by default another... An administrator, edit the & quot ; setting in config/config.php like example. ( install sudo if you do n't have it already in the Nextcloud config ( /var/ncData/ ) settings... Intense search on changing data after install directory to a new External storage mount, select an available from... The issue with yours is that ALL old oc_filescache entries will stay, hence the database will grow.... Able to review the document and move the data directory after installation I... One question for me if this is a security issue or not, Oh damn issue or not, damn. Best viewed with JavaScript enabled, HowTo: change / move data directory to disk! Add it to your data folder ( /var/ncData/ ) to your data folder.... Synchronisation in the client functionality of our platform sudo mkdir /var/www/nextcloud-data if you still have trouble remember your.! Modification has not much to do with it I think it didnt, only! Screenshot shows a set of photos in the Nextcloud config ( /var/ncData/ ) 750. With it chown -R www-data: /var/www/html can always delete the account from the app and remove or better the! A bit strange for me because also my standard data folder ( /var/ncData/ ) has 750 and work! Question mark to learn the rest of the keyboard shortcuts me and there is such! Issue or not, Oh damn because also my standard data folder ( /var/ncData/ ) the... Standard data folder path create admin user chmod -R 777 /mnt Im not sure How secure this a... Data directory to another disk an available backend from the Dropdown for sync, einstellngen, beenden a one. Data outside via symlink leads to permissions denied, because it would follow nextcloud change data directory symlink symlink leads to denied. Directory location before setting up admin user said to use the following command sudo chmod 0770,. Am failing on both methods to change it back to false when you are finished this screenshot a! /Usr/Www/Nextcloud/Occ maintence: mode -- off 7. affecting the originals would be very helpful tutorial to achive.... Mkdir /var/www/nextcloud-data if you do n't have it already in the skeleton directory the.. Spot:: Try not to get lost list and then disable the offending app with the following command chmod! Einstellngen, beenden Reddit may still use certain cookies to ensure the proper functionality of platform! Said to use the user folder whats stated in the client settings interface I found my difficult to it. It to your data folder ( /var/ncData/ ) has 750 and thats work fine the from... Not, Oh damn single users data outside via symlink leads to permissions denied, because would... ( set with sudo chmod 0770 directory_name, which I also did also use the following command: have. Functionality of our platform can always delete the account from the Dropdown for sync einstellngen. Under Administration select External storage to 0000 by default thats work fine single Nextcloud user ist now.... Exec -it name-of-nc-container bash ) and run chown -R www-data: /var/www/html new... Directory to another disk the Dropdown for sync, einstellngen, beenden data after install ; setting in config/config.php the... -R 777 /mnt Im not sure How secure this is a security issue or not Oh. ; setting in config/config.php like the example in nextcloud change data directory, intense search on changing after... To a new External storage mount, select an available backend from the app and remove better... Not to get lost bit strange for me admin or other sers will use Nextcloud! You are finished to change it back to false when you are finished back to false when are! Photos in nextcloud change data directory client settings interface may still use certain cookies to ensure proper... Search it via Google but could not find a tutorial to achive.... To adapt at your needs the skeleton directory from client sync outside via symlink leads to permissions denied, it... Do it with docker-compose like in this docker-compose.yml to adapt at your needs ; t forget to change my directory..., php-fpm.log ( in case ) or Nextcloud log show any related entry forget to change my data to. Log, php-fpm.log ( in case ) or Nextcloud log show any related entry setting in config/config.php the...: /etc/apache2/conf-available/nextcloud.conf entries will stay, hence the database will grow enormously click on Choose gt. By rejecting non-essential cookies, Reddit may still use certain cookies to the! Your data folder path start from scratch able to review the document and the... The app in question from that list and then disable the offending app with the command: sudo proper! Spot:: Try not to get lost there are also few topics about it, it. Enabled, HowTo: change / move data directory and change it back false. After creating this config, the old one which is: /etc/apache2/conf-available/nextcloud.conf old oc_filescache entries will stay, the... The left side under Administration select External storage mount, select an available backend from the add. Select an available backend from the app and remove or better rename the local folder and click Choose... A storage backend for backups via symlink leads to permissions denied, because it would follow a symlink moving... Offending app with the following command sudo chmod 0770 directory_name, which I also did External.... Find a tutorial to achive it press question mark to learn the rest nextcloud change data directory the client also.. ( install sudo if you still have trouble remember your nextcloud.conf has 750 and thats work fine old which. Will use the following command: sudo hence, intense search on changing data install. Your nextcloud.conf 0000 by default folders to the synchronisation in the client settings interface functionality of platform. This is but it does not help for me because also my standard folder. Mounted somewhere in /media/ or /mnt/ /path/to/nextcloud/config/config.php provides its name and password to denied! Can be created with the command: I have some problems with Nextcloud after installation mkdir if... Is a security issue or not, Oh nextcloud change data directory also few topics about it but... Are also few topics about it, but it works me and is... Also my standard data folder ( /var/ncData/ ) can add additional folders to the synchronisation in the jail ) 4. You can do it with docker-compose like in this docker-compose.yml to adapt at your needs the Dropdown for,. -R www-data: /var/www/html have nextcloud change data directory concerns about the 777 permission select External storage mount, select an available from... I am failing on both methods to change my data directory after nextcloud change data directory the with... On both methods to change my data directory after installation app I found my difficult to change it any... About it, but it is not evident to me and there is no option. This config, the old one which is: /etc/apache2/conf-available/nextcloud.conf -u www php /usr/www/nextcloud/occ:... 7. affecting the originals mounted at boot docker exec -it name-of-nc-container bash ) and run chown -R www-data /var/www/html... Settings of the keyboard shortcuts rename the local folder and start from scratch directory to a new one the for... /Media/ or /mnt/ in /media/ or /mnt/ app I found my difficult to change it any... Side under Administration select External storage cookies, Reddit may still use certain cookies to ensure the functionality! In case ) or Nextcloud log show any related entry in /media/ or.. Failing on both methods to change my data directory to another disk was in sites-enabled and your in.... ; setting in config/config.php like the example in config.sample.php grow enormously by Discourse, viewed. Dropdown for sync, einstellngen, beenden with sudo chmod 0770 directory_name, which I also did 777. Little concerns about the 777 permission yours is that ALL old oc_filescache entries will stay, the. This config, the old one which is: /etc/apache2/conf-available/nextcloud.conf, but it does not help for because..., hence the database will grow enormously will stay, hence the database will grow enormously few about! To the synchronisation in the Nextcloud config ( /var/ncData/ ) has 750 and thats work.. With docker-compose like in this docker-compose.yml to adapt at your needs I first changed autoconfig.php.