# Nextcloud upgrade to 20.0, blank page



## olafz (Oct 10, 2020)

Hi,

I have upgraded the nextcloud package to version 20.0 and get a blank web page after logging in. There are no errors in the logs. Deinstalling and installing again did not help. What went wrong here? And where can I download the previous 19.0.x package file?


----------



## Oclair (Oct 10, 2020)

I tend to be extremely selective which PHP projects found in ports I use to upgrade/update.  Usually I install the Nexcloud port only to load in preqs and then rename the directory and then pkg delete nextcloud and then perform all updates via the built in Nexcloud cli system.

sudo -u www php occ upgrade
as per https://docs.nextcloud.com/server/20/admin_manual/maintenance/manual_upgrade.html

Basically there is simply no way that the FreeBSD Port is going to be as effective and percise as the Nextcloud team is for updating.

Your problem sounds like a simple issue, an app is causing a php error because the port did not check/disable/upgrade apps before upgrading the server.

The dependency issues associated within nextcloud mean for me that I NEVER would use the port to update nextcloud, ONLY install it and load into the system preqs.

Basically You should not ask for Nextcloud support here in the FreeBSD forums but rather here:








						Nextcloud community
					

A place to discuss Nextcloud, get help, and meet other friendly people :)




					help.nextcloud.com
				




I've always resolved my FreeBSD Nextcloud issues on their forums!
Good Luck and Happy Cloud Computing!
OC


----------



## Datapanic (Oct 10, 2020)

You might find out what's happening by enabling some of the debug settings in /usr/local/etc/php.ini, specifically:

```
display_startup_errors = On
```


----------



## olafz (Oct 10, 2020)

Thank you both for your comments! I have checked for PHP errors already, there were none.

Usually I rely on the packages as a trustworthy source of quality software. But of course upstream bugs can appear in packages.

I have checked my browser's developer console and have gotten a bunch of errors like "unexpected character at line 1 in foobar.js".

I think I will remove the package version and install Nextcloud "from scratch" with a fresh database. I am lucky, I am the only user of it.


----------



## monwarez (Oct 10, 2020)

Did you run the `occ upgrade` command ?


----------



## Lamia (Oct 11, 2020)

Check Nextcloud log. 
Edit the config file for Nextcloud changing it from maintenance mode = true to false.
Look up freshports for update info/change log.
If problem persists, try the other upgrade method - pkg vs postmaster.


----------



## olafz (Oct 11, 2020)

monwarez said:


> Did you run the `occ upgrade` command ?


Yes, as usual.


Lamia said:


> Check Nextcloud log. [...]


I will do that tomorrow.


----------



## Oclair (Oct 16, 2020)

monwarez said:


> Did you run the  occ upgrade command ?


But that circumvents the port....  If you use that then please remove the Nextcloud related ports as Nextcloud is now managing maintenance. (Which is why you NEVER use the default /usr/local/www/Nextcloud directory for a live system anyways...  Copy and rename it...)

_Note: It seems to me the only thing I encountered with Nextcloud which are unique to FreeBSD is how it polls system memory in the admin interface, perhaps setting up cron and Nginx but that's it.  Nextcloud is a fairly straight forward PHP project using a database server.  All those aspects should be handled with them and kept away from this forum, so the Nextcloud project benifits from the FreeBSD users interaction with their community._


----------



## monwarez (Oct 16, 2020)

Oclair said:


> But that circumvents the port....  If you use that then please remove the Nextcloud related ports as Nextcloud is now managing maintenance.


This is what the port suggest during major upgrade. And if you just upgrade with pkg you will have to upgrade with the web interface anyways.


> On upgrade:
> After a version migration you should upgrade your nextcloud instance
> using command line:
> 
> ...


----------



## Oclair (Oct 17, 2020)

monwarez said:


> This is what the port suggest during major upgrade. And if you just upgrade with pkg you will have to upgrade with the web interface anyways.



I fail to understand why the port is required after installing the preqs 

Safe practice is learn how to use the project from https://www.nextcloud.com which will maintain and fetch the needed files.

Do not try this, instead understand it
mv /usr/local/www/nextcloud /usr/local/www/nextcloudSAFE && pkg delete nextcloud && mv /usr/local/www/nextcloudSAFE /usr/local/www/nextcloud

now fetching and updating your ports will no longer hose Nextcloud


----------



## Oclair (Oct 17, 2020)

Additionally, I highly suggest *NOT* using the web interface to perform updates, instead *CLI is your friend*
_(Why use CLI?  Nginx/apache times out because the web interface is not dynamic and times out, which is great because if it didn't the web server would be sensitive to DOS attacks)_

Things such as 

```
sudo -u www php occ upgrade
```
and

```
sudo -u www php updater/updater.phar --no-interaction
```

are invaluable



			Table of contents — Nextcloud latest Administration Manual latest documentation


----------



## forquare (Oct 17, 2020)

Oclair said:


> Do not try this, instead understand it
> mv /usr/local/www/nextcloud /usr/local/www/nextcloudSAFE && pkg delete nextcloud && mv /usr/local/www/nextcloudSAFE /usr/local/www/nextcloud



If you do this you will need to mark www/nextcloud's dependencies as non-automatic, as otherwise when you do a `pkg autoremove` to remove unused packages the dependencies will be removed.



Oclair said:


> ```
> sudo -u www php occ upgrade
> ```
> and
> ...



And for anyone that doesn't install security/sudo onto their FreeBSD boxes, this will achieve the same thing: 
	
	



```
su -m www -c "php occ upgrade"
```


----------



## Oclair (Oct 19, 2020)

forquare said:


> If you do this you will need to mark www/nextcloud's dependencies as non-automatic, as otherwise when you do a `pkg autoremove` to remove unused packages the dependencies will be removed.



Php projects which perform their own updates residing in ports is unsupportable in implementation, perhaps the quoted text needs to be added to the Nextcloud port lol


----------



## Oclair (Oct 22, 2020)

Why one should not depend on any (port) package maintainers to update your nextcloud (Thank you to the Nextcloud port author for making loading in preqs so simple and easy!)





_View: https://www.youtube.com/watch?v=mh9elFRHAQ8_


----------

