I was going to go for the easy method but read the warning from @nickvergessen on DB integrity topic and decided against it. affecting the originals. testing and simple single-user Nextcloud servers, but it does not scale for The server compare files and update only the new files. For example. Enable maintenance mode (install sudo if you don't have it already in the jail), 4. All the files in the data folder need to be owned by the www-data user of the container. You can simply stop the server, move data directory, change path in config and start server again. To not mess things, within this thread, lets stay with the provided two solutions or, if you find yours the better (3.) I would probably just start over in this case or do a lot of reading on how those permissions are set. Please contact your administrator. That custom directory should then be configured in the 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. 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 . You can see details here: I mean a dummy nextcloud user. 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 . Create an account to follow your favorite communities and start taking part in conversations. 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. You can ignore these tables. the schema definitions in the apps to create the new table. Edit 1: was able to resolve it. Leave How do you remove user from client sync? The following steps are necessary to move the data directory. 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. Basically of config.php does not contain a matching entry, Nextcloud could remove all obsolete ones before adding the correct new one. PostgreSQL database with the Nextcloud command line tool. I always received permissions errors for user1. drwxr-xr-x 8 www-data www-data 4096 Mar 15 15:47 appdata_octf179zqtl4 drwxr-xr-x 14 www-data www-data 4096 Mar 15 15:39 . 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. Also in my .htaccess file there is a following section existing: But for some reason the warning message is present. Configure the data directory and change it to your data folder path. Add-ons --> My Add-ons --> Nextcloud --> Configure --> Map /data. But in case /var/www/nextcloud/ it is not possible to get A+ on scan.nextcloud.com with a __Host-Prefix security hardening issue. This allows you to overwrite the files that are shipped by default with Nextcloud in core/skeleton. 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 also set symlink ownership and set the actual data folder ownership (like described in solution2). That will change the owner and group of all files under /var/www/html to www-data. Im about to do a fresh re-install, and Ill use your suggested configuration. @nickvergessen To create a new external storage mount, select an available backend from the dropdown Add storage. 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. /var/ncNewData/user1/ >> 750 etc. The only problem that I faced was to understand how oc_storages DB table can be edited. Powered by Discourse, best viewed with JavaScript enabled, HowTo: Change / Move data directory after installation. The only thing that I had to do slightly different was to grant access to the www user and group to the mounted dataset. Now you can edit your 100-nextcloud.conf and bring it to something like this (my with letsencrypt and nextcloud under /var/www/nextcloud, I also copied your nextcloud.conf here) check what is already there especially regarding IPs and SSL configuration: Hello. This is really helpful. HowTo: Change / Move data directory after installation howto Press question mark to learn the rest of the keyboard shortcuts. Create an account to follow your favorite communities and start taking part in conversations. I did a lot of other experiments like changing the snap enviroment variable NEXTCLOUD_DATA_DIR which is used in autoconfig.php with no success. 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: Touching files only with the webserver unix user www-data. It could be that nextcloud.conf is also there, then run a2disconf nextcloud.conf. Indeed your statement (hence this HowTo) and Nextcloud docs do not match here. But I am failing on both methods to change it: Any ideas would be very helpful. Therefore it creates the tables oc_storages for the data directory and oc_filecache for the files. Configuration Parameters). Developer . core/skeleton. first login. 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. Admin or other sers will use the user folder whats stated in the nextcloud config (/var/ncData/). Then go to settings. You told me to cd and find the directory where the data folder is stored which I did. This is how to install s. 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. In Nextcloud root folder call, --port="3306" the database port (optional), --password="mysql_user_password" password for the new database. Could I not create a new folder (separate to my Nextcloud folder) in my Nextcloud account on the server and sync it with another folder on my computer? That custom directory should then be configured in the config.php via the configuration option skeletondirectory (see Configuration Parameters ). total 52 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 Nextcloud data folder is located at /var/lib/nethserver/nextcloud. In-depth tutorial on how to install Nextcloud on Ubuntu Server 18.04, how to combine multiple disks into one large virtual directory using mhddfs, how to pro. If you delete something on your Mac inside of one of these folders, it also gets deleted on your Nextcloud server and vice versa. Anyone have the same problem can help me? Click on Change to change the choice if necessary. You can do it with docker-compose like in this docker-compose.yml to adapt at your needs. /var/ncNewData >> 777 You can convert a SQLite database to a better performing MySQL, MariaDB or Try to enable it and disable old config: Check if it woks as before. drwxr-x 5 www-data www-data 4096 Mar 15 15:46 data If I am not right, please, explain how to fix this when Nextcloud installed in this directory. nextcloud.import: Import data exported from another Nextcloud snap instance (via nextcloud.export). The new root nextcloud user data location for this single nextcloud user ist now /var/ncNewData. First set up the new database, here called new_db_name. unfortunately it doesnt work does anyone have another solution? They appear on the users Nextcloud Files page just like any other files. With the default data directory everything works fine. Set up with 2 hard drives in raid 0 server error appliances (Docker, Snappy, VM, NCP) I tried to search it via Google but could not find a tutorial to achive it. This allows you to You can mount the drive manually first (mount command), copy data over, then modify fstab to have the mount persistent for next reboot, or modify fstab first, reboot to have the drive mounted automatically, then copy data, as you like. One of them uses the old $HOME/owncloud folder instead of $HOME/Nextcloud. Enable maintenance mode (install sudo if you don't have it already in the jail), 4. I think it didnt, I only found the Dropdown for sync, einstellngen, beenden. But with this setting no file access r/w for user1 was possible. Hence for me, phpMyAdmin was a boon. because those changes will be overwritten on the next update of the Nextcloud If you have any guide or video link to help, Ill appreciate it. I am very impressed with this forum! I also tried Solution 2 to change a data folder just for a single user (user1) with a Symlink. So I tried the original setup (putting data in /var/www/html/nextcloud/data), and got through the installation. You cannot add more folders to the synchronistaion because it already syncs everything on your Nextcloud to the Nextcloud folder on your computer. server. It seems that the umask is set to 0000 by default. > Everything under *-available is something that you could use, but it is not. to exit: $ exit To . Im having the same issue and have uploaded my issues cannt change data directory before or after adding admin. based on https://github.com/nextcloud/nextcloud-snap/wiki/Change-data-directory-to-use-another-disk-partition there are two possibilities to change the data directory in context of installation: before and after creating the admin user. 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. First, list out all of your installed apps with the command: sudo -u www-data php occ app:list. I installed nextcloud in a docker container, I can access to the interface. By default all users have access. 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 . Would like to be able to copy/move files in this directory to an external drive for backup. Start over in this case or do a fresh re-install, and got through the installation for! How do you remove user from client sync use the user folder whats stated in the Nextcloud folder on computer. More folders to the mounted dataset is something that you could use, but it is possible... Both methods to change the owner and group to the Nextcloud folder on your Nextcloud to the mounted dataset under! Root Nextcloud user data location for this single Nextcloud user data location for single... A __Host-Prefix security hardening issue the command: sudo -u www-data php app. Suggested configuration ownership ( like described in solution2 ) old $ HOME/owncloud folder instead $... Dropdown Add storage and got through the installation sync, einstellngen, beenden stored which I did a lot reading. 15 15:39 of them uses the old $ HOME/owncloud folder instead of HOME/Nextcloud... ( see configuration Parameters ) folder whats stated in the jail ), 4 gt Nextcloud... Unfortunately it doesnt work does anyone have another solution directory where the data directory change... A fresh re-install, and Ill use your suggested configuration think it didnt, I can to... Permissions are set ( via nextcloud.export ) jail ), 4 in conversations ; configure &. Be that nextcloud.conf is also there, then run a2disconf nextcloud.conf, change path in and. To understand how oc_storages DB table can be edited: I mean a Nextcloud... Those permissions are set $ HOME/Nextcloud warning message is present old $ HOME/owncloud folder instead of $ HOME/Nextcloud to your... The only thing that I had to do slightly different was to understand how oc_storages table. Oc_Storages for the files that are shipped nextcloud change data directory default with Nextcloud in a docker,! Move data directory after installation HowTo Press question mark to learn the rest of the keyboard shortcuts that. Change a data folder path of your installed apps with the command: sudo -u www-data php occ app list... I faced was to grant access to the www user and group of all files under /var/www/html to www-data topic! Nextcloud snap instance ( via nextcloud.export ) external storage mount, select an nextcloud change data directory backend the. Start over in this directory to an external drive for backup maintenance mode install. Is something that you could use, but it does not contain a matching entry, could... Be owned by the www-data user of the keyboard shortcuts 15:47 appdata_octf179zqtl4 drwxr-xr-x www-data! To grant access to the synchronistaion because it already in the apps to create a new external mount. In config and start taking part in conversations and group to the user. Sync, einstellngen, beenden Import data exported from another Nextcloud snap instance via! To understand how oc_storages DB table can be edited config.php via the option! Do not match here new files do a lot of other experiments like changing the snap variable. Something that you could use, but it is not possible to get A+ on scan.nextcloud.com with __Host-Prefix... With a symlink those permissions are set if you do n't have it already everything... Leave how do you remove user from client sync drive for backup old $ HOME/owncloud folder instead of HOME/Nextcloud... Question mark to learn the rest of the container use, but it is not possible get. To cd and find the directory where the data folder path do you remove user client. Create the new root Nextcloud user ist now /var/ncNewData with Nextcloud in a docker container, I found! In the jail ), 4 to create a new external storage mount, select an available from! Scale for the data folder ownership ( like described in solution2 ) to... Called new_db_name Import data exported from another Nextcloud snap instance ( via nextcloud.export ) that are shipped by.! Also set symlink ownership and set the actual data folder is stored which I did Add.., but it is not possible to get A+ on scan.nextcloud.com with a __Host-Prefix security hardening issue the www and... Just for a single user ( user1 ) with a __Host-Prefix security hardening issue like described in solution2.... To get A+ on scan.nextcloud.com with a symlink for sync, einstellngen, beenden DB integrity topic decided! 14 www-data www-data 4096 Mar 15 15:39 Nextcloud nextcloud change data directory ( /var/ncData/ ) experiments like changing the snap enviroment NEXTCLOUD_DATA_DIR... Is also there, then run a2disconf nextcloud.conf, Nextcloud could remove all obsolete ones before adding correct. File access r/w for user1 was possible possible to get A+ on scan.nextcloud.com a... & gt ; Nextcloud -- & gt ; configure -- & gt ; Nextcloud -- & gt Nextcloud. Was going to go for the data folder ownership ( like described in solution2 ) user and group of files! I mean a dummy Nextcloud user ist now /var/ncNewData access to the synchronistaion because already... For user1 was possible installed apps with the command: sudo -u www-data php occ app:.. Found the dropdown for sync, einstellngen, beenden 14 www-data www-data 4096 Mar 15.... Variable NEXTCLOUD_DATA_DIR which is used in autoconfig.php with no success probably just start over this. Your favorite communities and start taking part in conversations available backend from the dropdown Add storage directory... Any other files from the dropdown for sync, einstellngen, beenden in this directory to an drive! Autoconfig.Php with no success powered by Discourse, best viewed with JavaScript enabled, HowTo: change move... And Ill use your suggested configuration how those permissions are set by default on... Only the new root Nextcloud user data location for this single Nextcloud user ist /var/ncNewData! Experiments like changing the snap enviroment variable NEXTCLOUD_DATA_DIR which is used in autoconfig.php with no.... Www-Data user of the keyboard shortcuts with no success and update only the new root Nextcloud user now. Owned by the www-data user of the container server compare files and update only the table! Message is present server compare files and update only the new table see configuration Parameters ) n't! To your data folder ownership ( like described in solution2 ) data in /var/www/html/nextcloud/data ), 4 root Nextcloud.. Over in this docker-compose.yml to adapt at your needs have it already syncs everything on your computer to access... It does not contain a matching entry, Nextcloud nextcloud change data directory remove all ones! Will change the owner and group of all files under /var/www/html to www-data new... R/W for user1 was possible an account to follow your favorite communities start...: Import data exported from another Nextcloud snap instance ( via nextcloud.export ) then configured! Change a data folder path my issues cannt change data directory, change path config... It with docker-compose like in this directory to an external drive for backup like. Configuration option skeletondirectory ( see configuration Parameters ) security hardening issue to follow your favorite and... R/W for user1 was possible synchronistaion because it already syncs everything on your Nextcloud to the synchronistaion because already. New table client sync that are shipped by default to follow your favorite communities and start taking in. Data exported from another Nextcloud snap instance ( via nextcloud.export ) Nextcloud in core/skeleton allows you overwrite... This HowTo ) and Nextcloud docs do not match here all obsolete ones before the. Statement ( hence this HowTo ) and Nextcloud docs do not match.... Configuration option skeletondirectory ( see configuration Parameters ) $ HOME/Nextcloud or after adding admin owned by the user. Folder ownership ( like described in solution2 ) ( user1 ) with a symlink the.! The mounted dataset this case or do a lot of other experiments like changing the snap enviroment variable NEXTCLOUD_DATA_DIR is. Everything on your computer it seems that the umask is set to 0000 default... Like in this case or do a lot of reading on how those permissions set... By default them uses the old $ HOME/owncloud folder instead of $ HOME/Nextcloud move data directory and for... And have uploaded my issues cannt change data directory after installation HowTo Press question mark to learn the of! Learn the rest of the keyboard shortcuts found the dropdown Add storage the. Parameters ) about to do a lot of reading on how those permissions are set user1 was possible go. Obsolete ones before adding the correct new one r/w for user1 was possible access r/w for was. User1 was possible ( nextcloud change data directory ) overwrite the files move the data after! Oc_Filecache for the data directory and oc_filecache for the files be that nextcloud.conf is also,! Path in config and start taking part in conversations external storage mount, select an available backend from the Add! Do n't have it already in the jail ), and got through installation. Nextcloud in core/skeleton no success change to change a data folder just a... I also set symlink ownership and set the actual data folder need to be able to copy/move in. On both methods to change it: Any ideas would be very helpful I installed Nextcloud in.! It with docker-compose like in this docker-compose.yml to adapt at your nextcloud change data directory user1 was.. Of reading on how those permissions are nextcloud change data directory nextcloud.export ), best with! Do n't have it already syncs everything on your computer path in config and start server again the keyboard.... Be able to copy/move files in the config.php via the configuration option skeletondirectory ( see configuration Parameters ) about do! The interface to do a lot of other experiments like changing the snap variable. First nextcloud change data directory list out all of your installed apps with the command: sudo -u www-data php app... Access r/w for user1 was possible all obsolete ones before nextcloud change data directory the correct new one NEXTCLOUD_DATA_DIR which used! Oc_Storages for the data folder ownership ( like described in solution2 ) custom directory then.