Upgrading to the newest Nextcloud - how?

Problem Description
I have Nextcloud set up on my Freedombox, and for about a month it has been telling me that there is an upgrade available to Nextcloud 32.0.3. However, when I go into settings to upgrade, I see this message: “Web updater is disabled. Please use the command line updater or the appropriate update mechanism for your installation method (e.g. Docker pull) to update.”

The description of the Nextcloud app says “updates are performed following an independent cycle” but it’s unclear to me what that cycle is. I’m not sure whether I should have received the 32.0.3 update by now, and if I should have, I’m not sure what the preferred way to update manually is.

Information

  • FreedomBox version: 25.9.3
  • Hardware: an older Intel NUC
  • How did you install FreedomBox?: apt install freedombox on Debian Trixie

Hello,

So, if I understand correctly,

it has been telling me that there is an upgrade available to Nextcloud 32.0.3

“it” in this case would be the Nextcloud app and that you are trying to use the Nextcloud web UI to update.

I understand that Nextcloud is packaged separately in FreedomBox (FB) via Podman by the FB devs. I reckon that the update might take a bit longer to reach FB, when compared to the upstream Nextcloud project.

I suppose the devs disable the webUI updater so that it doesn’t conflict with FB’s way of updating the Nextcloud package. I reckon that you should ignore the in-app update message and wait until the update arrives at FB and it should update automatically when it does.

1 Like

Yes, “it” means the web UI.

I thought it might be that FreedomBox hasn’t packaged the new version yet, but I’d have hoped for a more definite response. Is there a way for me to manually check whether updates are available for a container? podman auto-update prints nothing but I’m not sure whether that means there are no updates or that auto-update isn’t configured.

I’m not sure what is the latest available version. I just noticed that you are not on the latest version of FreedomBox (which is 25.17.1). You could try updating and see if the Nextcloud app get updated in the process.

Maybe the devs can give you a better answer. I’m sorry that I couldn’t help.

1 Like

I just did a fresh install of FreedomBox two days ago and installed NextCloud today. NextCloud is version 31.0.12. I have no nag to update NextCloud.

Update your FreedomBox. That basically means update Debian. You likely have Debian 12 but Debian 13 came out back in Aug/Sept.

OP is already on Trixie. Could upgrade his FB package since it not up-to-date. I reckon that it will still be lagging behind upstream due to how Nextcloud is packaged on FB, as it is not part of the Debian repositories.

Guess I didn’t see that last sentence. Interesting that I got a newer version of NC with Trixie. Must have been updated recently.

Will apt do it?

sudo apt update && sudo apt upgrade

Or Cockpit >> Software updates

Found this

Has a link to the source code for the container on github.

Update instructions there say;

Beware that you have to run the same command with the options that you used to initially start your Nextcloud. That includes volumes, port mapping.

From the Debian wiki page is the obligatory; Updates are performed following an independent cycle.

Whatever that means is probably the key.

Cockpit >> Podman containers page shows Nextcloud container and image and there’s an option to Pull and another to Download new image but mine is up to date and working so I’m not going to click those.

I reckon both will do the job of updating the system. I’m not sure which version of Nextcloud OP is running. They might be in the latest available to FreedomBox. Unless the features from the latest version are absolutely vital, I would think twice about updating the package manually (i.e. outside FreedomBox and using Docker or Podman directly).

Personally, I let my FreedomBox servers update automatically. Also, FreedomBox is, basically, all scripted, so I try to maintain a system that is as predictable as possible.

In the past, I made changes to my box and broke things. Now, I’m a bit more familiar with the “ecosystem” and have a feel of what I can change and what I’d better leave untouched for the moment, but still, I try to be cautious.

EDIT: Clarification of apt command

1 Like

I don’t know how the nextcloud container is handled, but it is actually likely to be much more frequently updated than any Debian package from Trixie besides Freedombox, as Trixie is a stable release so most packages won’t get updates for 2 years.

“lagging behind” sounds negative but it is an advantage in terms of stability.

I had “frequent feature updates” (the backports repository) disabled for stability reasons. I just enabled it, will let you know if that allows me to update Nextcloud.

From what I can tell Freedombox is not using the official Nextcloud docker image, but rather a Nextcloud image from its own repository that it is running using Podman.

I oddly don’t have a containers page in Cockpit, but that might change after the update.

Yeah, still don’t see the Podman containers page in Cockpit.

Considering that @poorboy has a newer version of Nextcloud and a roughly identical setup to me, I suspect that I should have a newer version of Nextcloud. Again, if anyone knows how to manually check for updates (i.e. from the command line) I would appreciate it.

Did you run the manual update from System->Software Update in plinth (the web interface)? If not, I’d suggest doing that. It could take some time during which your freedombox is not usable. After that, you should have Freedombox 25.17.1.

I don’t know whether the manual update will immediately update nextcloud. If it does not, I would wait for a few days.

1 Like

Yes. I agree with you completely. I’m also not in on the detail of how it is packaged and I don’t use the app on my servers either, so I’m nescient of how it works. It could even be immediately available, I’m not sure.

I apologise for the poor choice of words. I didn’t intend to speak negatively and I’m quite fond of stability in my servers.

Come to think of it, I installed that.

sudo apt install cockpit-podman

They have Docker Manager too but it’s pre-release and by a 3rd party.

My current FBX is a fresh install due to a few issues with the previous try. Ran slow, especially Nextcloud and come to think of it, NC was outdated after a while. I could also never get Let’s Encrypt so I decided to wipe it and start fresh.

Now fully sure what fixed it but it’s running fast and SSL cert was auto-installed with no input from me. Now I’m just wondering if Nextcloud will become outdated and start nagging me about it at some point in the future.

1 Like

Yes, I did run a manual update after enabling frequent feature updates. I am now on 25.17.1.

Cockpit Podman gives quite a bit of info on the container and image. Probably enough to get through the update instructions on github.

I found the data
/var/lib/containers/storage/volumes/nextcloud-freedombox/_data/data/nextcloud-admin/files

Adjacent to the nextcloud-admin folder are two other folders with the names being a ton of letters, numbers and couple of dashes. Inside of each is a folder called Files.

That’s from two users I created in NC but haven’t logged in and done anything as.

Cockpit/Podman lists off four Volumes and a bunch of Environment variables, both of which are required to make a new Container.

Each container also gets it’s own console for typing in commands I guess. I’m really not up on this docker/podman/containers/images thing.

I would wait for a dev to reply and/or wait to see if it finally self updates.

Nextcloud Docs - Upgrade

If you installed using Snap, Docker, a pre-built VM, or a package management tool then refer to the installation and update instructions for that installation method for the most accurate upgrading instructions (generally located at the distribution point for the install method you chose).

That would be their very own docker on github.

I’ll be watching to see how this goes for you. If it never gets solved, I might just remove NC and use the Sharing app as that’s all I use NC for anyway.

1 Like

Nextcloud is kept up-to-date using Podman’s own mechanism.

systemctl cat nextcloud-freedombox.service
# /run/systemd/generator/nextcloud-freedombox.service
# Automatically generated by /usr/lib/systemd/system-generators/podman-system-generator
# 
[Unit]
Wants=network-online.target
After=network-online.target
Requires=nextcloud-freedombox-volume.service
After=nextcloud-freedombox-volume.service
BindsTo=mariadb.service
After=mariadb.service
BindsTo=redis-server.service
After=redis-server.service
BindsTo=slapd.service
After=slapd.service
SourcePath=/etc/containers/systemd/nextcloud-freedombox.container
RequiresMountsFor=%t/containers
RequiresMountsFor=/run/mysqld/mysqld.sock
RequiresMountsFor=/run/redis/redis-server.sock
RequiresMountsFor=/run/slapd/ldapi

[X-Container]
AutoUpdate=registry
ContainerName=%N
Environment=OVERWRITEWEBROOT=/nextcloud
Image=registry.freedombox.org/library/nextcloud:stable-fpm
Network=host
Volume=/run/mysqld/mysqld.sock:/run/mysqld/mysqld.sock
Volume=/run/redis/redis-server.sock:/run/redis/redis-server.sock
Volume=/run/slapd/ldapi:/run/slapd/ldapi
Volume=nextcloud-freedombox:/var/www/html


[Service]
Restart=always
Environment=PODMAN_SYSTEMD_UNIT=%n
KillMode=mixed
ExecStop=/usr/bin/podman rm -v -f -i --cidfile=%t/%N.cid
ExecStopPost=-/usr/bin/podman rm -v -f -i --cidfile=%t/%N.cid
Delegate=yes
Type=notify
NotifyAccess=all
SyslogIdentifier=%N
ExecStart=/usr/bin/podman run --name %N --cidfile=%t/%N.cid --replace --rm --cgroups=split --network host --sdnotify=conmon -d -v /run/mysqld/mysqld.sock:/run/mysqld/mysqld.sock -v /run/redis/redis-server.sock:/run/redis/redis-server.soc>

[Install]
WantedBy=default.target

The key line above lies in AutoUpdate=registry, see Podman’s own documentation. This basically means that the podman-auto-update.timer systemd timer runs every day and updates the container to its latest available version found in the container registry. The image being used for Nextcloud comes from nextcloud - Official Image | Docker Hub, where you can toggle the stable-fpm label, which will bring you directly to the containerfile. Looking at the file, it confirms that the current version used is 31.0.12 as opposed to 32.0.3. Nextcloud’s website confirms that version 31 is still considered stable/supported.

You shouldn’t try to upgrade manually from the Admin interface, as the next run of the podman-auto-update.timer will overwrite your changes anyway.

2 Likes

Good to hear that I’m still on a supported version.