Skip to content

Commit 3965922

Browse files
skjnldsvclaude
authored andcommitted
fix(docs): list config.php keys to review when migrating servers
After copying config.php to a new machine, server-specific values (datadirectory, DB credentials, trusted_domains, etc.) silently stay wrong and cause startup errors or data corruption. The docs only said "adapt the paths" without being specific. Add an explicit important admonition listing every key that must be reviewed and updated before starting Nextcloud on the new server. Fixes #12919 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent 9e86e3e commit 3965922

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

β€Žadmin_manual/issues/general_troubleshooting.rstβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ Troubleshooting contacts & calendar
355355
.. tip::
356356
Please also refer to the troubleshooting article in the groupware section: :ref:`troubleshooting_groupware`.
357357

358+
.. _troubleshooting_data_directory:
359+
358360
Troubleshooting data-directory
359361
------------------------------
360362

β€Žadmin_manual/maintenance/migrating.rstβ€Ž

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,45 @@ the new location. It is also assumed that the authentication method
7979
Changing the location of the data directory might cause a corruption of relations
8080
in the database and is not supported.
8181

82+
.. important::
83+
After copying ``config/config.php`` to the new machine, **review and update every
84+
server-specific value** before starting Nextcloud. At minimum check:
85+
86+
* ``datadirectory`` β€” keep this path identical to the original server wherever
87+
possible. Changing the data directory path requires a database update and
88+
is strongly discouraged; see :ref:`troubleshooting_data_directory`
89+
if you have no choice.
90+
* ``dbhost``, ``dbname``, ``dbuser``, ``dbpassword`` β€” update if the new server
91+
uses a different database host or credentials.
92+
* ``trusted_domains`` β€” add or replace the new server's hostname or IP address.
93+
* ``overwrite.cli.url``, ``overwritehost``, ``overwriteprotocol``,
94+
``overwritewebroot`` β€” update to reflect the new server's URL and any
95+
reverse-proxy setup.
96+
* ``memcache.local``, ``memcache.distributed``, ``memcache.locking`` and the
97+
associated connection parameters β€” update if the cache/session backend address
98+
changed on the new machine. Depending on the backend in use, check ``redis``
99+
or ``redis.cluster`` (for Redis / Redis Cluster) or ``memcached_servers``
100+
(for Memcached).
101+
* ``objectstore`` β€” if external object storage (S3, Swift, etc.) is configured,
102+
verify that the endpoint, bucket, and credentials are still valid and reachable
103+
from the new server.
104+
* ``mail_smtphost``, ``mail_smtpport`` β€” update if the SMTP relay differs on
105+
the new server.
106+
* ``logfile`` β€” update if the log path differs on the new server.
107+
* ``tempdirectory`` β€” if set to a custom path, make sure that path exists and
108+
is writable on the new server.
109+
* ``serverid`` β€” if set, keep the same value. It identifies the server in
110+
multi-PHP-server setups and must not change. If you override it per server via
111+
the ``NC_serverid`` environment variable, configure the same override on the new
112+
server.
113+
114+
The ``secret`` and ``instanceid`` values are generated once at install time and
115+
tied to all encrypted data and user sessions. **Do not change or regenerate them.**
116+
They must be copied verbatim from the original ``config.php``.
117+
118+
Leaving stale values (especially database credentials or ``datadirectory``)
119+
will cause startup errors or data corruption.
120+
82121

83122
#. Check the config.php file of the **ORIGINAL** system to see if it has
84123
the ``data-fingerprint`` set to a non-empty value. If this is the case, make

0 commit comments

Comments
Β (0)