Posted On August 11, 2025

How To Upgrade NextCloud 28 to 31 in Docker Compose

kimconnect 0 comments
blog.KimConnect.com >> Linux >> How To Upgrade NextCloud 28 to 31 in Docker Compose
1. Upgrade in the incremental progression of one major version at a time

Login to your Linux instance and pull the next version:

sudo docker pull lscr.io/linuxserver/nextcloud:version-29.0.0
Sample output for version 31:
version-31.0.0: Pulling from linuxserver/nextcloud
2b1d751b68e0: Pull complete
e1cde46db0e1: Pull complete
e5627bac0b8e: Pull complete
485b9fca31f5: Pull complete
d78faf20d9d2: Pull complete
9fea649eb927: Pull complete
f9427200a252: Pull complete
72419d5c85e5: Pull complete
f94a69410b48: Pull complete
12292d2f205a: Pull complete
6e8de3fb0f2f: Pull complete
Digest: sha256:97d67e2c804dab48a5b5843c3f8afe98ac245c23e629a4be346dc8c8a27cdac6
Status: Downloaded newer image for lscr.io/linuxserver/nextcloud:version-31.0.0
lscr.io/linuxserver/nextcloud:version-31.0.0

Goto Docker Compose > Project > select the NextCloud project > Stop > YAML Configurations > Edit this line
---
services:
nextcloud:
image: lscr.io/linuxserver/nextcloud:latest
to
---
services:
nextcloud:
image: lscr.io/linuxserver/nextcloud:29.0.0

Start and rebuild the project > check the contain logs to ensure that upgrades have been successful with this marker "[ls.io-init] done." > verify that NextCloud site is back to running status and database has been restored

...
Repeat the process by pulling the next version (sudo docker pull lscr.io/linuxserver/nextcloud:version-30.0.0) and edit Docker Compose (image: lscr.io/linuxserver/nextcloud:30.0.0)
...
Repeat the process by pulling the next version (sudo docker pull lscr.io/linuxserver/nextcloud:version-31.0.0) and edit Docker Compose (image: lscr.io/linuxserver/nextcloud:31.0.0)
...
Finally, wrap up by pulling the latest version (sudo docker pull lscr.io/linuxserver/nextcloud:latest) and edit Docker Compose (image: lscr.io/linuxserver/nextcloud:latest)

2. Housekeeping
run "sudo docker ps" to obtain CONTAINER ID
Run bash in Docker container: sudo docker exec -it [CONTAINER ID] bash
occ maintenance:repair --include-expensive
occ db:add-missing-indices

Fix this: "PHP Warning: Version warning: Imagick was compiled against ImageMagick version 1809 but version 1810 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0"
By:
Locate your php.ini file for the PHP version in use.
Add the line imagick.skip_version_check = true to the file.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Dev Environment Technitium DNS Server

Windows: $technitiumPortableDownload="https://download.technitium.com/dns/DnsServerPortable.zip"$tempDir="C:\Temp"; $extractionDir="C:\Technitium" $destinationFile = "$tempDir\DnsServerPortable.zip"; try{[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12}catch{} New-Item -ItemType Directory -Force -Path $tempDir…

Ubuntu 20.04: Setting Static IP Address on an Interface

Short Version # Configure networking sudo vim /etc/netplan/*.yaml ### Sample content ### network: version: 2…

Linux: How to Manually Create a USB Bootable Drive for ESXi

Step 1: Find the USB mount root@kimlinux:/home/kim# ls /dev/s*/dev/sda /dev/sdb1 /dev/sdb3 /dev/sdc1 /dev/sg1 /dev/snapshot /dev/stdin/dev/sdb…