Skip to content

Commit 00e2e61

Browse files
authored
Merge pull request #14846 from nextcloud/docs/updater-url-option
docs(updater): document --url option for offline/air-gapped installs
2 parents 47f7226 + 56f0d5e commit 00e2e61

1 file changed

Lines changed: 90 additions & 3 deletions

File tree

admin_manual/maintenance/update.rst

Lines changed: 90 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ This is how the command line based update would continue:
138138

139139
.. code::
140140
141-
$ sudo -E -u www-data php ./occ upgrade
141+
$ sudo -u www-data php ./occ upgrade
142142
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
143143
You may use your browser or the occ upgrade command to do the upgrade
144144
Set log level to debug
@@ -180,7 +180,7 @@ The steps are basically the same as for the web based updater:
180180
2. Instead of clicking that button you can now invoke the command line based
181181
updater by going into the `updater/` directory in the Nextcloud directory
182182
and executing the `updater.phar` as the web server user. (i.e.
183-
``sudo -E -u www-data php /var/www/nextcloud/updater/updater.phar``)
183+
``sudo -u www-data php /var/www/nextcloud/updater/updater.phar``)
184184

185185
.. image:: images/updater-cli-2-start-updater.png
186186
:alt: Terminal showing Nextcloud command line updater starting and displaying update information
@@ -233,12 +233,99 @@ except an error occurred during the ``occ upgrade`` or the replacement of the
233233
code.
234234

235235
To execute this, run the command with the ``--no-interaction`` option. (i.e.
236-
``sudo -E -u www-data php /var/www/nextcloud/updater/updater.phar --no-interaction``)
236+
``sudo -u www-data php /var/www/nextcloud/updater/updater.phar --no-interaction``)
237237

238238
.. image:: images/updater-cli-8-no-interaction.png
239239
:alt: Terminal showing Nextcloud command line updater running in non-interactive batch mode
240240
:class: terminal-image
241241

242+
Using a custom download URL
243+
---------------------------
244+
245+
The ``--url`` option lets you override the archive the updater downloads.
246+
Common use cases:
247+
248+
* **Pinning a specific version** — install an exact patch release rather than
249+
whatever the update check resolves to.
250+
* **Internal mirrors** — serve the archive from a company mirror or proxy.
251+
* **Offline / air-gapped environments** — stage the archive locally and
252+
supply it via a ``file://`` URL.
253+
254+
.. warning::
255+
The normal update rules still apply when using ``--url``:
256+
257+
* **Downgrading is not supported**.
258+
* **Skipping major versions is not supported.** You must update one major
259+
version at a time (e.g. 28 → 29 → 30, not 28 → 30).
260+
261+
Passing ``--url`` does not bypass these constraints.
262+
263+
Point the updater at any HTTP/HTTPS URL:
264+
265+
.. code-block:: bash
266+
267+
sudo -u www-data php /var/www/nextcloud/updater/updater.phar \
268+
--url https://download.nextcloud.com/server/releases/nextcloud-33.0.0.zip
269+
270+
271+
.. versionadded:: 34
272+
273+
For a locally staged archive, use a ``file://`` URL:
274+
275+
.. code-block:: bash
276+
277+
sudo -u www-data php /var/www/nextcloud/updater/updater.phar \
278+
--url file:///tmp/nextcloud-33.0.0.zip
279+
280+
Signature verification
281+
~~~~~~~~~~~~~~~~~~~~~~
282+
283+
When ``--url`` is used the updater cannot look up the official signature
284+
automatically. You have two options:
285+
286+
* **Provide the signature** — pass the base64-encoded signature with
287+
``--signature``. You can get the signature from
288+
https://nextcloud.com/changelog/ or from the same mirror that hosts the
289+
archive:
290+
291+
.. code-block:: bash
292+
293+
sudo -u www-data php /var/www/nextcloud/updater/updater.phar \
294+
--url file:///tmp/nextcloud-33.0.0.zip \
295+
--signature "BASE64_SIGNATURE_HERE"
296+
297+
* **Skip verification** — pass ``--no-verify`` to disable integrity checking
298+
entirely. Only do this if you fully trust the source and transfer channel,
299+
or if you have already verified the archive yourself (e.g. by checking the
300+
SHA-512 checksum):
301+
302+
.. code-block:: bash
303+
304+
sha512sum -c nextcloud-33.0.0.zip.sha512
305+
306+
Then run the updater without signature checking:
307+
308+
.. code-block:: bash
309+
310+
sudo -u www-data php /var/www/nextcloud/updater/updater.phar \
311+
--url file:///tmp/nextcloud-33.0.0.zip \
312+
--no-verify
313+
314+
.. warning::
315+
``--no-verify`` removes the integrity check that protects against
316+
corrupted or tampered archives. Always verify the archive through an
317+
independent channel before using this option.
318+
319+
These options can be combined with ``--no-interaction`` for fully automated
320+
runs:
321+
322+
.. code-block:: bash
323+
324+
sudo -u www-data php /var/www/nextcloud/updater/updater.phar \
325+
--url file:///tmp/nextcloud-33.0.0.zip \
326+
--signature "BASE64_SIGNATURE_HERE" \
327+
--no-interaction
328+
242329
Troubleshooting
243330
---------------
244331

0 commit comments

Comments
 (0)