Updating php version of nextcloud jail manually from 8.0 to 8.1

Azsumbre13

Dabbler
Joined
Jul 3, 2023
Messages
31
Hi , I am new to TrueNas and Nextcloud as a whole.
I have installed nextcloud from the official plug in as at the moment dans script (https://github.com/danb35/freenas-iocage-nextcloud) has an issue when trying to install it.
But was succesful with the nextcloud plug in , but i get an error when checking the security warnings:
There are some warnings regarding your setup.
Can someone help with some kind of a little guide how to make the update manually?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Please save your data and reinstall in a standard jail. If @danb35's script does not work for you, please come back for help. In a standard jail it is as simple as pkg install nextcloud-php82. This will deinstall your old version and reinstall with all packages updated to PHP 8.2 instead. The plugin unfortunately does not provide a concept for reliable updates.

P.S. PHP 8.1 is EOL end of this year. Better go to 8.2 or 8.3 right away.
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
Also please share what errors you are getting with the script install. I have used it many many times without issue. And when I did encounter an issue, we (the community) generally are quick to fix it because that script is the ultimate way of installing nextcloud on TrueNAS Core.
 

Azsumbre13

Dabbler
Joined
Jul 3, 2023
Messages
31
Also please share what errors you are getting with the script install. I have used it many many times without issue. And when I did encounter an issue, we (the community) generally are quick to fix it because that script is the ultimate way of installing nextcloud on TrueNAS Core.

Here is the issue I have opened
 

Azsumbre13

Dabbler
Joined
Jul 3, 2023
Messages
31
FYI update php to 8.2 even with the official plug in by running pkg install nextcloud-php82 , but needed to add pkg install php82-pecl-imagick-3.7.0_2 php82-pecl-redis-5.3.7_1 as they were missing. Only thing to keep in mind is the nextcloud to be at 27.0.1 , but not at 27.0.2 as it will run internal server errors. The solution is to change the config.php Nextcloud version to 27.0.1 and then update again
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

Azsumbre13

Dabbler
Joined
Jul 3, 2023
Messages
31
Checked the script it works , the only thing maybe is that the :
root@truenas[~]# iocage exec nextcloud /root/remove-staging.sh
2023/08/14 12:43:05.260 INFO using provided configuration {"config_file":"/usr/local/www/Caddyfile", "config_adapter": "caddyfile"}
2023/08/14 12:43:05.261 WARN Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies {"adapter": "caddyfile", "file": "/usr/local/www/Caddyfile", "line": 21}

Gets an error and nextcloud doesnt seem to get a cert.

This is what i used as cert STANDALONE_CERT=1

And both port 80 and 443 were open
 

Azsumbre13

Dabbler
Joined
Jul 3, 2023
Messages
31
OK reinstalled the script and this time to final script worked:

echo $'when you connect. Once you\'ve verified that everything else is working'
when you connect. Once you've verified that everything else is working
+ echo 'correctly, you should issue a trusted certificate. To do this, run:'
correctly, you should issue a trusted certificate. To do this, run:
+ echo ' iocage exec nextcloud /root/remove-staging.sh'
iocage exec nextcloud /root/remove-staging.sh
+ echo ''


Script done, output file is nextcloud.log
root@truenas[~/freenas-iocage-nextcloud]# iocage exec nextcloud /root/remove-staging.sh
2023/08/14 13:48:30.242 INFO using provided configuration {"config_file":"/usr/local/www/Caddyfile", "config_adapter": "caddyfile"}


But still the cloud domain i show as not secure.

Can someone help any idea ,as I am not sure really what to do
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
If you go to your domain, and click the lock icon>certificate info, what does it show as the certificate and issuer?

Sometimes the browser cache keeps the old certificate.

Also, what happens when you access the domain on another device?
 

Azsumbre13

Dabbler
Joined
Jul 3, 2023
Messages
31
Ok so accessing the domain from another device has the same issue ,
I get everywhere :
The certificate for this site is not valid.
 

Azsumbre13

Dabbler
Joined
Jul 3, 2023
Messages
31
Ok so accessing the domain from another device has the same issue ,
I get everywhere :
The certificate for this site is not valid.
I have deployed the script before and had no issues , the certificate was generated without any issues
 

Azsumbre13

Dabbler
Joined
Jul 3, 2023
Messages
31
But what is the actual cert being used?
So when running the script I used this as default STANDALONE_CERT

When I check the cert I get this :
Common Name (CN)
epcloud.duckdns.org
Organization (O)
<Not Part Of Certificate>
Organizational Unit (OU)
<Not Part Of Certificate>

Issued By​

Common Name (CN)
(STAGING) Ersatz Edamame E1
Organization (O)
(STAGING) Let's Encrypt
Organizational Unit (OU)
<Not Part Of Certificate>

Validity Period​

Issued On
Monday, August 14, 2023 at 3:41:39 PM
Expires On
Sunday, November 12, 2023 at 2:41:38 PM

Fingerprints​

SHA-256 Fingerprint
FE 62 9D 8A 14 7D 8D A8 75 9B 16 99 08 66 F7 A3 5F 75 79 C8 8D 5C 10 7D 22 BB 32 22 B5 CF 94 E9
SHA-1 Fingerprint
49 DC FB C9 74 6B 03 A3 22 77 47 39 0E AF DA 85 B1 71 09 D9
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
Ok so that is still the staging cert. The remove_staging script must not have run properly.

Can you try going into the jail and running the script from there?
iocage console nextcloud then
./remove-staging.sh
 

Azsumbre13

Dabbler
Joined
Jul 3, 2023
Messages
31
root@truenas[~]# iocage console nextcloud
Last login: Mon Aug 14 16:55:14 on pts/8
FreeBSD 13.1-RELEASE-p7 n245428-4dfb91682c1 TRUENAS

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories: https://www.FreeBSD.org/security/
FreeBSD Handbook: https://www.FreeBSD.org/handbook/
FreeBSD FAQ: https://www.FreeBSD.org/faq/
Questions List: https://www.FreeBSD.org/lists/questions/
FreeBSD Forums: https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with: pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed: freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages: man man
FreeBSD directory layout: man hier

To change this login announcement, see motd(5).
root@nextcloud:~ # ./remove-staging.sh
2023/08/14 14:44:56.018 INFO using provided configuration {"config_file":"/usr/local/www/Caddyfile", "config_adapter": "caddyfile"}
2023/08/14 14:44:56.021 WARN Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies {"adapter": "caddyfile", "file": "/usr/local/www/Caddyfile", "line": 21}


Got the same issue
 
Top