How to use the helper to install PHP 7.2 for Nextcloud?

Hello Community.

I am using the latest YunoHost Version and have access via SSH and Webpanel.

I tried to find some help in the forum already. In this thread, I found out, that there is the experimental helper ynh_install_php (link here).

How do I use this helper, how can I get access to the command ynh_install_php --phpversion=7.2 for example? And is it all needed to get Nextcloud to use PHP 7.2?

I cant find any tutorial that shows how to use those helpers.

Thank you,

Those helpers are meant to be used by application packagers during the app install, you can’t really use them manually if you don’t know what you’re doing…

But more generally, installing multiple versions of php is not really recommeded in yunohost so far. Do you have a good reason to be willing to use PHP7.2 ?

1 Like

Well I dont need it in general, but for some Apps and Frameworks, I need at least 7.1. The latest Laravel for example.

Is there any workaround to get single Apps to use another PHP Version than 7.0?

Already talked about… There are a lot of reasons to change to PHP 7.2.
Grav asks it and is present in the repositories of YNH.
Typo 3 (newer version) can also be installed only with new PHP 7.2.
I don’t understand why nobody wants to explain how to do…

The question was adressed to the author of the original topic.

And the Grav app does install and use PHP 7.3, yes, but here we’re talking about Nextcloud, which does require it.

So that just move the question to "do you really need the top notch newer version.

Because to explain it, we’d need to do a full lecture on server administration, nginx configuration and php services and so on. We are volunteer and already spend quite a lot of time doing support for actual bugs or people discovering the project and who need help to setup their server. We provide apps which install stuff working out of the box. The point of the Yunohost project is not to provide free lessons on system administration … And when we do, it means that we ain’t working on improving the project as a whole for everybody.

If you do already know system administration, then you will find that there are thousands of tutorial on how to install whichever php version you like. But then you are on your own to integrate this in a way that does not break you server’s ecosystem.


I mostly use my VPS where Yunohost is installed for hobby activity. Setting up Servers and such. It is because I am interested in Server Managment and for most Web Development. Dont get me wrong, my Server Admin Knowledge is about between “Beginner” and “Advanced”. I should get it done to make an App use another PHP Version.

But as Aleks says

. But then you are on your own to integrate this in a way that does not break you server’s ecosystem.

I first of all wanted to know, if there is any Yunohost-Way to do this, so nothing gets broken.

For now, I think I will go back to another Web Host Panel, which supports it, but I am very interested in the way that Yunohost works. Its nice to install and to use, so very comfortable. I will follow the Projectdevelopment to see, if someday, multiple PHP Versions are supported out of the box.

Thank you for your time anyway :slight_smile:

1 Like

If so, why Grav isn’t updating to the last version because of the fact, it request PHP 7.2…

Ah yes my bad, the current master version of the app still rely on php7.0. Some PRs are pending and need some love. And there’s a php7.3 version in there


Still same issue :

Grav update failed

Grav has increased the minimum PHP requirement.
You are currently running PHP 7.0.33-10+0~20190807.18+debian9~1.gbp5452d8 , but PHP 7.1.3 is required.

Sorry, there is just an issue on github ; think about changing the URL into =>

sudo yunohost app install

This is going off topic. Closing.