Nextcloud manuell auf dem Raspberry Pi installieren – für Fortgeschrittene

1. Warum manuell installieren?

Die manuelle Installation bietet dir maximale Kontrolle über:

  • Webserver (Apache)
  • Datenbank (MariaDB)
  • PHP-Konfiguration
  • Speicherpfade und Sicherheit

Für erfahrene Nutzer, die ihr System individuell konfigurieren möchten.

Du suchst eine einfachere Lösung? Dann lies den Artikel zur Installation mit Nextcloud-Debian-Image.

2. Voraussetzungen

  • Raspberry Pi 4 mit Raspberry Pi OS
  • Internetverbindung
  • Optional: RAID oder externe Festplatte
  • SSH-Zugriff oder Tastatur/Monitor

3. System vorbereiten

sudo apt update && sudo apt upgrade -y

4. Apache & PHP installieren

sudo apt install apache2 php php-gd php-curl php-zip php-xml php-mbstring php-mysql php-intl php-bz2 php-imagick -y

5. MariaDB einrichten

sudo apt install mariadb-server -y
sudo mysql_secure_installation

Datenbank anlegen:

CREATE DATABASE nextcloud;
CREATE USER 'ncuser'@'localhost' IDENTIFIED BY 'deinPasswort';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'ncuser'@'localhost';
FLUSH PRIVILEGES;

6. Nextcloud herunterladen

wget https://download.nextcloud.com/server/releases/latest.zip
unzip latest.zip
sudo mv nextcloud /var/www/
sudo chown -R www-data:www-data /var/www/nextcloud

7. Apache konfigurieren

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

Inhalt:

<VirtualHost *:80>
    DocumentRoot /var/www/nextcloud
    <Directory /var/www/nextcloud>
        Require all granted
        AllowOverride All
    </Directory>
</VirtualHost>

Aktivieren:

sudo a2ensite nextcloud
sudo a2enmod rewrite headers env dir mime
sudo systemctl reload apache2

8. Web-Installer starten

Im Browser öffnen:

http://raspberrypi.local

Datenbankdaten eintragen, Admin-Benutzer anlegen.

9. Fazit

Du hast Nextcloud manuell auf deinem Raspberry Pi installiert – mit voller Kontrolle über alle Komponenten.

📎 Du willst es einfacher? Dann lies den Artikel zur Installation mit Nextcloud-Debian-Image.