Where Does Nextcloud Server Store Data and Config?
Nextcloud Server keeps config.php in config/, files in data/, apps in apps/. The database holds the rest. Back up all four.
Last updated
Nextcloud Server splits state four ways and every partial backup finds out. config.php holds instance settings. data/ holds user files. apps/ holds installed apps. The database holds shares, tags, and metadata.
The client sync post covers laptops. This is the server half. Maintenance mode plus all four pieces moved together is the only restore that actually boots.
Where Nextcloud Server stores this, by platform
<nextcloud>/config/config.php
Instance settings including trusted domains and DB credentials. Small file, big consequences. Version it.
<nextcloud>/data/
User files outside the web root by default. Pair every copy with a same-moment DB dump.
Frequently asked questions
How do I back up self-hosted Nextcloud?
Copy config/, data/, apps/, and custom themes plus a database dump. Files without the DB lose shares and metadata. DB without files loses content.
Where is the Nextcloud trusted domains setting?
Edit config/config.php: trusted domains, mail, database credentials. Occ commands read the same file, so CLI and web never disagree.
How do I get a consistent backup?
Run occ maintenance:mode --on before copying, then off after. That freezes writes so files and DB stay consistent with each other.
Notice an outdated path? Let us know.