Nextcloud won't install

londreshomme

Cadet
Joined
Dec 30, 2021
Messages
2
Thanks very much!

I just tried this morning as well and I now have Nextcloud running (I just have to learn how to use it now)....

Your instructions were great. Even though it's pretty obvious it would be good to add a line that says to "Click INSTALL button"

I just replaced php74 occurrences with php80 and saved the file like you said and then I was able to install Nextcloud after that. Sweet...

For those that are not familiar with how to use the "vi" editor... there is an easier editor called "nano" but it would have to be installed. It's probably not worth the effort to install nano. Just use vi and when you need to save your changes you make sure you are in command mode by hitting the ESC key and then type ":wq" to save (write) and quit the vi editor. If you screw things up you can exit without saving by doing ":q!"

Thanks to jimK6 for the research and instructions. Should be very useful to quite a few of us.

Enjoy!


Thanks for mentioning this @WolfpactVI. You were on the right track for sure.

Root cause
The FreeBSD package maintainers removed the *php74* dependencies...(I did not go further to figure out why...).
The iXsystems nextcloud plugin reference to the FreeBSD manifest is here: https://github.com/freenas/iocage-ix-plugins/blob/master/nextcloud.json#L25
Manifest contents are located here: https://pkg.freebsd.org/FreeBSD:12:amd64/latest/packagesite.txz

If you extract the packagesite.txz file, and search for the missing packages that came out in the dialog box (see screenshots earlier in this thread) then you'll notice they do not exist. But if you search for 'php73' or 'php80', they still do.

Short term workaround (tested working on my machine, check yours pls?)
  1. On your TrueNAS host,
    Code:
    # Search for where the plugin git repo default location is on your TrueNAS host
    find / -name "nextcloud.json" # i.e. /path/to/iocage/.plugins/github_com_freenas_iocage-ix-plugins_git/nextcloud.json
    
    # Go to that path...
    cd /path/to/iocage/.plugins/github_com_freenas_iocage-ix-plugins_git/
    
    # make a backup of the file just in case... :-)
    cp nextcloud.json nextcloud.json.bak
    
    # Using your editor, edit the file and change all the *php-74* packages to *php80*. Then save and exit the editor.
    vi nextcloud.json
    
    "nextcloud-php74" --> "nextcloud-php80"
    "php74-pecl..." --> "php80-pecl"
    "php74..." ---> "php80..."
    ... and so on...
    # ...
  2. Then, go to https://your.truenas.server.here/ui/plugins, click "Refresh Index". The "Version 23.0.0" shows up again as it should!
    View attachment 51948
  3. Done. Hope you learned a little bit too, I know I did.
    View attachment 51949
The good news about this workaround is that it's not permanent (nor should it be). It should technically be overwritten once this fix has been merged to the correct branch, which for "TrueNAS-12.0-U7" the plugin release branch is https://github.com/freenas/iocage-ix-plugins/blob/12.2-RELEASE/nextcloud.json

Long term fix
It looks like the engineers that maintain the plugin recently also noticed that FreeBSD pulled the *php74* repositories from the manifest and patched the nextcloud.json file to use *php80* instead, which is on the FreeBSD manifest.
Here is the diff of the fix: https://github.com/freenas/iocage-i...06905d849f98a410b2c693f485fe2b0d77?diff=split
( Thank you @sonicaj ! )

It's still in the 'Master' branch though, I am not sure when it will get merged into the '12.2-RELEASE' branch...

So, my last question is, how does this patch make it to all of our TrueNAS appliances from this point now? Does a TrueNAS os update force a 'git pull' on the host to pull the latest repo with this fix locally? Should we run a 'git pull' manually on the TrueNAS host shell once it's in the correct branch?

P.S. For those worried about *php80* being supported by nextcloud, it is. See https://docs.nextcloud.com/server/l...on.html#prerequisites-for-manual-installation.
 

ere109

Contributor
Joined
Aug 22, 2017
Messages
190
I just installed successfully through the plugin system last night.
 

maxx

Cadet
Joined
Jan 31, 2016
Messages
8
Performed the corrections for "/mnt/<YOUR VOLUME>/iocage/.plugins/github_com_freenas_iocage-ix-plugins_git/nextcloud.json" and the install completes OK (same as jjmK6).

Although for reasons unknown (and after the Index refresh step) I still show Version as "N/A" and an offer to Update the plugin (which i'm politely declining at this time). The Portal does report that this is "Nextcloud Hub II (23.0.0)".

As well while re-syncing I got complaints of "413 Request Entity Too Large". Somehow, as indicated in the Portal at "https://<PORTAL IP>/settings/admin/serverinfo", the "Upload max size" is now 513MB. You'll need to change the following Nextcloud files:
- "upload_max_filesize" in /usr/local/etc/php/php.truenas.ini
- "client_max_body_size" in /usr/local/etc/nginx/conf.d/nextcloud.inc

I set both to 1G. Restart the plugin.
 
Last edited:
  • Like
Reactions: cwi

Lepelot

Dabbler
Joined
Dec 13, 2020
Messages
21
Hello , It looks like this issue is coming back but I couldn't find a more recent post.
I am on TrueNas 13-U5.3 with PHP80.
My last Nextcloud upgrade failed and I reverted back to my previous working version (Release: 13.1-RELEASE-p8).
I am now trying to setup a fresh Nextcloud install but the installation fails (see attached error message).
It looks like it is again a PHP error as Nextcloud now expects PHP8.1.

Should I be installing PHP8.1 ? and in the case how ?

Any assistance from this groop would be welcome.
 

Attachments

  • Capture d’écran 2023-08-01 090357.jpg
    Capture d’écran 2023-08-01 090357.jpg
    17.3 KB · Views: 64
  • Capture d’écran 2023-08-01 091040.jpg
    Capture d’écran 2023-08-01 091040.jpg
    12.9 KB · Views: 77

IndieCoopz

Explorer
Joined
Nov 4, 2022
Messages
50
Don’t use plugins. They are being deprecated and will be removed in the future.
Where did you get this information? I would find it a great pity if TrueNAS Core would no longer offer plugins. Especially when I think about how poorly the plugins are implemented in TN Scale, that would be a loss.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I would find it a great pity if TrueNAS Core would no longer offer plugins
Jails will continue to work so you can install your own software to your liking. Predefined and poorly maintained plugins are going away.
 
Last edited:

victort

Guru
Joined
Dec 31, 2021
Messages
973
If you don't want to migrate to SCALE, you can install the software in a manual jail, as mentioned above. I do this, and then create script for easy installing in the future.

Some services don't need scripts. For example, I recently installed MeshCentral in a jail. A nightmare to figure out on SCALE, but on CORE it was as simple as
Code:
pkg install npm
npm install meshcentral
node /node_modules/meshcentral


I then created a rc.d script that will run the node command on startup.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Where did you get this information?
In addition to the link garm posted, see also:
I would find it a great pity if TrueNAS Core would no longer offer plugins.
Plugins in CORE, and in FreeNAS before it, have always sucked.
how poorly the plugins are implemented in TN Scale
The very first implementation of Apps in SCALE was vastly superior to the best the plugins have ever been.
 

CedricKra

Cadet
Joined
Jan 27, 2024
Messages
2
Thanks for mentioning this @WolfpactVI. You were on the right track for sure.

Root cause
The FreeBSD package maintainers removed the *php74* dependencies...(I did not go further to figure out why...).
The iXsystems nextcloud plugin reference to the FreeBSD manifest is here: https://github.com/freenas/iocage-ix-plugins/blob/master/nextcloud.json#L25
Manifest contents are located here: https://pkg.freebsd.org/FreeBSD:12:amd64/latest/packagesite.txz

If you extract the packagesite.txz file, and search for the missing packages that came out in the dialog box (see screenshots earlier in this thread) then you'll notice they do not exist. But if you search for 'php73' or 'php80', they still do.

Short term workaround (tested working on my machine, check yours pls?)
  1. On your TrueNAS host,
    Code:
    # Search for where the plugin git repo default location is on your TrueNAS host
    find / -name "nextcloud.json" # i.e. /path/to/iocage/.plugins/github_com_freenas_iocage-ix-plugins_git/nextcloud.json
    
    # Go to that path...
    cd /path/to/iocage/.plugins/github_com_freenas_iocage-ix-plugins_git/
    
    # make a backup of the file just in case... :-)
    cp nextcloud.json nextcloud.json.bak
    
    # Using your editor, edit the file and change all the *php-74* packages to *php80*. Then save and exit the editor.
    vi nextcloud.json
    
    "nextcloud-php74" --> "nextcloud-php80"
    "php74-pecl..." --> "php80-pecl"
    "php74..." ---> "php80..."
    ... and so on...
    # ...
  2. Then, go to https://your.truenas.server.here/ui/plugins, click "Refresh Index". The "Version 23.0.0" shows up again as it should!
    View attachment 51948
  3. Done. Hope you learned a little bit too, I know I did.
    View attachment 51949
The good news about this workaround is that it's not permanent (nor should it be). It should technically be overwritten once this fix has been merged to the correct branch, which for "TrueNAS-12.0-U7" the plugin release branch is https://github.com/freenas/iocage-ix-plugins/blob/12.2-RELEASE/nextcloud.json

Long term fix
It looks like the engineers that maintain the plugin recently also noticed that FreeBSD pulled the *php74* repositories from the manifest and patched the nextcloud.json file to use *php80* instead, which is on the FreeBSD manifest.
Here is the diff of the fix: https://github.com/freenas/iocage-i...06905d849f98a410b2c693f485fe2b0d77?diff=split
( Thank you @sonicaj ! )

It's still in the 'Master' branch though, I am not sure when it will get merged into the '12.2-RELEASE' branch...

So, my last question is, how does this patch make it to all of our TrueNAS appliances from this point now? Does a TrueNAS os update force a 'git pull' on the host to pull the latest repo with this fix locally? Should we run a 'git pull' manually on the TrueNAS host shell once it's in the correct branch?

P.S. For those worried about *php80* being supported by nextcloud, it is. See https://docs.nextcloud.com/server/l...on.html#prerequisites-for-manual-installation.
Hello, I`m very new to Free NAS therefore my question hopefully dosent seem too stupid. Where do I need to insert this code to make nextcloud work? I wasn`t able to figure it out by myself. I would greatly appreciate any help.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
The post you are referring to is from 2022 and therefore completely irrelevant today. None of the mentioned software versions is supported, anymore.

What you need to do to get Nextcloud running on your TrueNAS CORE system is to use the excellent script provided by @danb35 which will take care of everything.

See: https://github.com/danb35/freenas-iocage-nextcloud
 
Top