๐ŸŸข Network Status| First month from $2.00 โ€” fully managed | Contact Support
Skip to content
Need help? Real engineers available 24/7. Average response under 15 minutes. Open a support ticket โ†’

Two-Factor Authentication in DirectAdmin โ€‹

Two-factor authentication (2FA) adds a second verification step to DirectAdmin logins. Even if a password is compromised, an attacker can't log in without the time-based code from an authenticator app.

Enabling 2FA for your account โ€‹

  1. Log into DirectAdmin.
  2. Click your username at the top right โ†’ Two-Factor Authentication.
  3. Click Enable Two-Factor Authentication.
  4. Scan the QR code with an authenticator app โ€” Google Authenticator, Authy, or 1Password all work.
  5. Enter the 6-digit code shown in the app to verify it's working.
  6. Click Verify and Enable.
  7. Save the backup codes shown โ€” store them somewhere safe. These let you log in if you lose access to your authenticator app.
โš 
Save your backup codes immediately
If you lose your authenticator device and don't have backup codes, you can only recover access via server SSH. Save the codes in a password manager as soon as they're shown.

Logging in with 2FA enabled โ€‹

  1. Enter your username and password as normal
  2. On the next screen, enter the 6-digit code from your authenticator app
  3. Click Verify

The code refreshes every 30 seconds. Enter it before it expires.

Requiring 2FA for all users (admin) โ€‹

As Admin you can require 2FA for all resellers and users:

  1. Admin Level โ†’ Administrator Settings
  2. Find Two-Factor Authentication
  3. Set to Required for resellers, users, or both
  4. Save

Users who haven't set up 2FA will be prompted to do so on next login.

Disabling 2FA (account recovery) โ€‹

If a user has lost their authenticator app and backup codes:

  1. Log into the server via SSH as root
  2. Run:
    bash
    # Find the user's DirectAdmin config
    cat /usr/local/directadmin/data/users/USERNAME/user.conf | grep twofa
    
    # Disable 2FA for the user
    sed -i "s/twofa=1/twofa=0/" /usr/local/directadmin/data/users/USERNAME/user.conf
  3. The user can now log in with password only and re-enable 2FA
AppPlatformsNotes
AuthyiOS, Android, DesktopBacks up codes to cloud
Google AuthenticatoriOS, AndroidSimple, no cloud backup
1PasswordAll platformsIntegrated with password manager
BitwardenAll platformsOpen source, free tier available

Managed hosting that actually manages.