%
image/svg+xml

(tip) Nextcloud: Manual upgrade on OpenBSD

Article published the ; modified the
2 minutes to read

This article has 409 words.
RAW source of the article:
Commit version: e21600e

Description

Upgrade NC (Nextcloud ) is very easy… Either you do it:

  • With the web updater.
  • Manually, as me.
  • Via the packages management.

FYI : This article explains the manual process under OpenBSD, with nginx, PHP 7.3.

Upgrading Process

This process used few years ago, since v 15.*, as KISS.

Stop Web Service

The first action disables domain:

Code: sh

Preparations

Presume user web is www.

Need to log as: $ su -l www

  1. Go to the nextcloud folder: cd www/nextcloud
  2. Need to modify the config file: sed -i -e 's#/htdocs#/var/www/htdocs#' config/config.php
  3. And enable the maintenance mode: php-7.3 occ maintenance:mode --on

Download

  1. Go to the parent folder www\ :
  2. Create an usefull version variable named v.
  3. Download the actual archive and her checksum sha256 file.
  4. Check the checksum

Code: sh

If the result of SHA is (SHA256) nextcloud-$v.tar.bz2: OK, it’s good; if not, re-download-it!

Installation

  • moving actuel folder nextcloud with date and old number version.
  • untar the archive.
  • delete file CAN_INSTALL; (we’re not looking to reinstall)!

Code: sh

First Checks

Here, you must be careful:

  • copy old config file to new folder config: cp ${oldnc}/config/config.php nextcloud/config/
  • Now, diff the oldier app folder with new folder to copy all not natives apps.
  • Egual, with themes, if necessary.

Permissions

  • Put the rights users on all files and folders into the folder nextcloud/
  • And, others rights systems.

Code: sh

Upgrade NC himself

  • Just go to the right folder: cd nextcloud/
  • Use the tool occ, as: php-7.3 occ upgrade
    • if success, go out the maintenance mode: php-7.3 occ maintenance:mode --off

And, at the final, re-sed the config file to delete /var/www : sed -i -e 's#/var/www/htdocs#/htdocs#' config/config.php

Restart Web Service

  • Enable domain and restart web server, as:

Code: sh

  • Now, connect you at the WebAdmin as admin user, et apply all updates for the apps.

And, voilà!

TL;DR

BE CAREFULL: If you copy this TL;DR as-is, you will crash your instal!

Code: sh

Caveats

If the upgrade process fails with one of thoses errors messages:

Error: Nextcloud is not installed

Example:

Code: sh

  • Have you really copy the oldier config file to the new folder config?
  • Try this tip: php-7.3 occ maintenance:repair

Error: you are trying to reinstall your Nextcloud

When you connect to the WebUI, you had this message:

Quotes:

  • Go to delete the file CAN_INSTALL under the new folder config.

the files are not visibles

  • Try: php-7.3 console.php files:scan --all

OCC Commands

As a reminder,, this usefull command occ: php occ list

And see this “manpage”: occ .