After a lot of time spent bashing my head against the wall, I did manage to make it work.
For anyone stumbling upon this, these are the php packages I had to install
php8-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-cgi-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-cli-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-fastcgi-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-fpm-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-ctype-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-curl-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-dom-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-fileinfo-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-filter-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-gd-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-intl-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-mbstring-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-mysqli-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-mysqlnd-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-opcache-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-openssl-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-pcntl-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-pdo-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-pdo-mysql-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-phar-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-session-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-simplexml-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-xml-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-xmlreader-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-xmlwriter-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-mod-zip-8.4.16-r4 x86_64 {feeds/packages/feeds/packages/lang/php8} (PHP-3.01) [installed]
php8-pecl-imagick-3.8.0_rc2-r1 x86_64 {feeds/packages/feeds/packages/lang/php8-pecl-imagick} (PHP-3.01) [installed]
php8-pecl-redis-6.1.0-r1 x86_64 {feeds/packages/feeds/packages/lang/php8-pecl-redis} (PHP-3.01) [installed]
I am also using mariadb and nginx-full
A couple of things:
.so files are by default installed into /usr/lib/php8 but the php8-fpm is looking for them for some reason in /usr/lib/php
Also, running the php8-fpm init using
/etc/init.d/php8-fpm start
did not work for me, nginx would always tell me nginx No input file specified. Instead, I had to run the binary:
/usr/bin/php8-fpm -F -c /etc/php8-fpm.conf
I will later edit the init script to use that one instead
The next part is where I was stuck for a long time because I would be able to set up an administrator account but after that the page would end up in a loop with absolutely nothing in the logs to show what was causing this.
But after some fiddling and following the nextcloud documentation when setting up the
/etc/nginx/conf.d/nextcloud.conf
I got it working.
The ugly part: app store does not work. This is the error in the log:
cURL error 61: Unrecognized content encoding type (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://garm2.nextcloud.com/api/v1/apps.json
Alas, I do not think this can be fixed because of the way curl for OpenWrt is compiled, it is pretty barebones.
If someone has suggestions, I would gladly hear them but it seems Nextcloud for OpenWrt without a proper container is not a good idea.
Actually I managed to get the AppStore working! You can edit the Fetcher.php and add this:
$options['headers'] = [
'Accept-Encoding' => 'deflate, identity',
];
just after
$options = [
'timeout' => (int)$this->config->getAppValue('settings', 'appstore-timeout', '120')
];
So in conclusion, Nextcloud can definitely run on OpenWrt without a container. Of course, you'd still need a decent amount of memory, storage and CPU resources so I guess it would be fine for x86 users but not so much with other users.