Problem when enabling HTTPS on a local Nextcloud installation

#1

Hello !

I tried to install the latest version of Nextcloud on a tiny server. I encounter an issue because of IPv6.

I asked some help on the ubuntu snap project repository, you can review the issue here : https://github.com/nextcloud/nextcloud-snap/issues/1229

Since I’m the only user encountering this issue, maybe it’s related to some specific Scaleway environment configuration…

Does anyone already installed Nextcloud with HTTP successfully on a scaleway instance ?

#2

Hello,

There is no known issue with the installation of Nextcloud on Scaleway instances. You may check this tutorial:

If you want to use your Nextcloud instance with IPv6 and HTTPS, you should make sure to create an AAAA record for your domain name, pointing to the IPv6 of the instance.

Benedikt

#3

Hello !

Thank you for your reply :smile:

I checked the tutorial and found interesting step (regarding trusted_domains) in it but it doesn’t fix my issue… When I run the nextcloud.enable-https command, I got the following error :

An unexpected error occurred:
ConnectionError: HTTPSConnectionPool(host='acme-v02.api.letsencrypt.org', port=443): Max retries exceeded with url: /directory (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7ffb1f050390>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Please see the logfiles in /var/snap/nextcloud/current/certs/certbot/logs for more details. 

It seems that the certbot client can’t reach acme-v02.api.letsencrypt.org domain. When I ping and curl that domain from the server (outside of the snap environment) everything is fine. I tried to destroy the server and recreate a new one but the problem is still here…

#4

Hello,

I just checked your issue and were able to reproduce it with a fresh Ubuntu installation. The issue seems to be caused by a bug in the snap package and you should be able to fix it by installing resolvconf using apt:
apt install resolvconf

After installing the package Nextcloud will be able to resolve the hostname of the Let’s Encrypt server.

#5

Wow thank you for your help ! You save my day :wink:.