Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

NextCloud hinter Nginx-Proxy-Manager und 2fa per App

Featured Replies

Hallo ins Forum,

 

ich bin neu in der Welt von Unraid aber ganz begeistert. 

 

Nach meinem Umstieg von einem "geschlossenen NAS" zum Eigenbau habe ich allerdings ein Problemchen.

 

Ich habe mir den Nginx-Proxy-manager von JC21 und MariaDB sowie NextCloud von Linuxserver via Docker installiert und kann NextCloud erreichen und auch Dateien Laden. Sogar die RemoteIP wird sauber durchgereicht. ;-)

 

 

Leider funktioniert die 2FA mittels App nicht sauber. Ich bekomme auf dem Smartphone die Benachrichtigung und kann diese auch bestätigen. leider passiert dann am Browser (MS Edge) nichts und das Fenster zur Bestätigung in der App bleibt offen. Klicke ich dann auf BackupCode kann ich einen eingeben und mich damit auch anmelden, aber das ist nicht der Sinn.

 

Meine Config des Proxymanagers

Deteils:

Domain Names *

xxx.xxx.net

Scheme*                                     http                                     https                                 

https

Forward Hostname / IP*

nextcloudcontainer ip

Forward Port *

443

Cache Assets

xBlock Common Exploits

xWebsockets Support

Access ListPublicly Accessible

 

advanced:

    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_max_temp_file_size 16384m;
    client_max_body_size 0;

 

location /.well-known/carddav {
    return 301 $scheme://$host/remote.php/dav;
}

location /.well-known/caldav {
    return 301 $scheme://$host/remote.php/dav;
}
 

meine Nextcloud config.php:

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' => 
  array (
    0 => 'meine.domain.net',
  ),
  'trusted_proxies' => 
   array (
    '192.168.78.111/24'
  ),
 'forwarded_for_headers' => 
  array(
    0 => 'X-Forwarded-For',
    1=> 'HTTP_X_FORWARDED_FOR'
   ),

  'dbtype' => 'mysql',
  'version' => '22.2.0.2',
  'overwrite.cli.url' => 'https://meine.domain.net',
  'overwritehost' => 'meine.domain.net',
  'overwriteprotocol' => 'https',
  'dbname' => 'xxx',
  'dbhost' => 'dbhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'xxx',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'xxx',
  'mail_domain' => 'xxx',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'xxx',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'xxx',
  'mail_smtppassword' => 'xx',
  'mail_smtpauthtype' => 'xxx',
  'maintenance' => false,
  'skeletondirectory' => '/data/welcome',
  'share_folder' => '/geteilt',
  'login_form_autocomplete' => false,
  'simpleSignUpLink.shown' => false,
  'localstorage.allowsymlinks' => false,
  'blacklisted_files' => 
  array (
    0 => '.htaccess',
  ),
  'default_language' => 'de',
  'default_locale' => 'de_DE',
  'default_phone_region' => 'DE',
  'session_keepalive' => false,
  'auth.bruteforce.protection.enabled' => true,
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' => 
  array (
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
  'data-fingerprint' => 'xxx',
  'app_install_overwrite' => 
  array (
    0 => 'epubreader',
  ),
);
 

Wenn ich mir einen 2fa-Code per Mail schicken lasse, funktioniert dies problemlos, ich würde es aber gern per App haben. Hat hier noch jemand eine Idee?

 

Viele Grüße und vielen Dank im Voraus.

  • Author

meine php-local.ini hat folgende Einträge:

 

date.timezone = Europe/Berlin
upload_max_filesize = 100G
memory_limit = 8G
max_execution_time = 3600
max_input_time = 3600
post_max_size = 100G
max_file_uploads = 1000
default_socket_timeout = 3600
output_buffering = off
opcache.enable = 1
opcache.interned_strings_buffer = 8
opcache.max_accelerated_files = 10000
opcache.memory_consumption = 128

 

  • Community Expert

Kommt dein Nextcloud Container ins Internet? Die Console des Containers öffnen und "ping -c1 google.com" ausführen.

 

Weil vom Prinzip ist das ja das einzige was passiert. Du gibst den Code ein und der fragt den 2FA Anbieter durch den Aufruf eines Links ob der Code passt.

 

Hat Nextcloud eine Art Debug Mode und wirft dadurch irgendwo Logs aus? Wäre auch noch eine Idee da reinzuschauen.

  • Author

Das mit dem ping werde ich heute nachmittag noch mal versuchen. Verwundernd ist halt, dass es mit den Mail-codes funktioniert und über die App nicht. Hier kommt wie geschrieben die Benachrichtigung, ich kann diese Annehmen, aber die Rückmeldung an den Server bzw. die Anmeldemaske kommt nicht.Vlt. liegt es auch an der NextCloud-App auf dem iPhone. Ich werde mal noch andere Geräte versuchen.

  • Author

Ein ping nach außen funktioniert tadellos. Ich habe nun in meiner Docker-Config mal noch etc/localtime sowohl bei NPM, MariaDB als auch Nextcloud durchgereicht, da ich noch eine asynchrone Zeit vermutete, leider ohne erfolg.

  • Community Expert

Diese Mailcodes sind auch vom 2FA Anbieter oder kommen die von Nextcloud?

  • Author

Die Apps sind nicht direkt von NextCloud, zumindest stehen Entwicklernamen dahinter. Ich habe aber etwas gefunden:

Accept does not continue in the browser with 22.2.0/21.0.5 · Issue #551 · nextcloud/twofactor_nextcloud_notification · GitHub

 

man kann wohl einen patch einspielen, das werde ich mal testen.

  • Author

den patch kann ich nicht einspielen, da sich der patch-Befehl unter dem Docker-Container nicht ausführen lässt. "command not found.".

  • Community Expert

Link? Kommando? Screenshots?

  • Author

Sorry ich hatte versehentlich vergessen, oben den Link einzufügen:

https://github.com/nextcloud/twofactor_nextcloud_notification/issues/551

 

wenn ich nun im Terminal des Nextcloud-Containers den patch-Befehl eingebe, bekomme ich die meldung command not found.

Folgende schritte habe ich durchgeführt:

terminal zum Container aufgemacht

- cd /config/www/nextcloud

- wget https://github.com/nextcloud/server/pull/29056.diff

- patch -p1 *.diff

- Die nachstehende Meldung erscheint: bash: patch: command not found

 

 

Ich habe eben gesehen, dass es aber ein Update gibt und werde dies mal einspielen. Danach berichte ich noch einmal.

  • Author

Das Aktualisieren des Containers und Nextcloud auf die aktuelle Versionbrachte leider nicht den gewünschten Erfolg.

  • Community Expert
On 11/11/2021 at 7:47 PM, blinddark said:

Das Aktualisieren des Containers und Nextcloud auf die aktuelle Versionbrachte leider nicht den gewünschten Erfolg.

Also du hast jetzt 22.2.1? Darin ist der Patch ja enthalten.

 

 

  • Author

Ja es ist 22.2.1.. Es scheint jetzt nur noch am MSEdge zu liegen. Nutze ich Chrome, wird die Bestätigung nun akzeptiert.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.