Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help needed / Question ] TOTP / 2FA no longer works after migrating my Docker installation and all my DocuSeal persistent data #442

Closed
0penSourcerer opened this issue Feb 27, 2025 · 12 comments

Comments

@0penSourcerer
Copy link

I had been really enjoying DocuSeal and everything had been working just as expected, including TOTP / 2FA, and I had logged in/out of my instance many times before the following issue occurred:

  • I purchased a new SSD for my server and decided to move my Docker installation to it. After backing up all my Docker persistent data, I uninstalled Docker from my main volume (Volume1), and then did a fresh Docker setup on my new SSD (Volume2).

  • All my persistent data remained unchanged, as did all of my Docker Compose YAML files, with the exception of me modifying the mount paths in each YAML to reflect the data now being on Volume2 instead of Volume1.

  • All of my containers and Docker environments worked flawlessly...except for DocuSeal. Much to my dismay, after successfully entering my unchanged username and password for DocuSeal, entering my TOTP left me with this error (as seen in the image below)...

Image

Can changing Volumes somehow mess up a DocuSeal instance?

Is there any way to bypass TOTP through some kind of edit of the DocuSeal persistent data or modifying the Docker Compose YAML?

I'm worried that I will never be able to log into this DocuSeal instance ever again, losing all of my custom contracts and having to re-create them again from scratch.

Any help, answers, or guidance would be extremely appreciated!

@omohokcoj
Copy link
Contributor

@0penSourcerer did you move ./docuseal folder and ./pg_data ? with default docker compose file those folders are mounted on disk (but not on docker volumes)

@0penSourcerer
Copy link
Author

@0penSourcerer did you move ./docuseal folder and ./pg_data ? with default docker compose file those folders are mounted on disk (but not on docker volumes)

All of my persistent data in my DocuSeal folder was moved, which includes the DocuSeal data, the DocuSeal Postgres data, and the Redis data.

@omohokcoj
Copy link
Contributor

@0penSourcerer can you please docker exec sh into docuseal app container and ls/tree /data directory to see if it contains the files ?

@0penSourcerer
Copy link
Author

@0penSourcerer can you please docker exec sh into docuseal app container and ls/tree /data directory to see if it contains the files ?

The structure inside of my data folder looks like this:

Image

...and all the Postgres data is there as well:

Image

Before I migrated all my data, I had properly stopped the container, and made snapshots of everything. After I reinstalled Docker and moved all my persistent data, I simply copied everything as it was before.

@omohokcoj
Copy link
Contributor

@0penSourcerer make sure you also mounted the folders correctly on the docker-compose file

@0penSourcerer
Copy link
Author

@0penSourcerer make sure you also mounted the folders correctly on the docker-compose file

They are all mounted properly. My compose file remained untouched except for changing:

  • /volume1/docker/docuseal/data:/data
  • /volume1/docker/docuseal/postgres:/var/lib/postgresql/data
  • /volume1/docker/docuseal/redis:/data

to

  • /volume2/docker/docuseal/data:/data
  • /volume2/docker/docuseal/postgres:/var/lib/postgresql/data
  • /volume2/docker/docuseal/redis:/data

...with each path related to DocuSeal, Postgres, and Redis, respectively.

I had only set up a single user (the admin), and it recognizes my admin account and password, then prompts me to enter my TOTP code, which I never changed after setting it up the first time, and whose secret has remained untouched inside of my TOTP management vault since initial setup. After entering the TOTP code, I'm redirected back to the login page and given the "Invalid Email or Password" error.

If I try purposefully entering an incorrect user and/or email, I'm not even offered the option to enter a TOTP code, as the first step authorization is obviously incorrect.

@omohokcoj
Copy link
Contributor

@0penSourcerer it probbaly means that the password was correct as you were redirected to the TOTP step - maybe your phone/server time is out of sync that's why TOTP doesn't work

@0penSourcerer
Copy link
Author

@0penSourcerer it probbaly means that the password was correct as you were redirected to the TOTP step - maybe your phone/server time is out of sync that's why TOTP doesn't work

Unfortunately I've checked that too, and I've always had a "TZ=my time zone" set as an environmental variable inside of the compose file since I initially built my DocuSeal instance.

@omohokcoj
Copy link
Contributor

@0penSourcerer psql into the database and UPDATE users SET otp_required_for_login = false;

@0penSourcerer
Copy link
Author

@0penSourcerer psql into the database and UPDATE users SET otp_required_for_login = false;

Image

I set that variable to false, and restarted my DocuSeal stack, but I'm still being prompted for a TOTP code after entering my admin/password set.

@omohokcoj
Copy link
Contributor

omohokcoj commented Feb 27, 2025

@0penSourcerer can you please run UPDATE users SET otp_required_for_login = false; and share a screenshot of SELECT otp_require_for_login FROM users;

@0penSourcerer
Copy link
Author

Thank you for taking the time to help -- it's greatly appreciated. I finally got everything sorted out. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants