
Windows Server has no built-in two-factor authentication for Remote Desktop or console logons. A password alone is the only thing standing between an attacker and your server, which is why exposed RDP servers are a favourite target. You add 2FA with a credential provider, a small component that adds a second step to the Windows logon screen. This guide compares the main options and walks through setting up Duo, the most common choice, on Windows Server 2016, 2019, 2022 and 2025.
Quick answerFor one server or a small team, install Duo Authentication for Windows Logon and RDP. Duo's free plan covers up to 10 users, and after a password, users approve a push notification on their phone or enter a code. For a self-hosted option that works with Google or Microsoft Authenticator codes, use the open-source multiOTP credential provider.
Your options for Windows Server 2FA
| Option | How users approve | Cost | Best for |
|---|---|---|---|
| Duo for Windows Logon and RDP | Push, code or phone call | Free up to 10 users; paid plans above | Most small and medium setups |
| multiOTP credential provider | TOTP code (Google/Microsoft Authenticator) | Free, open source | Self-hosted, no cloud service |
| Microsoft Entra MFA via RD Gateway (NPS extension) | Microsoft Authenticator | Needs Entra ID licences | Organisations already on Microsoft 365 / Entra |
| Smart cards or security keys | Physical card or key | Hardware + PKI | High-security environments |
"Google Authenticator for Windows Server" isn't a product: Google Authenticator is only the phone app that generates codes. You still need a credential provider such as multiOTP on the server to check them.
Before you start
- Keep a way back in. Make sure you have console access (your provider's VNC/KVM console) before installing anything that changes the logon screen.
- Take a snapshot or backup of the server if you can.
- Know your users: 2FA applies to every interactive logon unless you limit it to RDP.
Set up Duo on Windows Server
Step 1: Create the application in Duo
- Sign up for Duo and open the Duo Admin Panel.
- Go to Applications → Protect an Application, search for Microsoft RDP, and click Protect.
- Note the Integration key, Secret key and API hostname.
Step 2: Install Duo on the server
- Download the Duo Authentication for Windows Logon installer on the server and run it as Administrator.
- Enter the API hostname, integration key and secret key.
- Choose the options:
- Bypass Duo authentication when offline (fail open): decide whether logons should work if the server can't reach Duo. Failing open keeps you from being locked out; failing closed is stricter.
- Only prompt for Duo authentication when logging in via RDP: tick this if you want console logons (through your provider's console) to stay password-only as an emergency route.
- Finish the installation. No restart is usually needed.
Step 3: Enrol users and test
Add users in the Duo Admin Panel (the usernames must match the Windows account names) and have them install Duo Mobile and activate it. Then open a new RDP connection, keeping your current session open: after the password, the Duo prompt should appear. Approve the push to log in.
Set up multiOTP (self-hosted TOTP)
multiOTP is a free, open-source 2FA server with a Windows credential provider that asks for a time-based code from any authenticator app.
- Download the multiOTP Credential Provider from the project's official GitHub releases page and install it on the server.
- In the setup wizard, choose whether it applies to RDP only, local logons only, or both.
- Create users and generate their QR codes with the multiOTP command-line tool, then scan each QR code in Google Authenticator or Microsoft Authenticator.
- Test in a new RDP session: after the password, Windows asks for the one-time code.
multiOTP takes more setup than Duo but doesn't depend on any cloud service.
Harden RDP as well
2FA is one layer. Also:
- Keep Network Level Authentication enabled.
- Restrict RDP to known IP addresses in the firewall, or put it behind a VPN or RD Gateway.
- Set an account lockout policy and rename or disable unused accounts.
- Keep Windows updated.
Frequently asked questions
Does Windows Server have built-in 2FA for RDP?
No. You need a credential provider such as Duo or multiOTP, or Microsoft Entra MFA through an RD Gateway.
Can I use Google Authenticator for Windows Server login?
Yes, with a credential provider that accepts TOTP codes, such as multiOTP. Google Authenticator just generates the codes on your phone.
Is Duo free for Windows Server?
Duo's free plan supports up to 10 users and includes the Windows Logon and RDP integration. Larger teams need a paid plan.
What if I lose my phone and get locked out?
Use your provider's console if you set Duo to prompt only for RDP, or use a bypass code from the Duo Admin Panel. Plan this before enabling 2FA.


