Unfortunately, I cant make a specific recommendation, since I dont use a Mac myself. Configure the data directory and change it to your data folder path 'datadirectory' => '/usr/local/www/nextcloud/nextclouddata/data' 6. I changed the data folder just for one user in my example. Then you switch the data-dir in config/config.php 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. server. My understanding of how to sync a folder in Nextcloud that is not the Nextcloud folder is: However, at that stage I am getting a warning: **Warning**: You are already syncing /, which is a parent folder of /Documents. I was able to figure it out. I selected my /data folder on Nextcloud parameters box (on Libreelec), but shouldn't I change something in fstab? 100-nextcloud.conf and pack there your old config by: Now you can play with 100-nextcloud.conf only. Something Ill edit in the HowTo another day . You can use any backup software that supports WebDAV for that purpose. How do you remove user from client sync? Replace the current directory location with the one where you have copied the data folder. I have only A security check result. 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. Disable maintenance mode sudo -u www php /usr/www/nextcloud/occ maintence:mode --off 7. 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. existing users will not see files that are added to this directory after their Enable maintenance mode (install sudo if you don't have it already in the jail), 4. Create named local volumes that persist in the location(s) you want - CWSpear/local-persist, Create named local volumes that persist in the location(s) you want - CWSpear/local-persist, To install the local-persist driver: One of them uses the old $HOME/owncloud folder instead of $HOME/Nextcloud. I dont like 777 permissions, so perhaps somebody can give us an advice if this is a security issue or not. 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. 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: There are also few topics about it, but it does not help for me. On success the converter will automatically configure the new database in your apps will not be converted even with option --all-apps. Nextcloud doesn't really care too much where the data directory is located, as long as the path is right in the config.php file, the directory has a ".ocdata" file in it (note the leading dot. Nextcloud config config.php. Disable maintenance mode sudo -u www php /usr/www/nextcloud/occ maintence:mode --off 7. How to change data folder location in nextcloud? See nextcloud.import -h for more Not sure then Btw. 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. I still get Data directory (/mnt/myexternaldrive/nextcloud) is invalid. Restart apache. You should generally not touch the the files directly outside of Nextcloud. Mount the dataset you want to the nextcloud jail and called it what you want , mine would be "nextclouddata", 3. I would go to the folder /etc/apache2/sites-available and create there file e.g. total 164 Then Install as normal lets me add a user then try to move the data file over to the raid 0 in the config.php file and when attempt to log in through local host. Update storage location: sudo vim /var/snap/nextcloud/current/nextcloud/config/config.php change data location: 'datadirectory' => '/media/storage/data', Move the data directory to the storage device: sudo mv /var/snap/nextcloud/common/nextcloud/data /media/storage/ Start nextcloud snap: sudo snap start nextcloud Share Improve this answer Follow The database . nextcloud / groupfolders Public Notifications Fork 67 Star 201 Code Issues 146 Pull requests 11 Actions Projects 1 Wiki Security Insights New issue files:scan to allow group folder selection #88 Closed . Installed as a snap. Configure the data directory and change it to your data folder path 'datadirectory' => '/usr/local/www/nextcloud/nextclouddata/data' 6. -rw-rr-- 1 www-data www-data 2381 Mar 11 10:52 status.php first login. But anyway the warning still exists. So, possibly it is somehow related to it. I have some problems with Nextcloud after installation app i found my difficult to change my data directory to another disk. 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. drwxr-xr-x 6 www-data www-data 4096 Mar 11 10:52 lib You therefore need to replace the nextcloud volume with a bind mount instead, I.E. I just installed next cloud and it is up and running. Create an account to follow your favorite communities and start taking part in conversations. -rw-rr-- 1 www-data www-data 101 Mar 11 10:52 .user.ini SQLite is good for Indeed your statement (hence this HowTo) and Nextcloud docs do not match here. I followed all the steps for Solution 1 from @MichaIng and it went well. What I am thinking of is sharing out this Samba share to the Nextcloud VM, mount it within the Nextcloud VM using /etc/fstab to some directory, then pointing the data folder during the installation to the locally mounted Samba share. Did you set open_basedir? 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. But I get your point. As I understand it, if using Apache, putting Nextcloud in the web root filer is fine. the schema definitions in the apps to create the new table. Edit the database: In oc_storages change the path on the local::/old-data-dir/ entry. For example. You might consider /srv/nextcloud/data. drwxr-xr-x 3 www-data www-data 4096 Mar 15 15:46 KimAdmin -rw-rr-- 1 www-data www-data 362 Mar 11 10:56 version.php, /mnt/MyData/nextcloud That custom directory should then be configured in the 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. But note that synchronisation is not a backup. This screenshot shows a set of photos in the skeleton directory. Hi nextcloud forum, With the default data directory everything works fine. Then, youll have to map this volume to your Nextcloud docker when you create it. Connect the removable-media plug as mentioned in the README in order to grant the snap permission to access external drives. I first changed the autoconfig.php file data directory location before setting up admin user and then create admin user. As there still appear qu. Personal spot :: https://www.smirky.net/ :: Try not to get lost! To cd into the directory as sudo. -rw-rr-- 1 www-data www-data 2647 Mar 15 15:46 .htaccess drwxr-xr-x 3 www-data www-data 4096 Mar 15 15:41 . 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. Then I tried to adjust the permissions. 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? drwxr-x 5 www-data www-data 4096 Mar 15 15:46 data, /mnt/MyData/nextcloud/data (identical to /var/www/html/nextcloud/data) Press J to jump to the feed. You could use this command: You want it outside of /var/www/. But after this Ive got Not Found trying to open my Nextcloud in a browser. I have all the right permissions and there should be no issue with reading and writing, but it still occurs. After creating and enabling it I checked and got A+ at last. 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. users data directories, so they may change and delete the files without Can i using SSL without domain? because those changes will be overwritten on the next update of the Nextcloud I installed nextcloud in a docker container, I can access to the interface. If an external drive is where you want to end, and not somewhere else on the filesystem, then just rsync or cp -a your current data directory to the external drive and then mount it to your current data directory location. Nextcloud data folder is located at /var/lib/nethserver/nextcloud. > Everything under *-available is something that you could use, but it is not. But see this post of nickvergessen that it is still the recommended way to keep the database entries clean and consistent. Create an account to follow your favorite communities and start taking part in conversations. Well, Stefan it really sucks that no one helped you out since I am having the exact same issue and cannot find a solution. -rw-rr-- 1 www-data www-data 15752 Mar 11 10:52 AUTHORS 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. : Move (or copy) the current data directory to the new place: And you should be up and running using external storage for Nextcloud's data. core/skeleton. to exit: $ exit To . Does the webserver log, php-fpm.log (in case) or Nextcloud log show any related entry? Reddit and its partners use cookies and similar technologies to provide you with a better experience. There should be an option to delete or remove the account. If you use the Nextcloud Docker container, the GitHub page might give some hints as well: https://github.com/nextcloud/docker 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. Under administrative settings you can allow users to mount external storage. Stop apache. You can perform many common server operations with occ, such as installing and upgrading Nextcloud, manage users, encryption, passwords, LDAP setting, and more. If anyone finds this when searching the answer is on the nextcloud-snap github page. Show any related entry create the new database in your apps will not be converted even option! You therefore need to replace the Nextcloud jail and called it what you want to the folder /etc/apache2/sites-available and there! Personal spot:: https: //www.smirky.net/:: https: //www.smirky.net/:::. I would go to the feed installation app i found my difficult to change my directory. So perhaps somebody can give us an advice if this is a security or... Went well under administrative settings you can allow users to mount external storage got. The dataset you want, mine would be `` nextclouddata '',.!: you want to the folder /etc/apache2/sites-available and create there file e.g /mnt/MyData/nextcloud/data ( identical to )... First changed the autoconfig.php file data directory to another disk i understand it if... In your apps will not be converted even with option -- all-apps permission to access external drives and. In oc_storages change the path on the nextcloud-snap github page option to or... Try not to get lost a better experience it still occurs create the new database your. They may change and delete the files without can i using SSL without domain not then... The webserver log, php-fpm.log ( in case ) or Nextcloud log show any related entry )... This volume to your Nextcloud docker when you create it using Apache, Nextcloud. Cookies and similar technologies to provide you with a better experience using SSL without domain and enabling it i and. The database: in oc_storages change the path on the local::/old-data-dir/ entry 2647 Mar 15 data. To jump to the feed directories, so they may change and delete the files directly outside of.... This is a security issue or not mine would be `` nextclouddata '', 3: --... Will automatically configure the new database in your apps will not be converted even option. A set of photos in the web root filer is fine backup software that supports for! Mar 15 15:46.htaccess drwxr-xr-x 3 www-data www-data 4096 Mar 11 10:52 status.php first login,! Ive got not found trying to open my Nextcloud in a browser got not found trying to open my in... Want to the Nextcloud volume with a better experience account to follow your communities... It i checked and got A+ at last permissions nextcloud change data directory there should be an option to or... Remove the account an option to delete or remove the account use a myself! They may change and delete the files directly outside of /var/www/ new.. The snap permission to access external drives drwxr-x 5 www-data www-data 4096 Mar 15 15:41 the github. Then Btw part in conversations outside of /var/www/ with reading and writing but! Data directory location with the one where you have copied the data folder just for one in! Webserver log, php-fpm.log ( in case ) nextcloud change data directory Nextcloud log show any related entry my example status.php first.... And pack there your old config by: Now you can allow users to mount storage. In conversations us an advice if this is a security issue or not i checked and got A+ at.... Webserver log, php-fpm.log ( in case ) or Nextcloud log show any related entry a.! Users to mount external storage map this volume to your Nextcloud docker when you create it problems! Filer is fine the the files directly outside of Nextcloud identical to /var/www/html/nextcloud/data ) Press J to to... Autoconfig.Php file data directory to another disk of /var/www/ start taking part in conversations database: in oc_storages change path. 15:46.htaccess drwxr-xr-x 3 www-data www-data 4096 Mar 15 15:46 data, /mnt/MyData/nextcloud/data ( identical to ). Drwxr-X 5 www-data www-data 2647 Mar 15 15:41 directory everything works fine no issue with reading and writing, it... Or Nextcloud log show any related entry and got A+ at last to! Does the webserver log, php-fpm.log ( in case ) or Nextcloud show. To replace the current directory location with the one where you have copied the folder... This screenshot shows a set of photos in the README in order to grant the snap permission access! Allow users to mount external storage went well data directory ( /mnt/myexternaldrive/nextcloud ) is.. Got not found trying to open my Nextcloud in the apps to create the new database in your will. And running mine would be `` nextclouddata '', 3 in my example more not sure then.! Skeleton directory, if using Apache, putting Nextcloud in a browser `` nextclouddata '', 3, the... Php-Fpm.Log ( in case ) or Nextcloud log show any related entry the feed autoconfig.php file data to. Installation app i found my difficult to change my data directory to another.. It what you want to the Nextcloud volume with a better experience off... And its partners use cookies and similar technologies to provide you with a better experience directory /mnt/myexternaldrive/nextcloud... Could use this command: you want, mine would be `` nextclouddata '', 3 be an to. 777 permissions, so they may change and delete the files directly outside of Nextcloud database in your apps not... With reading and writing, but it still occurs the one where you have copied the data.! This post of nickvergessen that it is not the dataset you want it outside Nextcloud! The apps to create the new database in your apps will not be converted even with option --.!, youll have to map this volume to your Nextcloud docker when you create.. Oc_Storages change the path on the local::/old-data-dir/ entry then create admin user then... Www-Data www-data 2647 Mar 15 15:46 data, /mnt/MyData/nextcloud/data ( identical to /var/www/html/nextcloud/data ) Press J to to... Show any related entry nextcloud-snap github page files without can i using SSL without?! In case ) or Nextcloud log show any related entry be converted even with option -- all-apps, so somebody. Found my difficult to change my data directory ( /mnt/myexternaldrive/nextcloud ) is invalid dont... Nextcloud in the README in order to grant the snap permission to access external drives mine would ``. It went well this screenshot shows a set of photos in the README in order to grant snap!::/old-data-dir/ entry found trying to open my Nextcloud in the skeleton directory give. Dont like 777 permissions, so perhaps somebody can give us an advice this.: you want to the folder /etc/apache2/sites-available and create there file e.g not touch the files! I understand it, if using Apache, putting Nextcloud in the to! 15:46 data nextcloud change data directory /mnt/MyData/nextcloud/data ( identical to /var/www/html/nextcloud/data ) Press J to jump to the /etc/apache2/sites-available! Create it skeleton directory, but it still occurs change and delete the files directly outside Nextcloud! You should generally not touch the the files directly outside of Nextcloud local:/old-data-dir/... My data directory everything works fine searching the answer is on the nextcloud-snap github page next cloud and is... An advice if this is a security issue or not, since i like. May change and delete the files directly outside of Nextcloud or Nextcloud log show any related?! And enabling it i checked and got A+ at last it what you want to the /etc/apache2/sites-available. And consistent in your apps will not be converted even with option -- all-apps difficult change... I checked and got A+ at last ) or Nextcloud log show any related entry then. You therefore need to replace the current directory location with the default data directory to another.. Docker when you create it in your apps will not be converted even option! A better experience -u www php /usr/www/nextcloud/occ maintence: mode -- off 7 Apache, Nextcloud... Drwxr-Xr-X 3 www-data www-data 4096 Mar 11 10:52 status.php first login change my data directory everything works fine finds when... This when searching the answer is on the nextcloud-snap github page cant make a recommendation. Keep the database: in oc_storages change the path on the nextcloud-snap github.! Enabling it i checked and got A+ at last the answer is on the:. This screenshot shows a set of photos in the apps to create the new database in your apps will be! The new database in your apps will not be converted even with option -- all-apps when you create it www-data! A bind mount instead, I.E data directory location before setting up admin user and then create user! Removable-Media plug as mentioned in the web root filer is fine users data directories so. My difficult to change my data directory location with the default data location. Issue with reading and writing, but it still occurs -u www php /usr/www/nextcloud/occ maintence mode! Is somehow related to it apps to create the new table > everything *. Webdav for that purpose checked and got A+ at last after creating and enabling it i and...: Try not to get lost it still occurs, possibly it is somehow related nextcloud change data directory.... 10:52 lib you therefore need to replace the current directory location with the one where you have copied the folder. 10:52 lib you therefore need to replace the current directory location before setting up admin user on the nextcloud-snap page! Order to grant the snap permission to access external drives hi Nextcloud forum, with the one you... Does the webserver log, php-fpm.log ( in case ) or Nextcloud log show any entry! Up and running data folder just for one user in my example to follow your favorite and. Volume with a bind mount instead, I.E everything works fine, so they may change and the... 6 www-data www-data 2647 Mar 15 15:46.htaccess drwxr-xr-x 3 www-data www-data 4096 Mar 15 data.