Ein paar Verständinsfragen

Ich möchte Nextcloud gerne als LXC unter Proxmox installieren. NGINX läuft bereits unter einem Docker Container. Weiter möchte ich die Daten nicht lokal sondern auf einem NAS ablegen.

Hab gefühlt alles an Tutorials durch. Ich bekomme es einfach nicht hin. Bei den ganzen anleitungen ist immer die Instalation von einen Webserver dabei. Dieser läuft aber ja schon bei mir.

Könnt ihr mir bitte einen Tipp geben wie ich das zum laufen bekomme?

Brauch dann doch PHP8 (muss das auf Nextcloud angepast werden oder “nur” die allgemeine einstellungen)

Und eine Datenbank wie MariaDB wo eine Datenbank für Nextcloud eingerichetet wird?

Hänge da nun gut eine Woche dran und habe es nie geschafft af das Webinterface zu kommen.

Danke für die Unterstüzuung!

Nextcloud braucht einen Webserver um zu funktioniern. Am einfachsten geht die Konfiguration mit Apache. Du kannst aber bei deinem existierenden NGINX eine Reverse Proxy Konfiguration hinzufügen, welche dann die Anfrage entgegnnimmt und sie dann an den Apache auf dem Netxloud Server weitergibt.

Sollte angepasst werden, ja.

Jup braucht es. Sollte aber eigentlich in den meisten Anleitungen vorkommen.

Evtl. kannst du es ja mal mit dieser Anleitung versuchen:

Ich würde aber den folgenden Befehl zur Installtion von PHP verwenden, anstelle von dem in der Anleitung. Ansonsten installiert er mittlerweile Version 8.1 anstatt 8.0, und die ist noch nicht kompatibel mit der aktuellen Version von Nextcloud.

apt install php8.0-{php php-curl php-cli php-mysql php-gd php-common php-xml php-json php-intl php-pear php-imagick php-dev php-common php-mbstring php-zip php-soap php-bz2 php-bcmath php-gmp php-apcu}
2 Likes

Das ist gut zu wissen. Danke!
Dafür ist der NGINX bei mir auch installiert. Der nimmt die ports 80 und 443 und verteilt das dann je nach Subdomain.

Okay. Könntest du mir bitte eine Anleitung empfhelen?
Wir bei der Conig dann überall wo nach einer Dmoain gefragt wird die ip vom LXC eingetragen?

Jup.

Btw. Habe noch etwas hinzugefügt bei meinem vorherigen Post.

1 Like

Vielen Dank! Ich versuche nun mal mein Glück

1 Like

Viel Glück. :slight_smile:

Btw. Den SSL-Teil mit den Zertifikaten kannst du dann weglassen, oder evtl. selbstsignierte Zertifikate für Apache generieren. Die Let’s Encrypt Zertifikate beziehst du dann auf dem NGINX. Muss dich aber schon vorwarnen. Bin kein Experte, wenn es um nginx Reverse Proxys oder nginx generell geht :wink:

1 Like

Selbstsigniert wäre für den Lokalen gebrauch? Über NGINX und klappt das mit dem Zertifikat “eigentlich”

Ist das der teil wo ich die ip vom Container statt der Domain eintragen muss?
grafik

1 Like

Ich würde es mal ohne SSL aufsetzten und wenn es dann via direktem Zugriff auf die Lokale IP Adresse läuft, kannst du dich um den Reverse Proxy kümmern und dort die SSL Zertifikate beziehen. Falls die Verbindung zwischen Reverse Proxy und der Nextcloud auch verschlüsselt sein soll, kannst du auch nachträglich noch selbstsignierte Zertifikate hinzufügen.

Die config würde dann so aussehen:

<VirtualHost *:80>
   ServerName 192.168.xxx.xxx
    
   DocumentRoot /var/www/nextcloud/
  
   <Directory /var/www/nextcloud/>
        Options +FollowSymlinks
        AllowOverride All

        <IfModule mod_dav.c>
            Dav off
        </IfModule>

        SetEnv HOME /var/www/nextcloud
        SetEnv HTTP_HOME /var/www/nextcloud
    </Directory>

    # log files
    ErrorLog /var/log/apache2/files.domain-name.io-error.log
    CustomLog /var/log/apache2/files.domain-name.io-access.log combined
</VirtualHost>
2 Likes

Bekomme bei der PHP bzw bei der PHP repository eine Fehlermeldung

root@NextCloud:~# echo "deb https://packages.sury.org/php/ $(lsb_release -sc) ma                               in"\
| sudo tee /etc/apt/sources.listVorformatierter Text.d/sury-php.list
bash: lsb_release: command not found
deb https://packages.sury.org/php/  main
root@NextCloud:~#

Hast du dazu bitte auch einen Tipp

apt install curl lsb-release

Da hätte ich auch drauf kommen können :smiley:

root@NextCloud:~# apt install php8.0-{php php-curl php-cli php-mysql php-gd php-common php-xml php-json php-intl php-pear php-imagick php-dev php-common php-mbstring php-zip php-soap php-bz2 php-bcmath php-gmp php-apcu}
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package php8.0-{php
E: Unable to locate package php-apcu}

interpretierenich das richtig das in dem Paket das PHP8 nicht drin ist?

Ah ja. Denkfehler beim zusammenkopieren. Das fuktioniert so natürlich nicht. php-pear und php json haben keine Installationskanditaten. Versuche es mal so…

apt install libapache2-mod-php8.0 php8.0-{curl,cli,mysql,gd,common,xml,intl,imagick,dev,common,mbstring,zip,soap,bz2,bcmath,gmp,apcu}

oder halt alle einzeln

apt install php8.0-curl php8.0-cli etc

root@NextCloud:/etc/apache2/conf-available# systemctl is-enabled mariadb
systemctl status mariadb
enabled
* mariadb.service - MariaDB 10.5.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-02-05 17:42:24 UTC; 20min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 19654 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, stat>
    Process: 19655 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, sta>
    Process: 19657 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..;>
    Process: 19719 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, st>
    Process: 19721 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
   Main PID: 19704 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 8 (limit: 19073)
     Memory: 69.3M
        CPU: 838ms
     CGroup: /system.slice/mariadb.service
             `-19704 /usr/sbin/mariadbd

Feb 05 17:42:25 NextCloud /etc/mysql/debian-start[19726]: Processing databases
Feb 05 17:42:25 NextCloud /etc/mysql/debian-start[19726]: information_schema
Feb 05 17:42:25 NextCloud /etc/mysql/debian-start[19726]: mysql
Feb 05 17:42:25 NextCloud /etc/mysql/debian-start[19726]: performance_schema
Feb 05 17:42:25 NextCloud /etc/mysql/debian-start[19726]: Phase 6/7: Checking and upgrading tables
Feb 05 17:42:25 NextCloud /etc/mysql/debian-start[19726]: Processing databases
Feb 05 17:42:25 NextCloud /etc/mysql/debian-start[19726]: information_schema
Feb 05 17:42:25 NextCloud /etc/mysql/debian-start[19726]: performance_schema
Feb 05 17:42:25 NextCloud /etc/mysql/debian-start[19726]: Phase 7/7: Running 'FLUSH PRIVILEGES'
Feb 05 17:42:25 NextCloud /etc/mysql/debian-start[19726]: OK


<VirtualHost *:80>
   ServerName 192.168.1.3

   DocumentRoot /var/www/nextcloud/

   <Directory /var/www/nextcloud/>
        Options +FollowSymlinks
        AllowOverride All

        <IfModule mod_dav.c>
            Dav off
        </IfModule>

        SetEnv HOME /var/www/nextcloud
        SetEnv HTTP_HOME /var/www/nextcloud
    </Directory>

    # log files
    ErrorLog /var/log/apache2/files.domain-name.io-error.log
    CustomLog /var/log/apache2/files.domain-name.io-access.log combined
</VirtualHost>



root@NextCloud:/var/www/nextcloud# ls
3rdparty  apps         core        index.php  ocm-provider  public.php  robots.txt  updater
AUTHORS   config       cron.php    lib        ocs           remote.php  status.php  version.php
COPYING   console.php  index.html  occ        ocs-provider  resources   themes
root@NextCloud:/var/www/nextcloud#

Soweit bin ich. Aber unter http://192.168.1.3 - bleibt die Seite einfach leer- Kein Fehlermeldung

Installiert unter einen Debian LXC

root@NextCloud:~# nano /var/log/apache2/files.domain-name.io-error.log
  GNU nano 5.4                                                                                   /var/log/apache2/files.domain-name.io-error.log
[Sat Feb 05 17:52:06.325576 2022] [php:error] [pid 20829] [client 192.168.1.10:57121] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stat>
[Sat Feb 05 17:52:42.251594 2022] [php:error] [pid 20832] [client 192.168.1.10:57152] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 17:54:13.686481 2022] [php:error] [pid 20833] [client 192.168.1.10:57212] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 17:54:14.415060 2022] [php:error] [pid 20829] [client 192.168.1.10:57214] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 17:59:54.297035 2022] [php:error] [pid 20834] [client 192.168.1.10:57422] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 17:59:55.219580 2022] [php:error] [pid 20830] [client 192.168.1.10:57426] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 17:59:55.903380 2022] [php:error] [pid 20831] [client 192.168.1.10:57427] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 17:59:56.387350 2022] [php:error] [pid 20832] [client 192.168.1.10:57428] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 17:59:56.923045 2022] [php:error] [pid 20833] [client 192.168.1.10:57429] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 17:59:57.400160 2022] [php:error] [pid 20829] [client 192.168.1.10:57430] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 18:01:35.508883 2022] [php:error] [pid 42125] [client 192.168.1.10:57490] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stat>
[Sat Feb 05 18:01:36.552333 2022] [php:error] [pid 42126] [client 192.168.1.10:57493] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 18:01:37.393935 2022] [php:error] [pid 42127] [client 192.168.1.10:57495] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 18:01:37.911075 2022] [php:error] [pid 42128] [client 192.168.1.10:57496] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 18:01:38.388050 2022] [php:error] [pid 42129] [client 192.168.1.10:57497] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 18:01:38.951841 2022] [php:error] [pid 42125] [client 192.168.1.10:57498] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 18:01:39.449329 2022] [php:error] [pid 42126] [client 192.168.1.10:57500] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 18:01:39.925314 2022] [php:error] [pid 42127] [client 192.168.1.10:57501] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 18:04:11.680364 2022] [php:error] [pid 42151] [client 192.168.1.10:57597] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stat>
[Sat Feb 05 18:04:12.496366 2022] [php:error] [pid 42153] [client 192.168.1.10:57599] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 18:08:08.999213 2022] [php:error] [pid 42154] [client 192.168.1.10:57749] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 18:08:09.784487 2022] [php:error] [pid 42155] [client 192.168.1.10:57752] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_stati>
[Sat Feb 05 18:09:23.032838 2022] [php:error] [pid 204] [client 192.168.1.10:57805] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_static>
[Sat Feb 05 18:09:24.152234 2022] [php:error] [pid 208] [client 192.168.1.10:57808] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_static.>
[Sat Feb 05 18:09:30.064790 2022] [php:error] [pid 209] [client 192.168.1.10:57814] PHP Fatal error:  Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_static.>

Naja vielleicht taugt diese Anleitung doch nicht so wirklich… Auf die Schnelle weiss ich jetzt aber auch nicht gerade was fehlt oder wo es happert…

Ich habe meine Nextcloud anhand einer älteren Version dieser Anleitung installiert… Ist aber einiges komplexer und auch darauf ausgelegt, direkt den Apache zu verwenden bzw. Port 80 und 443 direkt auf den Nextcloud Server zu forwarden und dann direkt auf diesem Server die SSL Zertifikate zu beziehen. Du müsstest also auch dort ein paar Anpassungen vornehmen.

Auf der Seite von C-Rieger findest du übrigens auch Anleitungen und ein Installationsscript für Nextcloud mit nginx als Webserver. Übersicht: Anleitungen Archive - Carsten Rieger IT-Services

Evtl kannst du ja mal das Script versuchen. Damit solltest du die Nextcloud auch ohne SSL oder mit selbstsignierten Zertifikaten zum Laufen kriegen.

Eine weitere Möglichkeit, wäre Ubuntu mit dem Snap Package oder Nextcloud AIO zu verwenden, dafür würde ich dann aber eine VM und keinen LXC empfehlen.

1 Like

Habe das Interface. War mein Fehler. Habe in der PHP Config memory_limit = 512M nur das M stehen.

Vielen Danke für deine Hilfe!!! Endlich klappt es :smiley:

1 Like

:+1: :+1: :grinning:

Guten Morgen!

habe mich nun nun noch mehr mit dem Thema beschäftigt. Habe Nextcloud ja nun erstmal installiert. Ist aber aktuell nur unter 192.168.1.3 erreichbar.

Wenn ich die IP in den Reverse Proxi mit der Domain verknüpfe, lade ich auf der Startseite von Apache. Liegt das an Einstellungen in der /etc/nginx/conf.d/http.conf Datei?

Weiter wollte ich im nächstem Stepp das ganze mal nach der Anleitung von Carsten Rieger durchführen. Hier müsste ich doch auch “nur” die Zertifikate weglassen und die nextcloud.conig mit meiner IP austauschen?

Würdet ihr die Installation mit Apache oder NGINX Webserver empfehlen. Bzw. was ist performanter? Installierr wird das ganze unter Proxmox → Debian LXC

Nochmals Danke!!!

Eventuell kannst du ja zu diesem Thema mal das Forum durchsuchen und falls das nicht weiterhilft, einnen neuen Thread spezifisch zum Thema Reverse Proxy erstellen. Ich habe da, wie bereits gesagt, leider nicht wirklich Erfahrung.

Dazu müsstest du mal etwas googeln. Ich kann nur sagen, dass es stark davon abhängt wie PHP, und Apache resp. nginx konfiguriert und “getunt” sind". Mit PHP-FPM und mpm event (so wie in der C.Rieger Apache Anleitung) dürfte Apache aber eine vergleichbare Performance wie nginx erreichen.

1 Like

Alles klar das mache ich!
Danke und Lg

1 Like