[SUPPORT] SmartPhoneLover - 2FAuth


Recommended Posts

2fauth.png

 

This docker template was created based on an already available official docker image

 

GitHub: https://github.com/Bubka/2FAuth
DockerHub: https://hub.docker.com/r/2fauth/2fauth

Documentation: https://docs.2fauth.app/
My Repository: https://github.com/SmartPhoneLover/unraid-docker-templates

 

DESCRIPTION

2FAuth is a web based self-hosted alternative to One Time Passcode (OTP) generators like Google Authenticator, designed for both mobile and desktop.

 

It aims to ease you perform your 2FA authentication steps whatever the device you handle, with a clean and suitable interface.

 

Main features:
• Manage your 2FA accounts and organize them using Groups
• Scan and decode any QR code to add account in no time
• Add custom account without QR code thanks to an advanced form
• Edit accounts, even the imported ones
• Generate TOTP and HOTP security codes

 

How to restore my QR codes when re-installing the container?
1. Back up the DB file (database.sqlite) somewhere in your server, located under '/.../appdata/2fauth/', or you can back up the whole directory to simplify.
1. Re-create the container with all the requiered fields in the template (same configuration as it was in previous container).
3. Done!

 

Live demo:
https://demo.2fauth.app/
user: [email protected]
pass: demo

 

How to proceed when restoring the container?
0. Be sure to backup the DB file (database.sqlite) somewhere in your server, located under '/.../appdata/2fauth/', or you can back up the whole directory to simplify.
1. Load and fill-in all the requiered fields in the template (same configuration as it was in previous container), then create the container, as usual. Stop it now.
2. Navigate to where you could save the DB file (i.e.: using Krusader), and place it under '/.../appdata/2fauth' directory. Launch the container again.
3. Done!


NOTES

• Run the following cmd via Terminal (unRAID) before building the container: mkdir -m 777 /mnt/user/appdata/2fauth.
• A default app key (APP_KEY) is already included in the template, but it's highly recommended to change it by your own. Then, copy and paste it into the template, and rebuild the container. Be sure to clean the config directory (appdata), so the DB is re-generated with new the key.
• There are some other variables that the user can use on this template, if needed. Check the official doc to know more.
• The container can be accessed via HTTP, but HTTPS will be required when adding new QR codes.


VERSION
1.1 (2022-09-05)

Edited by SmartPhoneLover
Link to comment

The 2FA codes don't work at all for me. It looks like it provides the correct code but about five minutes too early when compared to Google Authenticator and Authy.

 

Edit: Turns out my unRAID system clock was somehow ahead by 5 minutes. All working now.

Edited by lacmac
  • Like 1
Link to comment
  • 2 weeks later...
  • 3 months later...
  • 3 weeks later...
  • 1 month later...
5 hours ago, BAZOOKAPANDA said:

Its a long story but my database file is gone. I have accepted re-adding my accounts but I cant sing in.

The create account button says account exists but I cant click sign in the button goes nowhere, just refreshes the page

 

Any advice?

Did you delete the content of the 2Fauth dir under 'appdata'? If not, extract the DB file (SQLite) an try to read it with an external program, such as: SQLite Expert Professional (windows). If the file is not fully corrupted, and you did not enabled encryption for the data to be stored, the data related to all your Google codes will remain in text plain. So, you will be able to restore them in a new instance (one by one).

Link to comment
On 7/20/2022 at 8:54 AM, Coldfusion said:

Is it possible to transfer my codes from my google authenticator app to this app . I have tried but it doesnt seem to work

 

Yes, it seems that it's currently possible (I didn't tried it yet) with the latest 3.2.0 release.

 

On 5/31/2022 at 6:41 PM, EricM said:

is there a step by step installation guide? I dont get it working.

I will try to change the template or add some additional information to make it easier.

 

On 5/10/2022 at 7:22 PM, Marlat said:

With the latest release of 2FAuth, can you add the "AUTHENTICATION_GUARD" variable to the template (the default value is "web-guard")

I will update the template on 2022/07/23, sorry for the late update.

Edited by SmartPhoneLover
Link to comment
8 hours ago, SmartPhoneLover said:

Did you delete the content of the 2Fauth dir under 'appdata'? If not, extract the DB file (SQLite) an try to read it with an external program, such as: SQLite Expert Professional (windows). If the file is not fully corrupted, and you did not enabled encryption for the data to be stored, the data related to all your Google codes will remain in text plain. So, you will be able to restore them in a new instance (one by one).

Yes the one in appdata.

 

I now want to start fresh but for some reason cant get to sign on page.

 

Maybe something is misconfigured

Link to comment
  • 5 weeks later...
  • 2 weeks later...

VERSION

v1.1 (2022-09-05)

- New: Added official doc link in the support thread.

- New: Added 'AUTHENTICATION_GUARD' and 'WEBAUTHN_USER_VERIFICATION' variables.
- Fix: 'LOG_LEVEL' variable not working.
- Other: Redis server settings were taken out from the template, because it's not really necessary at all. (check official doc if you want to use it)

- Other: Updated info about how to restore your QR codes when re-installing the container.
- Other: Other minor changes.

Link to comment
  • 1 month later...

After deploying a 2fauth docker instance everything works fine except for the ssl not working. The self signed cert automatically made by unraid itself works for my other services except for 2fauth which completely makes 2fauth useless since I can't access the website via HTTPS. Does anyone know how I could combat this issue? BTW I am only accessing the website locally so I need a self signed cert.

Edited by 0anon
Typo and minor correction
Link to comment
  • 1 month later...
  • 3 weeks later...
On 9/5/2022 at 9:00 PM, SmartPhoneLover said:

Just curious, did you got it working?

Not really.

As it stands I have clean docker install from scratch but I was hoping to get to the sign in page so that I could use my old account because if i try create a new account I get an error about that email already being in use, which is a minor wrinkle.

 

This seems to no longer be true however and I am using an email address I think I previously registered but hey gift horse and all that.

Link to comment
  • 2 months later...
  • 3 weeks later...

I have now set up 2fauth a second time but I always have the wrong time, when I do "date" is 2fauth UTC, but Unraid is on CET and I do not know what I'm doing wrong since it is only the time it can only be a small problem because with other containers the time is taken over wonderfully by Unraid just not 2Fauth. Since I also find nothing with which I can determine the time or time zone I thought I ask once. I googled and some think that it is mid some tz variable but I could not find anything about this variable, also other entries do not help me e.g.: "on the template , try taking out the bind time setting". But in the template there is nothing to do with the time.

Link to comment
  • 3 weeks later...
54 minutes ago, MBacx said:

Application UI port is fixed to 8000 even if I change WebUI port in the settings. It is always set to 8000. Also tried adding custom -p in Extra Parameters, no luck.

Is the network type set to "Bridge"?  Anything other than bridge and by definition all port mappings are ignored as port mappings only make sense in bridge mode

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.