# NC docker uses php8.2

**URL:** <https://help.nextcloud.com/t/nc-docker-uses-php8-2/210697>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** docker, php82\
**Created:** [November 25, 2024, 3:27am UTC](https://help.nextcloud.com/t/nc-docker-uses-php8-2/210697 "2024-11-25T03:27:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Minstrel](https://help.nextcloud.com/letter_avatar/minstrel/32/6_449c533f586939b6e5f246632a46421f.png) [@Minstrel](https://help.nextcloud.com/u/Minstrel)\
**Post date:** [November 25, 2024, 3:27am UTC](https://help.nextcloud.com/t/nc-docker-uses-php8-2/210697/1 "2024-11-25T03:27:16Z")

</div>

Maybe I’m not looking in the right spot, but from what I can see the docker hub instance of Nextcloud installs php 8.2,

 ![image](https://help.nextcloud.com/uploads/default/original/3X/1/9/19283fbba68e230cf5a4daf0638f1dea0acd8c87.png)

while Nextcloud recommends version 8.3 on their website ([System requirements — Nextcloud latest Administration Manual latest documentation](https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html))

Am I interpreting this correctly? Why is the earlier version being installed? And is there a way around it, other than building a custom docker compose?

Thanks

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [November 25, 2024, 8:46am UTC](https://help.nextcloud.com/t/nc-docker-uses-php8-2/210697/2 "2024-11-25T08:46:53Z")

</div>

seem there is a problem with imagick and PHP 8.3 [PHP 8.3 for Nextcloud 29 by J0WI · Pull Request #2202 · nextcloud/docker · GitHub](https://github.com/nextcloud/docker/pull/2202) PHP 8.2 is still fully supported what is your motivation to upgrade PHP?

---

<div class="post-metadata">

**Author:** ![ernolf](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ernolf/32/77874_2.png) [@ernolf](https://help.nextcloud.com/u/ernolf)\
**Post date:** [November 25, 2024, 9:16am UTC](https://help.nextcloud.com/t/nc-docker-uses-php8-2/210697/3 "2024-11-25T09:16:32Z")

</div>

> [@Minstrel](#):
>
> And is there a way around it, other than building a custom docker compose?

The problem is, that the imagick module needed to build the image is broken; it throws an error when building in 8.3 and aborts the build process.

Here the discussion about that:

> <https://github.com/Imagick/imagick/issues/640>
>
> The first if condition in \`Imagick.stub.php\` is not closed
> https://github.com/I…magick/imagick/blob/28f27044e435a2b203e32675e942eb8de620ee58/Imagick.stub.php#L5-L8
> 
> This causes a installation error "Unterminated preprocessor conditions" in PHP 8.3
> 
> I'll submit a PR

That is the reason why all those out there creating images based on alpine-fpm are still using php8.2

## All but Nextcloud All-In-One!

Since the bug has already been fixed in HEAD of the master branch on github, but nobody feels compelled to release it in PECL, I have developed a workaround for All-In-One that elegantly circumvents this problem. Therefore, Nextcloud All-In-One is the only Alpine-fpm based project that fully supports php8.3 at present.

Here the PR:

> <https://github.com/nextcloud/all-in-one/pull/5575>
>
> \- bump php to 8.3.13-fpm-alpine3.2
> \- workaround to build php-imagick module
> 
> …Close https://github.com/nextcloud/all-in-one/issues/3890

It consists of two commits, [one of which is the workaround that builds the imagick module on bases of the HEAD of the master branch](https://github.com/nextcloud/all-in-one/pull/5575/commits/aff6aecff688c3033d40072a1235b198e74bffcc).  
Feel free to copy it to build your own image or add a note to the commit in the project so that they can copy my solution.

Here you can see, that @jtr already pointet them to my workaround:

> <https://github.com/nextcloud/docker/pull/2202>
>
> blocked by https://github.com/Imagick/imagick/issues/640

h.t.h.

* * *

Much and good luck,  
ernolf

---

<div class="post-metadata">

**Author:** ![Minstrel](https://help.nextcloud.com/letter_avatar/minstrel/32/6_449c533f586939b6e5f246632a46421f.png) [@Minstrel](https://help.nextcloud.com/u/Minstrel)\
**Post date:** [November 25, 2024, 3:37pm UTC](https://help.nextcloud.com/t/nc-docker-uses-php8-2/210697/4 "2024-11-25T15:37:05Z")

</div>

Thanks for the info. I wasn’t aware of the problem.

I’m currently running Nextcloud on Truenas Core 13.3 with PHP83 (8.3.13) and php83-pecl-imagick-3.7.0\_4. The NC version is 29.0.6, though I was running 30.0.1 up to about a week ago. I had to roll back because of an issue syncing calendars with caldav (issue below).

> [@Issue connecting to Calendar after upgrade to NC30](https://help.nextcloud.com/t/issue-connecting-to-calendar-after-upgrade-to-nc30/207767):
>
> Nextcloud version (eg, 29.0.5): 30.0.1 Operating system and version (eg, Ubuntu 24.04): Freebsd 13 Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.62 PHP version (eg, 8.3): 8.3.12 The issue you are facing: unable to sync calendar with external calendar app (OneCalendar) Is this the first time you’ve seen this error? (Y/N): Y Steps to replicate it: When I link to my Nextcloud account to access the calendar, it appears to link correctly (the correct calendar information appears) …

Everything was installed via package manager with no issues, and I’ve not noticed any problems with the application other than above which I believe is unrelated.

Core is for all intents [EOL](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) and I’m looking at moving to Scale and re-installing my apps on docker. Right now I’m trying to familiarise myself with how docker / docker-compose works and what’s involved in setting up my apps

---

<div class="post-metadata">

**Author:** ![Minstrel](https://help.nextcloud.com/letter_avatar/minstrel/32/6_449c533f586939b6e5f246632a46421f.png) [@Minstrel](https://help.nextcloud.com/u/Minstrel)\
**Post date:** [November 25, 2024, 3:46pm UTC](https://help.nextcloud.com/t/nc-docker-uses-php8-2/210697/5 "2024-11-25T15:46:12Z")

</div>

Good to know about AIO. I had looked at it but I don’t need all the additional apps so was looking at a basic install. I may reconsider when I’m ready to move to Scale if the issue isn’t fixed by then. And hopefully the caldav issue will also be fixed so I can install the latest version. Otherwise, I’ll have to install 29.0.6.

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [February 23, 2025, 3:27am UTC](https://help.nextcloud.com/t/nc-docker-uses-php8-2/210697/6 "2025-02-23T03:27:30Z")

</div>

This topic was automatically closed after 89 days. New replies are no longer allowed.
