Hi there neuromancer from the cloud! A few days ago my old friend stsp@ send me this link https://types.pl/@132ikl/117479884088183724 and I am fluent in reading between lines it was really clear that stsp@ tried to tell me that my port is crap and super hard to update, so I got deeply offended by it and decide to write this little article about how I do my monthly nextcloud updates on OpenBSD.
I will assume that you are running current, but really doesn't matter much because the process is the same on release too, anyway for the example I will use my server which is current, and it has:
[cloud@root] ~ ~> # pkg_info | grep nextcloud
nextcloud-35.0.0p0 easy and universal access to shared and/or personal files
Now since I commited the update for it, you can get the new version installed with:
[cloud@root] ~ ~> # pkg_add -Vu nextcloud
quirks-7.254 signed on 2026-10-25T16:17:53Z
--- -nextcloud-35.0.0p0 -------------------
You should also check /var/www/nextcloud/config/config.php (which was modified)
Once that is done, you have the new version installed on your filesystem but the actual deployment of the new version is about to start, but before that, since version 34 o 35 (you need to check hence I don't really remember) you have this warning on your config.php:
/*
* WARNING
*
* This file gets modified by automatic processes and all lines that are not
* active code (ie. comments) are lost during that process.
*
* If you want to document things with comments or use constants add your settings
* in a '<NAME>.config.php' file which will be included and rendered into this file.
*
* Example:
* <?php
* $CONFIG = [];
*
* See also: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#multiple-merged-configuration-files
*/
Which allows you to do something like this:
[cloud@root] ~ ~> cat /var/www/nextcloud/config/datadirectory.config.php
<?php
$CONFIG['datadirectory'] = ((php_sapi_name() == 'cli') ? '/var/www' : '') . '/nextcloud-data';
And play nice with the chroot(8) on httpd. At this point your installation on the browser will show you something like this:
Now, on the server we can just go like (I added a few cool extra commands just for you, but the upgrade is more than enough):
[cloud@root] ~ ~> cd /var/www/nextcloud
[cloud@root] ~ ~> su -m www -c "/usr/local/bin/php-8.5 ./occ upgrade"
... PHP MAGIC ...
[cloud@root] ~ ~> su -m www -c "/usr/local/bin/php-8.5 ./occ db:add-missing-indices"
... PHP MAGIC ...
[cloud@root] ~ ~> su -m www -c "/usr/local/bin/php-8.5 ./occ files:cleanup"
... PHP MAGIC ...
[cloud@root] ~ ~> su -m www -c "/usr/local/bin/php-8.5 ./occ files:repair-tree"
The output would be something like:
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Updating <federation> ...
Updated <federation> to 2.0.0
Updating <lookup_server_connector> ...
Updated <lookup_server_connector> to 2.0.0
Updating <oauth2> ...
Updated <oauth2> to 2.0.0
Updating <cloud_federation_api> ...
Updated <cloud_federation_api> to 2.0.0
Updating <dav> ...
Fix broken values of calendar objects
Done
0/0 [============================] 100%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
Done
0/0 [============================] 100%
Updated <dav> to 2.0.0
Updating <files> ...
Updated <files> to 3.0.0
Updating <files_lock> ...
Updated <files_lock> to 35.0.1
Updating <files_trashbin> ...
Updated <files_trashbin> to 2.0.0
Updating <files_versions> ...
Updated <files_versions> to 2.0.0
Updating <webhook_listeners> ...
Updated <webhook_listeners> to 2.0.0
Updating <workflowengine> ...
Updated <workflowengine> to 3.0.0
Updating <notifications> ...
Updated <notifications> to 8.0.1
Updating <systemtags> ...
Updated <systemtags> to 2.0.0
Updating <theming> ...
Updated <theming> to 3.0.0
Updating <appstore> ...
Updated <appstore> to 2.0.0
Updating <contactsinteraction> ...
Updated <contactsinteraction> to 2.0.0
Updating <dashboard> ...
Updated <dashboard> to 8.0.0
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 2.0.0
Updating <files_reminders> ...
Updated <files_reminders> to 2.0.0
Updating <profile> ...
Updated <profile> to 2.0.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 2.0.0
Updating <settings> ...
Updated <settings> to 2.0.0
Updating <text> ...
Updated <text> to 9.0.1
Updating <twofactor_backupcodes> ...
Updated <twofactor_backupcodes> to 2.0.0
Updating <updatenotification> ...
Updated <updatenotification> to 2.0.0
Updating <user_status> ...
Updated <user_status> to 2.0.0
Updating <weather_status> ...
Updated <weather_status> to 2.0.0
Update app calendar from App Store
Update app contacts from App Store
Update successful
Turned off maintenance mode
Resetting log level
And that's all, you are done, probably like 5 min thing, not that complicated, no? I hope I can make with this stsp@ happy again and he accepts me back on Facebook.