[SUPPORT] SmartPhoneLover - 2FAuth

Recommended Posts



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


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.


Currently, there seems to be a problem (link) waiting to be fixed, which makes the camlive feature not work as expected when scanning a QR code. But, it is still possible to add codes manually, filling all the required fields, except from adding an icon (another issue).

GitHub: https://github.com/Bubka/2FAuth
DockerHub: https://hub.docker.com/r/2fauth/2fauth
My Repository: https://github.com/SmartPhoneLover/unraid-docker-templates



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


Why was 2FAuth created?

- Most of the UIs for this kind of apps show tokens for all accounts in the same time with stressful countdowns.

- 2FA accounts are stored in a standalone database that can easily be backed up and restored.

- No taking out the smartphone to get an OTP when the user uses a desktop computer.


Live demo:
user: demo@2fauth.app
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!

• 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, but I didn't include all of them because them are not really necessary for the most basic configuration.  Check the '.env.example' file in the root of the GitHub repo to know more.

• Redis server is needed.

1.0 (2022-01-23)

If you are going to report a bug or request something to be added/modified, please, take into consideration that I will only be able to apply changes for the work I own only. For example, if I create a docker template for an already existing docker image (not created by me), I won't be able to do more for that image than forward your report or request to the owner of the project.

If you like my work, please consider making a little donation.
Thank you very much 🙂

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

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.

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.