Difference between revisions of "Nextcloud/files"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(Created page with "==Data files== Although by default Nextcloud stores its hosted files in <code>$nextcloud/data</code> (where $nextcloud is the root folder of the Nextcloud installation, an...")
 
(this was all about the server -- added client files info)
 
Line 1: Line 1:
==Data files==
+
==Client==
 +
The Nextcloud desktop client seems to use the following locations under Linux:
 +
* <code>~/.local/share/Nextcloud</code> for log files
 +
* <code>~/.config/Nextcloud</code> for settings and other data
 +
==Server==
 +
===Data repository===
 
Although by default [[Nextcloud]] stores its hosted files in <code>$nextcloud/data</code> (where $nextcloud is the root folder of the Nextcloud installation, and also the root of its public HTML presence), it can be moved to any arbitrary location within the filesystem via either of two methods:
 
Although by default [[Nextcloud]] stores its hosted files in <code>$nextcloud/data</code> (where $nextcloud is the root folder of the Nextcloud installation, and also the root of its public HTML presence), it can be moved to any arbitrary location within the filesystem via either of two methods:
 
# link from the actual data folder to <code>$nextcloud/data</code>
 
# link from the actual data folder to <code>$nextcloud/data</code>
Line 5: Line 10:
  
 
The first option may be unavailable on some web hosting platforms. Nextcloud does not seem to notice or care whether the data folder is a link or an actual folder.
 
The first option may be unavailable on some web hosting platforms. Nextcloud does not seem to notice or care whether the data folder is a link or an actual folder.
===Folder structure===
+
====Folder structure====
 
The actual hosted files are located in <code>$data/admin/files/</code>, where $data is the "actual data folder" (more properly, the Nextcloud data folder). There is also a <code>$data/admin/cache</code> folder which does not need to be backed up or restored.
 
The actual hosted files are located in <code>$data/admin/files/</code>, where $data is the "actual data folder" (more properly, the Nextcloud data folder). There is also a <code>$data/admin/cache</code> folder which does not need to be backed up or restored.
  

Latest revision as of 14:10, 4 September 2019

Client

The Nextcloud desktop client seems to use the following locations under Linux:

  • ~/.local/share/Nextcloud for log files
  • ~/.config/Nextcloud for settings and other data

Server

Data repository

Although by default Nextcloud stores its hosted files in $nextcloud/data (where $nextcloud is the root folder of the Nextcloud installation, and also the root of its public HTML presence), it can be moved to any arbitrary location within the filesystem via either of two methods:

  1. link from the actual data folder to $nextcloud/data
  2. modify the value of $CONFIG['datadirectory'] in $nextcloud/config/config.php to point to the actual data folder

The first option may be unavailable on some web hosting platforms. Nextcloud does not seem to notice or care whether the data folder is a link or an actual folder.

Folder structure

The actual hosted files are located in $data/admin/files/, where $data is the "actual data folder" (more properly, the Nextcloud data folder). There is also a $data/admin/cache folder which does not need to be backed up or restored.

When restoring files to a Nextcloud instance with a good database but missing data, it is not necessary to restart Apache or take other steps to inform Nextcloud that the files are there; if you simply browse to the folder in the Nextcloud web UI, it should be able to access them immediately.

It is necessary to make sure they are owned by Nextcloud's user, otherwise it may not be able to alter (or, if permissions are strict, read) them.