Nextcloud/files
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:
- link from the actual data folder to
$nextcloud/data
- 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.