Password and Passkey Recovery
This guide helps administrators recover access to their Wizarr instance when locked out due to forgotten passwords or lost passkeys.
Recovery Tool Overview
The recovery tool is a command-line utility designed to help administrators regain access when locked out. It provides emergency recovery options for common authentication issues.
Key Features
Password Reset: Reset passwords for admin accounts
Passkey Management: Remove all passkeys for specific admin accounts
Emergency Admin: Create emergency admin accounts
Account Listing: View all admin accounts and their passkey status
Container-Friendly: Designed to work seamlessly in Docker containers
When to Use the Recovery Tool
Use the recovery tool in these situations:
Forgotten Password: You cannot remember your admin password
Lost Passkey: Your passkey device is lost or broken
2FA Lockout: You're locked out due to passkey 2FA requirements
Complete Lockout: All admin accounts are inaccessible
Running the Recovery Tool
Docker Container
For Docker installations:
# Find your container name
docker ps
# Run it directly
docker exec -it <container_name> uv run recovery_tool.py
Recovery Options
The recovery tool provides five main options:
1. List All Admin Accounts
View all administrators and their current status:
Username and ID
Number of registered passkeys
Account creation date
Legacy admin status
2. Reset Admin Password
Change the password for any admin account:
Select the admin account from the list
Enter a new password (minimum 6 characters)
Confirm the password
The password is immediately updated
3. Remove All Passkeys
Delete all passkeys for a specific admin account:
Select the admin account
Confirm the operation (this cannot be undone)
All passkeys are removed
2FA requirement is disabled for that account
4. Create Emergency Admin
Create a new admin account with password authentication:
Enter a username (must be unique)
Set a password (minimum 6 characters)
Confirm the password
New admin account is created immediately
5. Exit
Close the recovery tool safely.
Common Recovery Scenarios
Scenario 1: Forgotten Admin Password
Problem: You remember your username but forgot your password.
Solution:
Run the recovery tool
Select option 2 (Reset admin password)
Choose your admin account
Enter a new password
Log in with the new password
Scenario 2: Lost Passkey Device
Problem: Your passkey device is lost, broken, or unavailable.
Solution:
Run the recovery tool
Select option 3 (Remove all passkeys for admin)
Choose your admin account
Confirm the removal
Log in with username/password (2FA disabled)
Scenario 3: Complete Lockout
Problem: All admin accounts are inaccessible.
Solution:
Run the recovery tool
Select option 4 (Create emergency admin account)
Create a new admin account
Log in with the emergency account
Manage other accounts through the web interface
Delete the emergency account when no longer needed
Scenario 4: 2FA Lockout
Problem: You're locked out due to passkey 2FA requirements.
Solution:
Run the recovery tool
Select option 3 (Remove all passkeys for admin)
Choose your admin account
Confirm passkey removal
Log in with username/password only
Security Considerations
Important Security Notes
Only run this tool when you have direct access to the server/container
The tool requires database access and should only be used by system administrators
Anyone with server access can use this tool to gain admin privileges
After Recovery
Once you regain access, consider these security steps:
Update Passwords: Change passwords for all admin accounts
Re-register Passkeys: Set up new passkeys for 2FA
Review Admin Access: Audit who has admin privileges
Delete Emergency Accounts: Remove temporary accounts when no longer needed
Secure Server Access: Ensure only authorized personnel can access the server
System Requirements
The recovery tool requires:
Access to the server or container running Wizarr
Read/write access to the database
Proper Flask environment configuration
Python execution privileges
Environment Configuration
The tool automatically uses your existing Wizarr configuration. Ensure these environment variables are set if needed:
DATABASE_URL
- Database connection stringFLASK_ENV
- Flask environment (development/production)SECRET_KEY
- Flask secret key
Troubleshooting
Common Issues
Import Error
Ensure you're running the tool from the Wizarr root directory
Check that all dependencies are installed
Database Connection Error
Verify the database is accessible
Check that the Flask environment is properly configured
Permission Error
Ensure you have write access to the database
Check file permissions on the database file
Tool Output
The recovery tool provides clear feedback:
✅ Success messages for completed operations
❌ Error messages for failed operations
⚠️ Warning messages for destructive operations
ℹ️ Information messages for status updates
Best Practices
Regular Backups: Keep database backups before making changes
Test Access: Verify you can log in after making changes
Document Changes: Keep records of recovery actions taken
Secure Storage: Store recovery procedures in a secure location
Regular Reviews: Periodically review admin account access
Support
If you encounter issues with the recovery tool:
Check the troubleshooting section above
Verify database connectivity
Ensure proper permissions
Review Flask application logs for additional details
Contact support through the official channels
Last updated
Was this helpful?