Letsencrypt Einrichtung

Hallo,

ich habe Probleme meine Nextcloud mit Letsencrypt einzurichten.
Ich bin ziemlich unerfahren auf dem Linux/Ubuntu Gebiet und habe mir deshalb eine fertige VM ( https://www.hanssonit.se/nextcloud-vm/) mit Nextcloud besorgt und nutze diese als Grundlage.

Läuft soweit auch alles super, aber nun möchte ich ein Zertifikat einrichten, damit ich von Extern keine Warnung mehr bekomme wenn ich meine Nextcloud über meine Domain aufrufen möchte.

In diversen Anleitungen steht dazu, dass ich mit “sudo nextcloud.enable-https lets-encrypt” weiter kommen soll. Allerdings erscheint bei mir dann nur die Meldung “Command not found”.

Wie gesagt hab ich keine Ahnung in diesem Gebiet und komme an dieser Stelle nicht weiter.

[/details]

Nextcloud version 17.0.0
Operating system: Ubuntu 18.04
Apache: 2.4.29

Gruß,
OLiver

Das ist der Nachteil, wenn man vorkonfigurierte Pakete installiert. Man weiß nicht, welche Werkzeuge wirklich zur Verfügung stehen.

Der Befehl scheint zu dem Paket nextcloud-snap zu gehören:


Ist das denn installiert?

Hast du das gelesen:

Hey,

ja das hab ich gesehen. Ich dachte aber das mit diesem Snap NExtcloud installiert wird und wollte meine aktuelle installation nicht Schrotten bzw überbügeln. Hab dann aber aus verzweiflung den Snap doch mal installiert und danach funktionierte der Befehl auch.

Leider bekomme ich nun beim Aktivieren des Zertifikats eine Fehlermeldung:

404 Not Found

Not Found

<p"

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.

Nun hänge ich hier. Ich komme über meine Domai über Port 80 sowie 443 auf meine Nextcloud, daher ist der DNS und Portforwarding richtig eingestellt. Ich weiß nicht was mein Problem ist.

Vielleicht sollte ich doch nochmal von vorne anfangen und einen eigenen Ubuntu Server aufsetzen. Habe das Gefühl das ich mir damit nur Probleme mache.

The .well-known/acme-challenge path is used to verify that the certificate is actually installed on your system. Most likely it resides in /var/www/html/.well-known/acme-challenge/…
Can you check this path exists?
If yes, follow these hints:


and insert the Alias line into your apache virtual host file.

To find a ton of documentation related to this, look for ACME.

Die Idee, einen eigenen Server aufzusetzen, ist auf jeden Fall gut. Wenn das System ein reiner Server ohne GUI ist, kannst du gleich Debian nehmen. Grundsolide, immer aktuell.

Habs doch noch hinbekommen. Musste einfach einen anderen Befehl verwenden und nicht über das Snap Werkzeug arbeiten. Zertifikat läuft nun.

Danke

Deine Nachrichten werden ja auch von anderen gelesen, die vielleicht ähnliche Probleme haben. Darum wäre es nett, wenn du beschreibst, wie du deine Lösung gefunden hast. “einen anderen Befehl verwenden…”???

Sorry, war etwas in Eile gestern und musste erstmal wieder Nachschauen.

Mit:

apt-get install python-certbot-apache

und dann

certbot --apache - m mail@mail.com -d cloud…domain.com

So hat es bei mir dann geklappt :slight_smile:

1 Like

Hi,

I didn’t translate the complete thread, but to activate SSL you need to open ports in your router. Otherwise Let’s Encrypt won’t be able to talk with the certificate servers. That’s no “feature” or “bug” of the VM, that’s just how SSL works.

The SSL setup is automated, but you need to do two things for it to work:

  1. Buy a domain and set an A-record towards your servers external IP
  2. Open port 80 and 443 in your router/firewall NATed to your servers internal LAN adress in your network.

No manual configuration other than that is needed.

Hope it helps!

Hey, ich habe das ganze gerade auch mit dem Certbot versucht, doch sobald ich

certbot --apache - m mail@mail.com -d cloud…domain.com

ausführe gibt er mir diesen Error:

Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.

AH00526: Syntax error on line 1 of /etc/apache2/sites-enabled/default-ssl.conf:
DocumentRoot '/var/www/html/nextcloud' is not a directory, or is not readable

Was kann ich da tun?

Hey, please use the activate-tls script:
run sudo /var/scripts/bash menu.sh -> Server Configuration -> Activate TLS

When I run sudo bash menu.sh it comes bash: menu.sh: Nu such file or directory

Sry, I meant sudo bash /var/scripts/menu.sh

He says the same: bash: /var/scripts/menu.sh: No such file or directory

@enoch85 ? :arrow_heading_up:

Is there a menu.sh file in the/var/scripts directory? if not, there should be update.sh. Try that instead.

There is no script folder

Are you sure that you are using the Nextcloud VM? This thread is about the VM from Nextcloud VM – T&M Hansson IT AB . If not I would suggest you open a new topic and provide some more information about your system and your Nextcloud installation. The error message says, there is a Syntax Error on line 1 of your default-ssl.conf. It cannot find or read the DocumentRoot at /var/www/html/nextcloud

1 Like