Nextcloud Installation · 8 min read · Nov 26, 2025

So installieren Sie NextCloud auf Debian 10

NextCloud ist ein kostenloser und Open-Source-Dateihosting- und Dateiübertragungsserver, der vom ownCloud-Projekt abgezweigt wurde. Es ist sehr ähnlich zu anderen Dateiübertragungsdiensten wie Google Drive, Dropbox und iCloud. NextCloud ermöglicht es Ihnen, Dateien, Dokumente, Bilder, Filme und Videos von einem zentralen Ort zu speichern. Mit NextCloud können Sie Dateien, Kontakte und andere Medien mit Ihren Freunden und Kunden teilen. NextCloud integriert sich mit E-Mail, Kalender, Kontakten und anderen Funktionen, die Ihren Teams helfen, ihre Arbeit schneller und einfacher zu erledigen. Sie können den NextCloud-Client auf einem Desktop-Computer installieren, um Dateien mit Ihrem Nextcloud-Server zu synchronisieren. Desktop-Clients sind für die meisten Betriebssysteme verfügbar, einschließlich Windows, macOS, FreeBSD und Linux.

In diesem Tutorial erklären wir, wie Sie NextCloud installieren und mit Let’s Encrypt SSL auf Debian 10 sichern.

Voraussetzungen

  • Ein Server, der Debian 10 ausführt.
  • Ein gültiger Domainname, der auf Ihre Server-IP zeigt. In diesem Tutorial verwenden wir die Domain nextcloud.example.com.
  • Ein Root-Passwort ist auf Ihrem Server konfiguriert.

Installieren Sie Apache, MariaDB und PHP

NextCloud läuft auf dem Webserver, ist in PHP geschrieben und verwendet MariaDB zur Speicherung ihrer Daten. Daher müssen Sie Apache, MariaDB, PHP und andere erforderliche Pakete auf Ihrem System installieren. Sie können alle mit dem folgenden Befehl installieren:

apt-get install apache2 libapache2-mod-php mariadb-server php-xml php-cli php-cgi php-mysql php-mbstring php-gd php-curl php-zip wget unzip -y

Sobald alle Pakete installiert sind, öffnen Sie die php.ini-Datei und ändern Sie einige empfohlene Einstellungen:

nano /etc/php/7.3/apache2/php.ini

Ändern Sie die folgenden Einstellungen:

memory_limit = 512M
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 300
date.timezone = Asia/Kolkata

Speichern Sie die Datei und schließen Sie sie, wenn Sie fertig sind. Starten Sie dann den Apache- und den MariaDB-Dienst und aktivieren Sie sie, damit sie nach dem Systemneustart mit dem folgenden Befehl starten:

systemctl start apache2  
systemctl start mariadb  
systemctl enable apache2  
systemctl enable mariadb

Sobald Sie fertig sind, können Sie mit dem nächsten Schritt fortfahren.

Konfigurieren Sie die Datenbank für NextCloud

Als nächstes müssen Sie eine Datenbank und einen Datenbankbenutzer für NextCloud erstellen. Melden Sie sich dazu mit dem folgenden Befehl an der MariaDB-Shell an:

mysql -u root -p

Geben Sie Ihr Root-Passwort ein, wenn Sie dazu aufgefordert werden, und erstellen Sie dann eine Datenbank und einen Benutzer mit dem folgenden Befehl:

MariaDB [(none)]> CREATE DATABASE nextclouddb;  
MariaDB [(none)]> CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'password';

Gewähren Sie als Nächstes alle Berechtigungen für die nextclouddb mit dem folgenden Befehl:

MariaDB [(none)]> GRANT ALL ON nextclouddb.* TO 'nextclouduser'@'localhost';

Als Nächstes leeren Sie die Berechtigungen und verlassen Sie die MariaDB-Shell mit dem folgenden Befehl:

MariaDB [(none)]> FLUSH PRIVILEGES;  
MariaDB [(none)]> EXIT;

Sobald Sie fertig sind, können Sie mit dem nächsten Schritt fortfahren.

NextCloud herunterladen

Zuerst besuchen Sie die NextCloud-Download-Seite und laden die neueste Version von NextCloud auf Ihr System herunter. Zum Zeitpunkt des Schreibens dieses Artikels ist die neueste Version von NextCloud 17.0.1. Sie können sie mit dem folgenden Befehl herunterladen:

wget https://download.nextcloud.com/server/releases/nextcloud-17.0.1.zip

Sobald der Download abgeschlossen ist, entpacken Sie die heruntergeladene Datei mit dem folgenden Befehl:

unzip nextcloud-17.0.1.zip

Verschieben Sie als Nächstes das extrahierte Verzeichnis in das Apache-Webstammverzeichnis:

mv nextcloud /var/www/html/

Geben Sie als Nächstes die richtigen Berechtigungen für das nextcloud-Verzeichnis mit dem folgenden Befehl:

chown -R www-data:www-data /var/www/html/nextcloud/  
chmod -R 755 /var/www/html/nextcloud/

Sobald Sie fertig sind, können Sie mit dem nächsten Schritt fortfahren.

Konfigurieren Sie Apache für NextCloud

Als Nächstes müssen Sie eine Apache-virtuelle Hostkonfigurationsdatei erstellen, um NextCloud bereitzustellen. Sie können sie mit dem folgenden Befehl erstellen:

nano /etc/apache2/sites-available/nextcloud.conf

Fügen Sie die folgenden Zeilen hinzu:


     ServerAdmin [email protected]
     DocumentRoot /var/www/html/nextcloud/
     ServerName nextcloud.example.com

     Alias /nextcloud "/var/www/html/nextcloud/"

     
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
          
            Dav off
          
        SetEnv HOME /var/www/html/nextcloud
        SetEnv HTTP_HOME /var/www/html/nextcloud
     

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

Speichern Sie die Datei und schließen Sie sie, wenn Sie fertig sind. Aktivieren Sie dann die Apache-virtuelle Hostdatei und andere erforderliche Module mit den folgenden Befehlen:

a2ensite nextcloud.conf  
a2enmod rewrite  
a2enmod headers  
a2enmod env  
a2enmod dir  
a2enmod mime

Starten Sie schließlich den Apache-Dienst neu, um die neue Konfiguration anzuwenden:

systemctl restart apache2

Sichern Sie NextCloud mit Let’s Encrypt Free SSL

NextCloud ist jetzt installiert und konfiguriert. Als Nächstes wird empfohlen, es mit Let’s Encrypt Free SSL zu sichern. Installieren Sie dazu zuerst den Certbot-Client mit dem folgenden Befehl:

apt-get install python-certbot-apache -y

Sobald es installiert ist, können Sie den folgenden Befehl ausführen, um das Let’s Encrypt-Zertifikat für Ihre Domain nextcloud.example.com zu installieren.

certbot --apache -d nextcloud.example.com

Während der Installation werden Sie aufgefordert, Ihre E-Mail-Adresse anzugeben und den Nutzungsbedingungen zuzustimmen, wie unten gezeigt:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for nextcloud.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/nextcloud-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-available/nextcloud-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/nextcloud-le-ssl.conf

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

Geben Sie als Nächstes 2 ein und drücken Sie die Eingabetaste, um ein kostenloses SSL-Zertifikat für Ihre Domain herunterzuladen und zu installieren. Sobald die Installation erfolgreich abgeschlossen wurde, sollten Sie die folgende Ausgabe erhalten:

Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/nextcloud.conf to ssl vhost in /etc/apache2/sites-available/
nextcloud-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://nextcloud.example.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=nextcloud.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
IMPORTANT NOTES:  
 - Congratulations! Your certificate and chain have been saved at:  
 /etc/letsencrypt/live/example.com/fullchain.pem  
 Your key file has been saved at:  
 /etc/letsencrypt/live/example.com/privkey.pem  
 Your cert will expire on 2019-10-22. To obtain a new or tweaked  
 version of this certificate in the future, simply run certbot again  
 with the "certonly" option. To non-interactively renew *all* of  
 your certificates, run "certbot renew"  
 - Your account credentials have been saved in your Certbot  
 configuration directory at /etc/letsencrypt. You should make a  
 secure backup of this folder now. This configuration directory will  
 also contain certificates and private keys obtained by Certbot so  
 making regular backups of this folder is ideal.  
 - If you like Certbot, please consider supporting our work by:  
 Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate  
 Donating to EFF: https://eff.org/donate-le  

Sobald Sie fertig sind, können Sie mit dem nächsten Schritt fortfahren.

Zugriff auf die NextCloud-Weboberfläche

Ihre NextCloud ist jetzt konfiguriert und mit Let’s Encrypt SSL gesichert. Öffnen Sie als Nächstes Ihren Webbrowser und geben Sie die URL https://nextcloud.example.com ein. Sie werden auf die folgende Seite weitergeleitet:

NextCloud Login

Datenbank konfigurieren

Geben Sie nun Ihren Admin-Benutzernamen und Ihr Passwort, den Datenordner, die richtigen Datenbankanmeldeinformationen ein und klicken Sie auf die Schaltfläche Einrichtung abschließen. Sie werden auf das NextCloud-Dashboard auf der folgenden Seite weitergeleitet:

NextCloud Dashboard

Das war’s für jetzt.

Fazit

Herzlichen Glückwunsch! Sie haben NextCloud erfolgreich installiert und mit Let’s Encrypt Free SSL auf Debian 10 gesichert. Sie können jetzt ganz einfach Dateien, Dokumente und Medien mit anderen Benutzern über die NextCloud-Weboberfläche teilen.

Share: X/Twitter LinkedIn

Erhalte neue Beiträge in deinem Posteingang.

Kein Spam. Jederzeit abmelden.