[kein Docker!] Nextcloud - Installation mit Ansible - Playbooks nach Reiner_Nippes

Von den Socken bin ich, copy and paste habe ich genutzt, jetzt finde ich es nicht mehr.

Ob das evtl. geÀndert wurde?

Die README.md wurde vor 16 Tagen geÀndert.

Jetzt gefunden:

httpxxxxs://github.com/ReinerNippes/nextcloud/tree/nextcloud-reloaded

Version 2.0

@ReinerNippes ReinerNippes released this on 27 Jun 2019 · 106 commits to master since this release

16 days ago

Git stats

Imgur

Unter diesem Link, vermutlich veraltet sieht es anders aus:

Was ist nun richtig, ich bin verdaddert?

@u_n_glaublich
Ich glaube Du warst auf der falschen Seite, was lÀuft hier falsch?

du hast den falschen branch erwischt.

doch. weil mein anspruch war, alles gleich mit zu installieren. (talk, elastic search, beide online suiten)

die simple frage “wie heiße ich?” lĂ€sst sich fĂŒr eine linux bĂŒchse nicht leicht lösen. hostname ist nur eine der möglichen antworten. normalerweise installiert man ein linux. setzt den gewĂŒnschten dns und trĂ€gt den dann im inventory ein. dieser wird dann an mehreren stellen im playbook verwendet. zum einen in der web server konfig, beim zertifkate erstellen und in der nextcloud config.

wenn man aber in der cloud z.b. aws einen vserver hochfĂ€hrt, ohne dynamisches, automatisches dns, ist hostname definitiv die falsche antwort auf die frage: wie soll die nextcloud fqdn heißen.

wenn man die variable leer lÀsst, versucht das playbook einen sinnvollen namen zu verwenden. das muss aber nicht funktionieren.

das ist ein bisschen doof. (und sicher ein grund warum keiner ein installationsskript schreibt, welches jemals perfekt sein wird. weil jeder was anderes will.)

wenn ansible eine ipv6 adresse auf dem system findet, wird eine entsprechende zeile (19) in die nextcloud.conf von nginx eingefĂŒgt. um das noch was schöner zu machen, könnte man noch eine variable enable_ipv6 ins inventory aufnehmen, um das zu unterbinden, wenn man kein ipv6 will. (meine antwort wĂ€re: dann disable ipv6 doch vorher.)

nginx lauscht dann aber auf “server {{ nextcloud_fqdn }}” zeile 20. und dort steht nur die ipv4 adresse, wenn man nur die ipv4 adresse eingibt.

deine frage war: “was muss ich minimal eingeben?”

minimal kommt das playbook sicher mit einer ipv4 ans ziel.

dann ist aber nicht vorgesehen eine ipv4 und eine ipv6 einzugeben.

wenn man alle diese if-then-else berĂŒcksichtigen wĂŒrde, wĂ€re man nie fertig.

und deshalb schreibt sich jeder, der es kann, sein eigenes install skript/playbook.

1 Like

Wird coturn auch direkt als STUN-Server konfiguriert? Benötigt wird es ja nicht zwingend.

aus anderem Thread:

musst du ja auch nicht. lÀuft auch so. :wink:

# prepare your os and install ansible
curl -s https://raw.githubusercontent.com/ReinerNippes/nextcloud/nextcloud-reloaded/prepare_system.sh | /bin/bash

# clone this repo
git clone --branch nextcloud-reloaded https://github.com/ReinerNippes/nextcloud

# change to nextcloud directory
cd nextcloud

# edit variables
vim inventory

# run the playbook
./nextcloud.yml

Naja, ganz so easy ist es dann doch nicht.

Was sind die Grundvoraussetzungen damt es es ĂŒberhaupt losgehen kann?
Mir genĂŒgt vorerst IPv4.

Bei mir:
vServer im Zugriff, Debian 10.5 (default) ist installiert, IPv4 und Subdomain ist vorhanden.
Was fehlt mich noch?

Da wĂŒrde ich jetzt weitermachen:

htt ps://github.com/ReinerNippes/nextcloud/tree/nextcloud-reloaded

Kann man IPv6 spÀter eintragen?

Das

 Your Nextcloud Server Domain Name

# Default is the fqdn of the Machine
nextcloud_fqdn          = nextcloud.toplevel.domain

geÀndert in

Your Nextcloud Server Domain Name

> 
> # Default is the fqdn of the Machine
> nextcloud_fqdn          = nextcloud.nc-kay.de

Mehr wollte ich nicht Àndern und es funktioniert dann?

Kann man IPv6 spÀter eintragen?

Man kann jedes Linux System und seine Programme mit jedem beliebigen Editor administrieren.

1 Like

@u_n_glaublich
Du hattest mich ein bischen vewirrt.

@Reiner_Nippes

Ich muss nur eine Domain / Subdomain eingeben?

Wird auch fail2ban und Àhnliches installiert?
C-Rieger hat da schöne Anleitungen.

Nach der Anleitung bin ich vorgegangen:

h ttps://github.com/ReinerNippes/nextcloud/tree/nextcloud-reloaded

Fehlermeldung im Browser aufgerufen:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Hallo, wie löse ich das Problem?

Wo finde ich die richtige server log.?

Mein System ist ein Debian 10.5.
Alle Einstellungen default von Reiner_Nippes, nur die Domain wurde angepaßt.

du musst die fqdn eingeben, unter der nextcloud zu erreichen sein soll.

subdomain geht nicht.

Ich habe nur eine kostenfreie Subdomain, dann ist jetzt Schluss?
Kann man das Problem durch kleinere Anpassungen beheben?

Aus dem “inventory file”

nextcloud_fqdn = nextcloud.toplevel.domain

Das ist doch eine Subdomain.

Die gewĂŒnschte Subdomain kann man nicht selber festlegen, “nextcloud.nc-kay.de” ist fest?

cloud.nc-kay.de usw. ist nicht möglich?

sorry. mein fehler. was nicht geht, wĂ€ren subfolder: “nextcloud.toplevel.domain/subfolder”

Wie löse ich mein Problem?

eine testinstallation auf einer aws ec2 mit debian-10-amd64-20200803-347 (ami-05c0d7f3fffb419c8) hat gerade zu folgendem output meines playbooks gefĂŒhrt:

TASK [check install status] ************************************************************************************************************************************************************************************************************************************************************************************************************************
Saturday 22 August 2020  13:36:15 +0000 (0:00:00.569)       0:05:28.707 ******* 
ok: [localhost]

TASK [We are ready] ********************************************************************************************************************************************************************************************************************************************************************************************************************************
Saturday 22 August 2020  13:36:16 +0000 (0:00:00.927)       0:05:29.635 ******* 
ok: [localhost] => changed=false 
  msg:
  - Your Nextcloud 19.0.1.1 at https://**** is ready.
  - 'Login with user: admin and password: L4eHUcLKTkLPCsjC6U9Dsc1M5lNv4aDx '
  - 'Other secrets you''ll find in the directory ~/.nextcloud '

PLAY RECAP *****************************************************************************************************************************************************************************************************************************************************************************************************************************************
localhost                  : ok=110  changed=66   unreachable=0    failed=0    skipped=60   rescued=0    ignored=0   

Saturday 22 August 2020  13:36:16 +0000 (0:00:00.023)       0:05:29.659 ******* 
=============================================================================== 
first setup nextcloud ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 52.14s
install nextcloud -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 36.30s
nextcloud : install additional packages ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 34.45s
apt install postgresql-11 with update ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 32.31s
install needed php packages ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 28.57s
set nextcloud domain config.php values ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 17.22s
php : apt dist-upgrade ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 9.69s
tls-certificate : get certificates ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 9.26s
download nextcloud archive ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 9.23s
nextcloud : backup jobs, upgrade apps and database tuning ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 7.67s
os : install additional packages ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 5.44s
install fail2ban packages ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 5.27s
os : reload ufw ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 4.17s
os : install ufw ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 4.13s
redis : install additional packages --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3.79s
webserver : install additional packages ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3.40s
postgres : ensure all configured locales are present. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2.89s
nextcloud : install apps -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2.79s
webserver : add additional nginx repo ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2.77s
add postgres repo key ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2.68s

der schritt TASK [check install status] ist ein installationsprĂŒfungsschritt. ok: [localhost] bedeutet, dass unter der adresse url: https://{{ nextcloud_fqdn }}/status.php ein webserver korrekt antwortet. dann bekommst du die oben angezeigt glĂŒckwunschmeldung angezeigt. und kannst dich als admin mit dem password anmelden.

wenn nicht, steht da: "Upss. Something went wrong."

was stand denn bei dir auf dem bildschirm?

→ wir schauen mal in /var/log/nginx/nextcloud.error.log oder so Ă€hnlich. das hĂ€ngt von der nginx config ab.

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

[quote=“Reiner_Nippes, post:30, topic:90101”]
/var/log/nginx/nextcloud.error.log

Die Ausgabe habe ich wieder gelöscht, ich hatte die IPv6 Adresse gepostet.

dort war zu ersehen, dass php-fpm nicht mehr lief.
also: systemctl status php7.4-fpm.service

 systemctl status php7.4-fpm.service
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2020-08-22 14:24:19 CEST; 2h 3min ago
     Docs: man:php-fpm7.4(8)
  Process: 733 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS)
 Main PID: 450 (php-fpm7.4)
   Status: "Processes active: 0, idle: 20, Requests: 17, slow: 0, Traffic: 0req/sec"
    Tasks: 21 (limit: 1056)
   Memory: 116.9M
   CGroup: /system.slice/php7.4-fpm.service
           ├─450 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
           ├─713 php-fpm: pool www
           ├─714 php-fpm: pool www
           ├─715 php-fpm: pool www
           ├─716 php-fpm: pool www
           ├─717 php-fpm: pool www
           ├─718 php-fpm: pool www
           ├─719 php-fpm: pool www
           ├─720 php-fpm: pool www
           ├─721 php-fpm: pool www
           ├─722 php-fpm: pool www
           ├─723 php-fpm: pool www
           ├─724 php-fpm: pool www
           ├─725 php-fpm: pool www
           ├─726 php-fpm: pool www
           ├─727 php-fpm: pool www
           ├─728 php-fpm: pool www
           ├─729 php-fpm: pool www
           ├─730 php-fpm: pool www
           ├─731 php-fpm: pool www
           └─732 php-fpm: pool www

Aug 22 14:24:08 debian10 systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...

aus den ersten beiden zeilen des gelöschten logs konnte man schließen, dass gegen 14:16 die sache noch lief.

in den letzten drei zeilen stand, dass sich der nginx nicht mehr mit dem php7.4-fpm socket verbinden konnte.

nach der ausgabe lÀuft php-fpm. wurde aber um 14:24 gestartet.

was passierte zwischen 14:16 und 14:24?

und hast mal ein schlichtes reboot probiert?

ich mache einen reboot

nach dem Reboot:

systemctl status php7.4-fpm.service
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2020-08-22 16:40:05 CEST; 1min 20s ago
     Docs: man:php-fpm7.4(8)
  Process: 687 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS)
 Main PID: 452 (php-fpm7.4)
   Status: "Processes active: 0, idle: 20, Requests: 0, slow: 0, Traffic: 0req/sec"
    Tasks: 21 (limit: 1056)
   Memory: 88.0M
   CGroup: /system.slice/php7.4-fpm.service
           ├─452 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
           ├─667 php-fpm: pool www
           ├─668 php-fpm: pool www
           ├─669 php-fpm: pool www
           ├─670 php-fpm: pool www
           ├─671 php-fpm: pool www
           ├─672 php-fpm: pool www
           ├─673 php-fpm: pool www
           ├─674 php-fpm: pool www
           ├─675 php-fpm: pool www
           ├─676 php-fpm: pool www
           ├─677 php-fpm: pool www
           ├─678 php-fpm: pool www
           ├─679 php-fpm: pool www
           ├─680 php-fpm: pool www
           ├─681 php-fpm: pool www
           ├─682 php-fpm: pool www
           ├─683 php-fpm: pool www
           ├─684 php-fpm: pool www
           ├─685 php-fpm: pool www
           └─686 php-fpm: pool www

Aug 22 16:39:54 debian10 systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
Aug 22 16:40:05 debian10 systemd[1]: Started The PHP 7.4 FastCGI Process Manager.

im Browser Webadresse aufgerufen:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Welche Protokolle / Ports mĂŒssen in der Firewall zwingend freigeschaltet sein?