Bugreport: Installed PI-Hole + nextcloud -> nextcloud missing https

Hello DietPi-Team,

after installing PI-Hole, Unbound and nextcloud on a fresh dietpi-Installation, nextcloud does not support https. It is barely unusable, e. g. you cant even create a user.

  • DietPi version | v 9.8.0

  • Distro version | bookworm 0

  • Kernel version | 6.1.21-v8+ #1642l`

  • Architecture | arm64

  • SBC model | RPi4

  • Power supply used | 5.1V 2.5A

  • SD card used | USB Stick 64 GB

  • Software title | (PI-Hole, Unbound, Nextcloud)

  • Was the software title installed freshly or updated/migrated? freshly

  • Can this issue be replicated on a fresh installation of DietPi? yes

  • Bug report ID | 8660

Steps to reproduce

  • Image “DietPi_Rpi-ARMv8-Bookworm.img.xz” copied to USB Stick
  • Booting RPi4 with it
  • Changed some localisation settings
  • changed from openbear to openssh
  • created user wol, added groups dietpi and sudo
  • with this user installed via dietpi-software: PI-Hole and Unbound, with Apache
  • → PI-Hole GUI runs under h t t p://myip/admin
  • reboot
  • also with user wol installed vie dietpi-software: nextcloud
  • → nexcloud can be opened under h t t p://myip/nextcloud
  • → nexcloud can NOT be opened under h t t p s://myip/nextcloud

Expected behaviour

  • nexcloud should run with h t t p s://

Actual behaviour

Extra details

I got this problem on an other installation. After some changes (honestly i dont know all i have done) i got the file default-ssl.config in /etc/apache2/sites-enabled.
Aufter changing Document Root in this file to /var/www it worked!

I did reproduce this problem on a fresh installation. But I dont get the file /etc/apache2/sites-enabled/default-ssl.conf.

Thank you for DietPi!

Best greetings
Stefan

You would need to create SSL certificate using dietpi-letsencrypt. This will enabled all configuration within Apache automatically.

Thanks, I also did that on my other installation.

I ran dietpi-letsencrypt with a dummydomain (fritz.box) because i dont have a real one.

But after running i dont find the ssl-conf-file in …sites-enabled.

That’s not how SSL certificates are working. Our tool is trying to create a real one. For this you would need an own DDNS. If you don’t have a DDNS, you would need to create an own certificate manually yourself. But what is the benefit to have SSL if you don’t plan to access from external?

You should have seen an error about the certificate not being created.

Yes I saw an erorr.

Why i want to use nextcloud with https?

Nextcloud gives a red warning using http:

Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead. Without it some important web functionality like "copy to clipboard" or "service workers" will not work! For more details see the [documentation ↗](https://docs.nextcloud.com/server/30/go.php?to=admin-security).

Otherwise, since https is enabled, it is not possible anymore to log in with http. Even if entering correct user and password, the login does not work. Instead i get the message (tranlated from german):
This connection is not secure. Entered data could get in wrong hands.

Besides, of course it can make sense to encrypt traffic inside a lan. Not everyone is allowed to see all from everyone.

As already said, you need to generate an own self signed certificate yourself. Otherwise HTTPS is not working.

But which domain to use if i dont onw any?

That’s up to you. Can be everything. As you have Pihole instead, you can create a local DNS record. Whatever you do, your certificate will be self signed and most modern browser/apps will complain about it.

Thank you for this information.
Now I remember I had to generate this “snakeoil”-certificate.

I did

sudo make-ssl-cert generate-default-snakeoil --force-overwrite

but this seems not to be enough.

While my prodtive installation has no problem, this is no problem for me.
I wanted ro reproduce this issue to report it to you.

Are you interested in this issue anyway:
https runs and nextcloud doesnt come up.

If you want to figure out, please tell me how to go on. If this is no bug in your sight then all is done.

Thank you and greetings

No, this is not a bug. You have probably done something wrong with the configuration. Have you already included the SSL certificates in the Apache configuration?

Did you already checked logs?

journalctl -u apache2