Skip to content
IPSERVERONE
Online Documentation and Support
IPSERVERONE

    24x7 Hotline+603 2026 1688

    • Applications and Software
      • Content Management System
      • Installation, Upgrading & Licensing
      • Permissions
      • Plugins
      • Scheduled Tasks
      • Troubleshooting
      • User Guide
    • Control Panel User Management
      • cPanel
      • DirectAdmin
      • Plesk
      • VestaCP
      • Website Panel
      • Cronjob
    • Database
      • MSSQL
      • MySQL
    • DNS & Domain
      • DNS
      • Domain
    • Educational
      • DNS & Domain
      • Email
      • Installation & Licensing
      • Metrics
      • Miscellaneous
      • Network
      • Operating System
      • Performance
      • Security
      • SSL
      • User Access
      • Website
    • Email
      • Account Settings
      • Backup
      • Common Fixes
      • Domain
      • Email Client
      • Email Server
      • Features
      • Importing & Exporting Data
      • Jaring
      • Mailer
      • Miscellaneous
      • Newsletter
      • Notifications
      • Security
      • Server Configuration & Management
      • Spam & Content Filtering
      • Troubleshooting
      • User Configuration & Management
      • Website
    • Networking & Security
      • Access Control
      • Bandwidth
      • Content Delivery Network
      • Firewall
      • IP Management
      • Malware
      • Networking
      • Notifications
      • rsync
      • Security
      • SSL
      • VPN
      • Web Application Firewall
      • Website Crawling
      • Website Issues
    • Portal
      • Billing & Payment
      • Getting Started
      • My Account
      • My Products
      • Need Help
      • Overview
      • Placing an Order
    • Programming & Scripting
      • Cronjob
      • .NET
      • ASP
      • Email
      • Installation & Updates
      • Logs
      • Miscellaneous
      • Pear Mail
      • PERL
      • PHP
      • Scripting
      • Troubleshooting
      • Windows Tasks Scheduler
    • Storage & File Management
      • Backup & Recovery
      • Data Migration
      • Disk Space Management
      • File Access Control
      • File Management
      • FTP
      • Installation
      • Storage
      • Troubleshooting
    • System
      • Cronjob
      • Domain
      • FAQ
      • FiDrive
      • Installation & Updates
      • Performance & Optimisation
      • Troubleshooting
      • User Access
      • Virtualisation
      • Web Server
    • Website Management
      • Logs
      • PHP
      • Redirecting Websites
      • Troubleshooting
      • Website Configuration
      • Website Setup

    Search Our Database

    Directadmin | Enabling Two-Factor Authentication (2FA) for DirectAdmin Administrators

    Last updated on Sep 6,2025 |
    under
    Cloud, DirectAdmin, Getting Started, Portal
    |
    by Wong Lli Lli

    Introduction

    DirectAdmin administrator accounts can manage hosting users, website services, and important server settings. If an administrator password is exposed or reused, an unauthorized login could affect the wider hosting environment. Two-Factor Authentication (2FA) adds a second check that helps protect these privileged accounts even when a password has been compromised.

    DirectAdmin supports time-based one-time passwords (TOTP) generated by authenticator applications such as Google Authenticator, Microsoft Authenticator. This guide walks through the Evolution Skin setup for the admin account, including changing from the Enhanced Skin, testing the new login, checking optional server settings, and handling access recovery.

    Diagram showing a user connecting to DirectAdmin with an additional 2FA step
    Figure 1: 2FA connection overview; use HTTPS for real DirectAdmin login sessions.

    Why this matters

    • Protects administrative access: A password alone is not sufficient for a normal account login after 2FA is enabled.
    • Reduces credential-attack risk: Time-limited codes add a barrier to attacks using stolen or guessed passwords.
    • Supports safer hosting operations: Protecting privileged access helps reduce the chance of unauthorized changes to hosted services.

    2FA complements strong passwords, HTTPS, and good account management; TOTP alone does not prevent every phishing attack.

    Prerequisites

    • Working access to the DirectAdmin admin account and its HTTPS login page.
    • A supported authenticator application on a mobile device.
    • An authorized recovery route such as the Customer Portal console or another approved server administrator.
    • A secure location for storing one-time scratch/recovery codes.

    Important: Enabling 2FA changes the login process for the account being configured. Keep your existing session open until you have verified a separate login and securely stored scratch codes. Never share or publish the TOTP secret, its QR code, or recovery codes.

    Step-by-step guide

    Part A: Switch from Enhanced to Evolution Skin (if required)

    If your admin account already uses the Evolution Skin, skip this part and continue to Part B. The screenshot below shows the older Enhanced Skin interface; menu labels may differ between DirectAdmin releases.

    Step 1: Sign in to DirectAdmin and locate the admin account

    1. Log in to DirectAdmin as the admin user.
    2. In the Enhanced Skin, select the User view, then locate the admin account.
    3. Open admin’s User Data to access the skin preference.
    Older DirectAdmin Enhanced Skin illustrating the User tab, admin user data, and Evolution skin selection
    Figure 2: Enhanced-to-Evolution and Save Skin action.

    Step 2: Select Evolution and save the skin setting

    1. Under the account skin setting, select Evolution.
    2. Click Save Skin (or Save in the installed version).
    3. Confirm that the admin interface now loads with the Evolution layout.

    Part B: Enable Two-Step Authentication for admin

    Step 3: Open the Two-Step Authentication settings

    1. Log in using the admin account in Evolution.
    2. Open the password/account menu and select Two-Step Authentication. Depending on the skin layout, the option may appear under account settings.
    3. Confirm that the Two-Step Authentication page opens, then select Generate Secret.
    DirectAdmin Evolution Two-Step Authentication screen showing the Generate Secret action and recovery codes area

    Figure 3: Original Evolution Skin screenshot showing the Two-Step Authentication section and Generate Secret button.

    Step 4: Pair your authenticator and test the code

    1. In your authenticator app, choose the option to scan a QR code (or enter a setup key manually).
    2. Scan the unique QR code generated in DirectAdmin. Treat it like a password.
    3. Enter the current six-digit code displayed by the app into the Test Code field and select Test Code or Check.
    4. Confirm that DirectAdmin accepts the test code. If not, check the time settings on both the server and phone before retrying.

    Note: Older DirectAdmin versions show a checkbox labelled Require valid Two-Step Authentication Code to login to this account. The exact form and controls can differ in newer Directadmin releases.

    Step 5: Require a 2FA code and save the account settings

    1. Enable the account-level setting that requires two-step verification for login. In the older screenshot, this is the Require valid Two-Step Authentication Code to login to this account checkbox.
    2. Click Save to apply the setting.
    3. Return to the authentication page and confirm that 2FA is enabled for the admin account.

    Important distinction: This protects the current administrator account. It does not require all DirectAdmin users or resellers to enrol in 2FA.

    Step 6: Generate and store scratch (recovery) codes

    1. Open the Recovery Codes or Scratch Codes section.
    2. Generate the available one-time codes and save them in a secure location separate from the authenticator device.
    3. Confirm the codes are accessible through your approved recovery procedure before closing the working session.

    Expected result: You have an alternative login method if your mobile device is lost. Each DirectAdmin scratch code is valid for one use only.

    Step 7: Test the login from a fresh browser session

    1. Open a new private/incognito browser window and navigate to your DirectAdmin HTTPS login URL.
    2. Enter the admin username and password.
    3. At the second verification prompt, enter the current TOTP code from your authenticator app.
    4. Verify that DirectAdmin opens the administrator dashboard only after the second step succeeds.

    Check: If the new login works, you can end the original browser session. A browser previously marked as trusted may behave differently, so use a fresh session for verification.

    Optional: Check or enable the server-wide feature switch using CLI

    These commands manage whether DirectAdmin offers two-step authentication. They do not automatically enforce enrolment for every DirectAdmin account. Perform configuration changes only with approved administrator access and recovery access available.

    1. Check the current setting:

    da config-get twostep_auth

    A returned value of 1 means the feature is enabled; this is normally the default. If disabled and a change is approved, enable it using:

    da config-set twostep_auth 1
    systemctl restart directadmin

    2. Verify the setting:

    da config-get twostep_auth

    DirectAdmin also documents twostep_auth_trust_days for trusted-browser behavior. Do not copy legacy settings blindly: max_twostep_auth_attempts was removed in DirectAdmin 1.669.

    Optional: Recover from failed logins or IP blacklisting

    Repeated incorrect passwords or verification codes can trigger DirectAdmin brute-force protections. If the legitimate administrator becomes blocked, first confirm the correct source IP and verify that the lockout is not part of an ongoing attack.

    1. Use an approved console or another authorized administrator session to review the affected source IP.
    2. The DirectAdmin blacklist is stored at the path below. Remove only an entry that has been positively identified as an authorized administrator address, following your change policy.
    3. Retry one normal login using a fresh valid TOTP code. Avoid repeated guesses.
    /usr/local/directadmin/data/admin/ip_blacklist

    DirectAdmin also supports an administrative IP whitelist at the following path, but permanent allowlisting should be a separately approved security decision—not a routine workaround for an incorrect OTP:

    /usr/local/directadmin/data/admin/ip_whitelist

    Verification

    • Account protection: Confirm the admin account shows 2FA enabled and a fresh login requires a TOTP code.
    • Recovery readiness: Confirm that valid unused scratch codes are stored securely.
    • Scope: Check other DirectAdmin accounts separately; the admin account setup does not enforce 2FA for every user.

    References

    • DirectAdmin — Two-Step Authentication
    • DirectAdmin — Configuring DirectAdmin
    • DirectAdmin — Version 1.670 authentication updates
    • IP ServerOne — Changing from Enhanced to Evolution

    Through technology, we learn. Through sharing, we connect.

    Explore more guides at https://kb.ipserverone.com/

    For technical support / service enquiries, please reach out to support@ipserverone.com for assistance.


    Related Article

    Related Posts

    • Directadmin | Securing phpMyAdmin in DirectAdmin
    • Directadmin | Performing Routine Maintenance – System Updates and DirectAdmin Software Update
    • Security | Securing Web Traffic using Modsecurity and Cloudflare
    • Security | Securing Web Traffic using Modsecurity
    • How to deploy MongoDB or MongoDB Cluster using One-Click Applications in Customer Portal
    « Directadmin | Performing Routine Maintenance – System Updates and DirectAdmin Software Update » Directadmin | Securing phpMyAdmin in DirectAdmin
    Back to KB Homepage
    • Applications and Software
      • Content Management System
      • Installation, Upgrading & Licensing
      • Permissions
      • Plugins
      • Scheduled Tasks
      • Troubleshooting
      • User Guide
    • Control Panel User Management
      • cPanel
      • DirectAdmin
      • Plesk
      • VestaCP
      • Website Panel
      • Cronjob
    • Database
      • MSSQL
      • MySQL
    • DNS & Domain
      • DNS
      • Domain
    • Educational
      • DNS & Domain
      • Email
      • Installation & Licensing
      • Metrics
      • Miscellaneous
      • Network
      • Operating System
      • Performance
      • Security
      • SSL
      • User Access
      • Website
    • Email
      • Account Settings
      • Backup
      • Common Fixes
      • Domain
      • Email Client
      • Email Server
      • Features
      • Importing & Exporting Data
      • Jaring
      • Mailer
      • Miscellaneous
      • Newsletter
      • Notifications
      • Security
      • Server Configuration & Management
      • Spam & Content Filtering
      • Troubleshooting
      • User Configuration & Management
      • Website
    • Networking & Security
      • Access Control
      • Bandwidth
      • Content Delivery Network
      • Firewall
      • IP Management
      • Malware
      • Networking
      • Notifications
      • rsync
      • Security
      • SSL
      • VPN
      • Web Application Firewall
      • Website Crawling
      • Website Issues
    • Portal
      • Billing & Payment
      • Getting Started
      • My Account
      • My Products
      • Need Help
      • Overview
      • Placing an Order
    • Programming & Scripting
      • Cronjob
      • .NET
      • ASP
      • Email
      • Installation & Updates
      • Logs
      • Miscellaneous
      • Pear Mail
      • PERL
      • PHP
      • Scripting
      • Troubleshooting
      • Windows Tasks Scheduler
    • Storage & File Management
      • Backup & Recovery
      • Data Migration
      • Disk Space Management
      • File Access Control
      • File Management
      • FTP
      • Installation
      • Storage
      • Troubleshooting
    • System
      • Cronjob
      • Domain
      • FAQ
      • FiDrive
      • Installation & Updates
      • Performance & Optimisation
      • Troubleshooting
      • User Access
      • Virtualisation
      • Web Server
    • Website Management
      • Logs
      • PHP
      • Redirecting Websites
      • Troubleshooting
      • Website Configuration
      • Website Setup
    Back to KB Homepage
    Back to KB Homepage
    © Copyright IP ServerOne Solutions Sdn Bhd 2003 - 2025

    IP ServerOne is ISO 27001, ISO 27017, PCI-DSS, and SOC 2 Type II Certified.

    ISO Certificate No: IS 651738 | Applicable to Malaysia Data Center only

    Go to Top