-
Notifications
You must be signed in to change notification settings - Fork 0
Updating Nextcloud
🇫🇷 Cette page est également disponible en français : fr-Updating-Nextcloud
This page explains how to keep your Nextcloud installation up to date using
the built-in updater and the occ upgrade command.
- You are connected to the VM via SSH — see SSH-Connection.
- You have taken a backup before starting — see the backup guide for details.
Important: Always back up your data and database before performing an upgrade. Upgrades cannot be rolled back without a backup.
Nextcloud offers two update channels:
| Channel | Description |
|---|---|
| stable | Well-tested releases, recommended for production |
| maintenance | Security and critical bug fixes only for the current major version |
Check the current channel:
sudo -u www-data php /var/www/nextcloud/occ config:system:get updater.release.channelSet the channel to stable (recommended):
sudo -u www-data php /var/www/nextcloud/occ config:system:set updater.release.channel --value=stableBefore upgrading, put Nextcloud into maintenance mode to prevent user access:
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --onNextcloud ships with a built-in web updater. To use it:
- Navigate to
https://cloud.example.com/updater/in your browser while logged in as admin. - Click Start update and follow the on-screen prompts.
- The updater will download the new version and extract the files.
Alternatively, use the command-line updater:
sudo -u www-data php /var/www/nextcloud/updater/updater.pharNote: The Nextcloud Updater app is a core component and must not be disabled. Disabling it would prevent security updates from being applied.
After the files are updated, run the database upgrade:
sudo -u www-data php /var/www/nextcloud/occ upgradeThis applies any database schema changes required by the new version.
Once the upgrade is complete, disable maintenance mode:
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --offCheck that Nextcloud is running the new version:
sudo -u www-data php /var/www/nextcloud/occ statusExpected output includes the new version number:
Nextcloud or one of the apps require upgrade - only a single user (who is an admin) is allowed to be logged in
...
- installed: true
- version: 28.x.x.x
- versionstring: 28.x.x
Also log in via the web interface and check Settings > Overview for any remaining warnings.
| Check | Command / Action |
|---|---|
| Version | sudo -u www-data php /var/www/nextcloud/occ status |
| No warnings | Settings > Overview in browser |
| All services active | sudo systemctl is-active nginx php8.3-fpm postgresql redis-server |
occ upgrade fails with "already latest version"
The database is already at the current version. Run occ status to confirm. You can safely disable maintenance mode.
Web updater gets stuck
Use the command-line updater instead: sudo -u www-data php /var/www/nextcloud/updater/updater.phar
"Could not get exclusive lock on config file"
Another occ process is running. Wait for it to finish, or check with ps aux | grep occ.
Apps are disabled after upgrade
Some apps may not yet support the new Nextcloud version. Go to Settings > Apps
and check for available app updates, or wait for the app developer to release a compatible version.
| Next | Page |
|---|---|
| Manage installed apps | Managing-Apps |
| Manage user accounts | Managing-Users |
| Troubleshoot issues | Troubleshooting |
Getting Started
Configuration
Administration
Using Nextcloud
Help
Démarrage
Configuration
Administration
Utiliser Nextcloud
Aide