Best way to update Nextcloud

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I tried to research this on google and the nextcloud forums not I can't find a clear answer. I've run across 3 different ways and don't know why the GUI version doesn't work.

1)
pkg install sudo php72-phar
sudo -u www php /usr/local/www/nextcloud/updater/updater.phar


2)
mv /usr/local/www/nextcloud /usr/local/www/nextcloud-bak
fetch "https://download.nextcloud.com/server/releases/latest.tar.bz2"
tar jxf latest.tar.bz2 -C /usr/local/www
cp /usr/local/www/nextcloud-bak/config/config.php /usr/local/www/nextcloud/config
chown -R www:www /usr/local/www/nextcloud
su -m www -c 'php /usr/local/www/nextcloud/occ upgrade'
rm -r latest.tar.bz2 /usr/local/www/nextcloud-bak


3) Click on the update button in the GUI. I don't know why but this doesn't work. Nothing happens when I click on it and I'm not sure why.

What does everyone use to update Nextcloud? Is there another option I've not listed? What do you need to do to get #3 working?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
I've been using #1 to update my Nextcloud install for while without issue. The GUI updater never worked for me either but this way does.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I've been using #1 to update my Nextcloud install for while without issue. The GUI updater never worked for me either but this way does.
Method #1 is what I used for the last update and it worked fine for me as well. I find it strange that the GUI doesn't work. I did find something that indicated you had to put the URL of the Nextcloud update server in the config.php but I can't find the link again. Glad to know your use #1 as well. Thanks.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
I was using #2 to keep my version of ownCloud updated, but having switched across to Nextcloud (when I rebuilt the iocage jail) I tried the WUI updater from 13.0.2 to 13.0.4 and it worked perfectly!
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I was using #2 to keep my version of ownCloud updated, but having switched across to Nextcloud (when I rebuilt the iocage jail) I tried the WUI updater from 13.0.2 to 13.0.4 and it worked perfectly!
Would you mind sharing a redacted version of your config.php
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Pretty standard stuff I think?

Code:
<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
	0 => 'JAIL_IP',
	1 => 'nextcloud.domain.com',
  ),
  'trusted_proxies' =>
  array (
	0 => 'PROXY_IP',
  ),
  'datadirectory' => '/mnt/files',
  'overwrite.cli.url' => 'https://nextcloud.domain.com',
  'dbtype' => 'mysql',
  'version' => '13.0.4.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'user',
  'dbpassword' => 'pass',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
	'host' => 'localhost',
	'port' => 6379,
  ),
  'loglevel' => 2,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'xxx',
  'mail_domain' => 'domain.com',
  'mail_smtphost' => 'mail.domain.com',
  'mail_smtpport' => '26',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xxx@domain.com',
  'mail_smtppassword' => 'xxx',
  'maintenance' => false,
  'enable_previews' => true,
  'theme' => '',
);
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Pretty standard stuff I think?

Code:
<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
	0 => 'JAIL_IP',
	1 => 'nextcloud.domain.com',
  ),
  'trusted_proxies' =>
  array (
	0 => 'PROXY_IP',
  ),
  'datadirectory' => '/mnt/files',
  'overwrite.cli.url' => 'https://nextcloud.domain.com',
  'dbtype' => 'mysql',
  'version' => '13.0.4.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'user',
  'dbpassword' => 'pass',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
	'host' => 'localhost',
	'port' => 6379,
  ),
  'loglevel' => 2,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'xxx',
  'mail_domain' => 'domain.com',
  'mail_smtphost' => 'mail.domain.com',
  'mail_smtpport' => '26',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xxx@domain.com',
  'mail_smtppassword' => 'xxx',
  'maintenance' => false,
  'enable_previews' => true,
  'theme' => '',
);
I agree. Look like it will remain a mystery. At least I know there is nothing missing from the config.php. Thanks.
 

cygnus

Explorer
Joined
Mar 20, 2012
Messages
73
Hi all, Sorry if been asked before, but does this work for plugin installed versions also?
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Hi all, Sorry if been asked before, but does this work for plugin installed versions also?
Option one - that is my choice works for nextcloud installed in a standard iocage jail. I've not used plugins for a while but I believe you have to wait for the plugin maintainer to update the plugin. There will be an update button in the GUI. One of the advantages to using the iocage jail is you can update when nextcloud has one available instead of waiting for the plugin maintainer.
 

DD4711

Contributor
Joined
Nov 19, 2018
Messages
102
This is what I ask myself, too. I updated nextcloud once via add on button and last time via method 3.

Currently I am not able to update it via method 3 from 17 to 17.0.1 because I get this error:
"Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the documentation."
These two files are affected:
- settings/js/vue-7.js.map
- settings/js/vue-7.js

Because of this is a plugin it should be updated by the FreeNAS GUI. But currently I dare to update it this way...
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
Just put it in maintenance mode and do a proper backup, and take the adequate snapshots. Then try solve the update issue using the documentation. If it fails you can either roll back snapshots or do a full rehost from backups. Alternatively you do a complete mirror instance by cloning the jail and any other resources needed and try the update there.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
I've switched to using the Nextcloud package and updating couldn't be easier. pkg upgrade
 

hayro

Cadet
Joined
Feb 24, 2021
Messages
4
Pretty standard stuff I think?

Code:
<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'JAIL_IP',
    1 => 'nextcloud.domain.com',
  ),
  'trusted_proxies' =>
  array (
    0 => 'PROXY_IP',
  ),
  'datadirectory' => '/mnt/files',
  'overwrite.cli.url' => 'https://nextcloud.domain.com',
  'dbtype' => 'mysql',
  'version' => '13.0.4.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'usuario',
  'dbpassword' => 'contraseña',
  'instalado' => verdadero,
  'memcache.local' => '\\ OC \\ Memcache \\ APCu',
  'memcache.locking' => '\\ OC \\ Memcache \\ Redis',
  'memcache.distributed' => '\\ OC \\ Memcache \\ Redis',
  'redis' =>
  matriz
    'host' => 'localhost',
    'puerto' => 6379,
  ),
  'loglevel' => 2,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'xxx',
  'mail_domain' => 'dominio.com',
  'mail_smtphost' => 'mail.domain.com',
  'mail_smtpport' => '26',
  'mail_smtpauthtype' => 'INICIAR SESIÓN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xxx@domain.com',
  'mail_smtppassword' => 'xxx',
  'mantenimiento' => falso,
  'enable_previews' => verdadero,
  'tema' => '',
);[/CÓDIGO]
[/CITA]
C
 
Top