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.

2fAuth - Datenbankprobleme

Featured Replies

Hallo zusammen,

ich habe 2FAuth aus dem Unraid-App-Store installiert und konnte diesen auch mit sqlite verwenden. Allerdings möchte ich ihn gerne mit Mysql nutzen. Ich habe daher eine Datenbank mit MariaDB erstellt und in dem 2FA-Docker entsprechend der Dokumentation (https://github.com/Bubka/2FAuth/blob/master/.env.example) die Variablen ergänzt.

# or if you want to use SQL (uncomment lines)

# DB_CONNECTION=mysql
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=homestead
# DB_USERNAME=homestead
# DB_PASSWORD=secret

 

Meine sind entsprechend dieser angelegt. Starte ich den Docker sieht alles richtig aus:

The [/srv/public/storage] link already exists.
The links have been created.
Configuration cache cleared!
Configuration cached successfully!
time="2022-02-26T15:53:33Z" level=info msg="load configuration from file" file=/etc/supervisor/supervisord.conf

 

Sobald ich aber das WebUI aufrufe, bekomme ich folgende Fehler: Siehe Screenshot.

Leider verstehe ich das gar nicht. Sieht aus, als ob etwas fehlt, bei meiner Recherche habe ich aber für mich nichts Greifbares gefunden. Weiß jemand, wie ich das lösen kann?

 

Besten Dank vorab!

 

Fehlermeldung.png

  • Community Expert

Die entsprechenden Zeilen hast Du aber auskommentiert?

Sprich die "#" entfernt?

  • Author
40 minutes ago, saber1 said:

Die entsprechenden Zeilen hast Du aber auskommentiert?

Sprich die "#" entfernt?

Klar. Sieht bei mir so aus: Screenshot.

 

 

db-connection.png

  • 3 weeks later...

Did you ever fix this i am having a similar issue

  • Author
38 minutes ago, deanrparry said:

Did you ever fix this i am having a similar issue

Unfortunately not. I guess it isn't possible to connect the Maria DB with this docker. Maybe with compose?! I ended to just use it with the default database, then it is working fine.

did you have issues with attaching logos to them? nginx permissions?

  • Author
1 hour ago, mgutt said:

Wenn ich das hier richtig verstehe, dann kommt es zu so einem Fehler, wenn nicht die notwendigen Datenbanktreiber in PHP installiert sind:

https://stackoverflow.com/questions/9308147/pdoexception-could-not-find-driver-in-php

 

Daraus schließe ich, dass der Container nicht mit einer SQL Datenbank kompatibel ist. Was sagt die Doku des Containers dazu?

Ich bin von dieser Doku bzw. den Optionen der env.example darin ausgegangen: https://github.com/Bubka/2FAuth/blob/master/.env.example.
Darin ist eben in Zeile 62-69 die Anbindung mit SQL aufgeführt. Ich bin dann wiederum davon ausgegangen, dass ich diese Option auch in den Unraid bzw. Docker Einstellungen vornehmen kann. Ist mir aber weder in Unraid noch mit dem Pi gelungen, daher auch dieser Beitrag. Geht es dann einfach "nur" mit SQLite oder gibt es eine Lösung? Vielleicht verstehe ich auch einfach nur den Kontext mit der Environment (.env) nicht.

  • Author
2 hours ago, deanrparry said:

did you have issues with attaching logos to them? nginx permissions?

Hey! No, I can attach images without problems. Maybe you forgot to set the permissions according to the description?

WARNING
Even if the config dir (/.../appdata/2fauth) is supposed to work with 700 (chmod) permissions, I could not get it working as it should on unRAID. Instead, I had to set full permissions: 777, if not, the container refused to start. If someone could help on this I would thank you very much.


NOTES
• Run the following cmd via Terminal (unRAID) before building the container: mkdir -m 777 /mnt/user/appdata/2fauth.

 

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.