Nextcloud Integration umter Dietpi 9..+

Unter dem Installer von dietpi ist es ja leicht Nextcloud zu installieren. Leider ist diese Installation anschließend fehlerhaft. Ich hatte als Webserver den apache2 ausgewählt. Nun fehlen aber noch einige PHP-Module und dietpi verwendet noch PHP 8.2.
Ich kann auch die datei php.ini nirgends finden. Und die Konfiguration von apache2 müsste auch noch angepasst werden. Wo ändere ich die Werte z. B. für einen Virtualhost?

Es wäre nettt, wenn mir jemand bei der Konfiguration helfen könnte und die ganzen Fehlermeldungen behebt.
Vielleicht muss ja auch der Install Script überarbeitet werden?

Viele Grüße
SvenK


ADMIN EDIT

English translation:

It is easy to install Nextcloud using the installer from dietpi. Unfortunately, this installation is then faulty. I had selected apache2 as the web server. But now some PHP modules are missing and dietpi still uses PHP 8.2.
I can’t find the php.ini file anywhere. And the configuration of apache2 would also have to be adjusted. Where do I change the values e.g. for a virtualhost?

It would be nice if someone could help me with the configuration and fix all the error messages.
Perhaps the install script also needs to be revised?

Best regards
SvenK

As we are an international community, I would like ask you using English language. There are some good online tool like DeepL who could help translating stuff. For now I translate your post manually.

I guess you mean there are some warnings within NC admin cockpit? This is expected.

Yes, because we don’t install each and every PHP module. Not all of them are needed for all users. You are free to install them manually if required.

Well PHP8.2 is the Debian default. We install PHP from Debian package repository and don’t use a 3rd party one

Similar to other Debian based systems. Did you checked location /etc/apache2/?
To enable HTTPS, i recommend using our tooling.

The default ini file (for fpm) is at

 /etc/php/8.2/fpm/php.ini

, the drop-in configs are in /etc/php/8.2/fpm/conf.d/ (There is a file especially for nextcloud: 98-dietpi-nextcloud.ini.

If you want to change php settings for the CLI, then you have to look in /etc/php/8.2/fpm/.

But nextcloud also allows to define it’s own rules, without the need to change the php ini files. In your nextcloud directory (/var/www/nextcloud by default) is a file .user.ini where you can also make changes and add settings you want.
There is also another way: You can directly modify the config.php inside /nextcloud/config, see https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html

But I recommend to create a new drop-in config in /etc/php/8.2/fpm/conf.d/, so if an update of dietpi or nextcloud override these files, your created file with your settings will not be touched.

1 Like

First of all, thank you very much for your answers. Unfortunately, I don’t have a file with user.ini in the /var/www/nextcloud directory. Somewhere else in another directory.
Furthermore, the problem with the missing PHP modules still exists. I tried to install them, but got the message that these packages could not be found.
And where can I set that the server should only respond to https?

It’s .user.ini(with a leading period) so it’s a hidden file. You can check with

ls -la /var/www/nextcloud

What modules do you wanna try to install and how did you try to install them?

Did you already generate a certificate? As far as I can remember, I generated my before installing nextcloud, and after installing nextcloud it just worked ootb. But I also don’t use apache.

The nextcloud docs describe how you can do it with apache:
https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#enabling-ssl

Simply use out tool to generate SSL certificates and to force redirect from port 80 to 443 Software Installation - DietPi.com Docs
Our script will take care on everything

Thanks for your answer.
Among other things, the PHP module “imagick” is missing. I tried to install it in the console with apt install. But then I got the message that this package could not be found.
Yes, I already had a certificate for my domain. The Nginx Poxy Manager is connected in front of the Nextcloud and requests the certificates. And the connection is encrypted, but Nextcloud ignores this. But this is certainly a Nextcloud problem. Dietpi has nothing to do with that.
However, the missing PHP modules are really annoying.

You are connected to your NC instance locally via IP address or using domain name?

Yes, I registered a domain and forward it to my DDNS address. And Nginx then distributes the requests accordingly. This works so far.

Probably wrong package name?

root@RPi4:~# apt-cache search php-imagick
php-imagick - Provides a wrapper to the ImageMagick library
php8.2-imagick - Provides a wrapper to the ImageMagick library

But do you have the warning messages in NC while using your DDNS domain?

Are you using NPM for NC only or for other services as well?

~# apt-cache search php-imagick
php-imagick - Provides a wrapper to the ImageMagick library
php8.2-imagick - Provides a wrapper to the ImageMagick library
php-imagick - Provides a wrapper to the ImageMagick library
php-imagick-all-dev - Provides a wrapper to the ImageMagick library
php8.2-imagick - Provides a wrapper to the ImageMagick library
-bash: php-imagick: command not found
-bash: php8.2-imagick: command not found

Yes, the warning message also appears when I access my domain via https. Although no certificate truth message appears at the top of the browser address bar. But NC also displays the warning that some headers are not configured correctly.
The Nginx distributes another request to my NAs. But everything works there.

Did you enabled force SSL within NPM domain configuration?

apt install php8.2-imagick

No, that didn’t help either. I entered the following:

root@nextcloud:~# apt install php8.2-imagic
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package php8.2-imagic
E: Couldn't find any package by glob 'php8.2-imagic'
The packages were not found and therefore not installed.

Pls can you share some more information on your system

for i in /etc/apt/sources.list{,.d/*.list}; do echo "$i:"; cat "$i"; done

#### Required 

- DietPi version | `cat /boot/dietpi/.version`
- Distro version | `echo $G_DISTRO_NAME $G_RASPBIAN`
- Kernel version | `uname -a`
- Architecture | `dpkg --print-architecture`
- SBC model | `echo $G_HW_MODEL_NAME` or (EG: RPi3)

You’re missing the k, it’s php8.2-imagick.

1 Like

I received a lot of links to the Update Resources to Debian. Unfortunately, I can’t post this here because it is more than a link.

Putting it in code tag will work around this

[quote=“Joulinar, post:19, topic:22575, full:true”]
Putting it in code tag will work around thi

I received a lot of links to the Update Resources to Debian. Unfortunately, I can’t post this here because it is more than a link.