> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# How to Enable Two-Step Authentication (2FA) in DirectAdmin

:::info

If you are using the Standard theme on DirectAdmin, switch to the Refreshed theme as shown in [How to change theme or layout on DirectAdmin](https://wiki.crowncloud.net/?How_to_change_theme_or_layout_on_DirectAdmin).

:::

## In the Refreshed Theme


### Log in to DirectAdmin
Log in to your DirectAdmin panel.
### Open Two-Step Authentication
Click the **Two-Step Authentication** button under **Advanced Features**.
<img alt="Two-Step Authentication under Advanced Features" src={image0} />
### Generate a secret
Click **Generate Secret**.
<img alt="Generate Secret button" src={image1} />
### Add the secret to your authentication app
Enter the code displayed, or scan the QR code, in your authentication app. Then click the **X** button.
<img alt="QR code and secret" src={image2} />
### Require the code at login
Tick the box **Require valid Two-Step Authentication Code to login to this account**.
<img alt="Require two-step code checkbox" src={image3} />
### Save the settings
Click **Save** to enable Two-Step Authentication (2FA) in DirectAdmin.
<img alt="Save button" src={image4} />

## In the Standard Theme


Click here to show the steps

### Log in to DirectAdmin
Log in to your DirectAdmin panel.
### Open Two-Step Authentication
Click the **Two-Step Authentication** button under **Advanced Features**.
<img alt="Two-Step Authentication under Advanced Features" src={image5} />
### Generate a secret
Click **Generate Secret**.
<img alt="Generate Secret button" src={image6} />
### Add the secret to your authentication app
Enter the code displayed, or scan the QR code, in your authentication app. Then click the **X** button.
<img alt="QR code and secret" src={image7} />
### Require the code at login
Tick the box **Require valid Two-Step Authentication Code to login to this account**.
<img alt="Require two-step code checkbox" src={image8} />
### Save the settings
Click **Save** to enable Two-Step Authentication (2FA) in DirectAdmin.
<img alt="Save button" src={image9} />
