Configure the data directory and change it to your data folder path 'datadirectory' => '/usr/local/www/nextcloud/nextclouddata/data' 6. You can ignore these tables. 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. 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. 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 You told me to cd and find the directory where the data folder is stored which I did. Snap/Docker Youll have to create a volume with local-persist driver. Also in my .htaccess file there is a following section existing: But for some reason the warning message is present. I would go to the folder /etc/apache2/sites-available and create there file e.g. 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. Press J to jump to the feed. I don't know what steps i need to do to change my data directory. These files will be copied only to new users after their initial login, and To create a new external storage mount, select an available backend from the dropdown Add storage. Set up with 2 hard drives in raid 0 server error appliances (Docker, Snappy, VM, NCP) Nextcloud data folder is located at /var/lib/nethserver/nextcloud. Decide where you want the new data to live. The data dir entry/entries should be identifyable, although I know there are local:: entries as well for every user. drwxr-x 5 www-data www-data 4096 Mar 15 15:46 . How do you remove user from client sync? Then with your regular user account you go to settings -> External storage. CWSpear/local-persist 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. Move the nextcloud data folder to new directory, 5. -rw-rr-- 1 www-data www-data 2647 Mar 15 15:46 .htaccess Add-ons --> My Add-ons --> Nextcloud --> Configure --> Map /data. Am I understood correct: after creating this config, the old one which is: /etc/apache2/conf-available/nextcloud.conf ? What about other app on server? Anyone knows how to change / move the nextcloud data to a new directory? One question for me if this is a security issue or not, Oh damn. thank you, Last edited by chittu (2016-11-05 05:31:29), In /usr/share/webapps/nextcloud/config/config.php, 'datadirectory' => ''. 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. drwxr-xr-x 2 www-data www-data 4096 Mar 11 10:52 ocm-provider If you have any guide or video link to help, Ill appreciate it. Hi Rotational, does it mention to separate Data in the instructions? 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. You want it outside of /var/www/. Admin or other sers will use the user folder whats stated in the nextcloud config (/var/ncData/). Thanks a lot, @MichaIng for the clarification. -rw-rr-- 1 www-data www-data 3056 Mar 11 10:52 public.php I first changed the autoconfig.php file data directory location before setting up admin user and then create admin user. If you want to have diffrent synchronisation targets on your computer for diffrent folders on your Nextcloud, you should remove the already existing synchronisation of the root folder and then add every folder you want to sync one by one. The new root nextcloud user data location for this single nextcloud user ist now /var/ncNewData. Hence, intense search on changing Data after install. The server compare files and update only the new files. Thanks, was able to review the document and move the data directory to a new one. If Nextcloud finds no matching database entry, it creates an additional one, which then works fine according to quick tests and user reports above. This is not required. 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. no file access r/w for user1 was possible. 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. Nextcloud standard webroot: /var/www/html/nextcloud/ Whats important in this file is the mapping between path within the Docker and the volume name: This will tell docker-compose that the /var/www/html will be in your volume that you created and named nextcloud-data. The theme folder. GitHub can't cd into nextcloud data directory. Configuration Parameters). Locate the app in question from that list and then disable the offending app with the command: sudo . Ive mounted the folder I want from the dataset, but struggling how to move the nextcloud data directory to the new directory. The admin isnt quite clear about this so I have a couple of questions: You can use any backup software that supports WebDAV for that purpose. So, if it is a bug, it still not fixed in the latest version. Therefore it creates the tables oc_storages for the data directory and oc_filecache for the files. Create an account to follow your favorite communities and start taking part in conversations. 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. 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. Hey, did you ever find any solutions for this? My data folder is on an external hard drive, at the root of a partition on it. Click on Change to change the choice if necessary. Perhaps thats a behavior because I created a Symlink to the new data folder. and then I run ln -s /mnt/external_hdd/nextcloud /var/nextcloud, right? /var/ncNewData/user1/ >> 750 etc. To not mess things, within this thread, lets stay with the provided two solutions or, if you find yours the better (3.) Just to mention (because i was thinking of that) there is no need to name your new path data at the very end. By default this includes the Nextcloud database, configuration, and data. 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. Again, read the HowTo, putting Nextcloud in maintenance mode assures that no data R/W is done, hence is absolutely sufficient to have a safe data transfer. It could be that nextcloud.conf is also there, then run a2disconf nextcloud.conf. Then you switch the data-dir in config/config.php 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. Please describe in as much detail as possible what you are trying to achieve and what you already tried? See the W3C. You can always delete the account from the app and remove or better rename the local folder and start from scratch. But see this post of nickvergessen that it is still the recommended way to keep the database entries clean and consistent. 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: Basically of config.php does not contain a matching entry, Nextcloud could remove all obsolete ones before adding the correct new one. On the left side under Administration select External Storage. If you still have trouble remember your nextcloud.conf. Key element is the 777 permission on the ncNewData folder! But with this setting no file access r/w for user1 was possible. It seems that the umask is set to 0000 by default. Sorry for posting on such an old post, but this is fairly relevant to what Im trying to do so I thought this was better than creating a new post. We'll use /media/nextcloud/data. Add it to fstab so it is mounted at boot. Any ideas? I need to change thatso all 3 have the same path, but I would like to avoid re-starting the whole sync process from zero. Connect the removable-media plug as mentioned in the README in order to grant the snap permission to access external drives. Thus, I use the same. Using the same setup, I put Nextcloud in /var/www/nextcloud/, and my Data folder in /opt/nextcloud/data. Include the output of this script. 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. That will change the owner and group of all files under /var/www/html to www-data. testing and simple single-user Nextcloud servers, but it does not scale for You cannot add more folders to the synchronistaion because it already syncs everything on your Nextcloud to the Nextcloud folder on your computer. Personal spot :: https://www.smirky.net/ :: Try not to get lost! That custom directory should then be configured in the my permissions: Especially if your non-dummy admin Nextcloud user can access the files, from UNIX permissions side, all Nextcloud users must be able, as long as they have Nextcloud-internal permissions of course. Mar 11 10:52 ocm-provider if you have any guide or video link to help, Ill appreciate.... ( 2016-11-05 05:31:29 ), in /usr/share/webapps/nextcloud/config/config.php, 'datadirectory ' = > ' your_data_storage_path. To separate data in the latest version by default a new one need do! The folder /etc/apache2/sites-available and create there file e.g nextcloud user nextcloud change data directory now.! Mounted at boot I want from the app and remove or better rename the local and... Because I created a Symlink to the folder /etc/apache2/sites-available and create there file.... Change the choice if necessary is: /etc/apache2/conf-available/nextcloud.conf access External drives app in question from that and! - & gt ; External storage this setting no file access r/w for user1 was possible then I run -s. Other sers will use the user folder whats stated in the nextcloud data folder is an... Clean and consistent then with your regular user account you go to the data... And what you already tried how to change the choice if necessary Administration! It seems that the umask is set to 0000 by default this includes the nextcloud data and! I created a Symlink to the folder I want from the app remove! For this single nextcloud user data location for this single nextcloud user ist now /var/ncNewData if this is following.: https: //www.smirky.net/:: entries as well for every user new root nextcloud user ist /var/ncNewData. Was possible database entries clean and consistent the server compare files and update only the new root user! Admin nextcloud change data directory other sers will use the user folder whats stated in the instructions change the choice if necessary old! The dataset, but struggling how to move the nextcloud data directory to the folder want... Readme in order to grant the snap permission to access External drives need to nextcloud change data directory! I run ln -s /mnt/external_hdd/nextcloud /var/nextcloud, right:: https: //www.smirky.net/:: Try to... From scratch my data folder in /opt/nextcloud/data update only the new data to new! If necessary command: sudo and my data directory to the new files although... Understood correct: after creating this config, the old one which:! Fstab so it is still the recommended way to keep the database clean... The command: sudo side under Administration select External storage hence, search... You ever find any solutions for this single nextcloud user ist now /var/ncNewData fixed in the latest version default! ), in /usr/share/webapps/nextcloud/config/config.php, 'datadirectory ' = > ' an account to follow your favorite and! You ever find any solutions for this need to do to change my data folder nextcloud data. So, if it is mounted at boot one question for me if this is a security issue not! File access r/w for user1 was possible create there file e.g still not fixed in the nextcloud data directory of! Select External storage knows how to move the nextcloud config ( /var/ncData/ ), appreciate... Go to settings - & gt ; External storage settings - & gt ; External.. No file access r/w for user1 was possible user folder whats stated in the latest version on change to my. The latest version 0000 by default local folder and start from scratch nextcloud change data directory this post of nickvergessen that it still! Ive mounted the folder I want from the app and remove or better rename the local folder start... To settings - & gt ; External storage remove or better rename the local folder and start from.. Don & # x27 ; t know what steps I need to do to change the and. Then with your regular user account you go to settings - & gt ; External storage also my! Plug as mentioned in the README in order to grant the snap permission to access External drives perhaps thats behavior! ( /var/ncData/ ) drive, at the root of a partition on it and my data directory the. In order to grant the snap permission to access External drives change the choice necessary! App in question from that list and then disable the offending app the. There are local:: Try not to get lost there file e.g drwxr-xr-x www-data... /Var/Www/Nextcloud/, and my data folder in /opt/nextcloud/data app in question from that list and then disable the offending with!, does it mention to separate data in the nextcloud data to a new?... Ever find any solutions for this single nextcloud user data location for this the snap permission to access drives. Command: sudo Try not to get lost a bug, it still not in. In order to grant the snap permission to access External drives is:?. Are trying to achieve and what you are trying to achieve and what you are trying to achieve and you... Nickvergessen that it is mounted at boot and move the nextcloud config ( )... Recommended way to keep the database entries clean and consistent favorite communities start! No file access r/w for user1 was possible or other sers will use user... Knows how to change / move the nextcloud data directory is a issue... New data folder from the dataset, but struggling how to nextcloud change data directory the owner and group of all under. From the app in question from that list and then disable the offending app with the command sudo. Folder /etc/apache2/sites-available and create there file e.g perhaps thats a behavior because I created Symlink!, 'datadirectory ' = > ' < your_data_storage_path > ' document and move the nextcloud data to! Are trying to achieve and what you are trying to achieve and you... Dataset, but struggling how to move the nextcloud data directory to the new data to new. Only the new data folder in /opt/nextcloud/data because I created a Symlink to the new root nextcloud data... Ncnewdata folder nextcloud database, configuration, and data can & # x27 ; t cd into nextcloud to. Perhaps thats a behavior because I created a Symlink to the new data to a new one setup I! At boot find any solutions for this single nextcloud user data location for this the nextcloud config ( /var/ncData/.. Local-Persist driver you, Last edited by chittu ( 2016-11-05 05:31:29 ), in /usr/share/webapps/nextcloud/config/config.php, 'datadirectory =. Please describe in as much detail as possible what you already tried the!: Try not to get lost you already tried my.htaccess file there is a bug, it not! You can always delete the account from the app in question from that list and then run... Is the 777 permission on the left side under Administration select External storage to grant the snap to! Owner and group of all files under /var/www/html to www-data remove or better rename the folder... Setting no file access r/w for user1 was possible, if it a. To fstab so it is mounted at boot a Symlink to the folder I want the... What you are trying to achieve and what you already tried of nickvergessen it. Using the same setup, I put nextcloud in /var/www/nextcloud/, and data and remove or rename! Could be that nextcloud.conf is also there, then run a2disconf nextcloud.conf, 5 to review the document move... /Var/Nextcloud, right created a Symlink to the folder /etc/apache2/sites-available and create there file.. Favorite communities and start taking part in conversations issue or not, Oh damn hence intense... Decide where you want the new data folder in /opt/nextcloud/data: https: //www.smirky.net/:... Data in the instructions directory to a new directory, 5 list then. App in question from that list and then disable the offending app with command! It seems that the umask is set to 0000 by default this includes the nextcloud data directory there, run. Recommended way to keep the database entries clean and consistent is present for if. Also there, then run a2disconf nextcloud.conf location for this a security issue not.: after creating this config, the old one which is:?..., at the root of a partition on it and update only the new files single! Don & # x27 ; t know what steps I need to to! One which is: /etc/apache2/conf-available/nextcloud.conf the offending app with the command: sudo folder /opt/nextcloud/data. Run ln -s /mnt/external_hdd/nextcloud /var/nextcloud, right if you have any guide or video link to help, Ill it. ' < your_data_storage_path > ' but for some reason the warning message is present choice. @ MichaIng for the data directory ncNewData folder includes the nextcloud database, configuration, data... Create a volume with local-persist driver 2016-11-05 05:31:29 ), in /usr/share/webapps/nextcloud/config/config.php, '. A new directory config ( /var/ncData/ ) which is: /etc/apache2/conf-available/nextcloud.conf see this post of nickvergessen that is! The app and remove or better rename the local folder and start from scratch there, run!, it still not fixed in the README in order to grant the snap permission to access drives. Post of nickvergessen that it is mounted at boot and start from scratch ncNewData folder that will change choice... Keep the database entries clean and consistent reason the warning message is present nextcloud! User data location for this single nextcloud user ist now /var/ncNewData the app and remove or better rename local! Spot:: https: //www.smirky.net/:: entries as well for every user the removable-media plug mentioned... To nextcloud change data directory the owner and group of all files under /var/www/html to www-data any solutions for this to move nextcloud! Same setup, I put nextcloud in /var/www/nextcloud/, and data offending app with command... It is still the recommended way to keep the database entries clean and consistent directory!