A DigitalOcean account runs your servers, databases and DNS, and pays for them: whoever signs in can read your data, destroy your Droplets or start machines billed to you. DigitalOcean already emails a code when you sign in from a new device, but that only adds your email password to the hurdle. It strongly recommends 2FA on every account.
Turn on two-factor authentication at DigitalOcean
2FA is available only when you log in to DigitalOcean with a username and password. If you log in with Google or GitHub, you manage 2FA in that Google or GitHub account instead. DigitalOcean also asks for a backup method once the main one is set up — choose backup codes, the option it recommends.
- Log in to the DigitalOcean Control Panel at cloud.digitalocean.com on your computer.
- In the top right corner, click the profile icon, then “My Account”.
- Scroll to the “Two-factor authentication” section and click “Set Up 2FA”.
- In the “Set up two factor authentication” window, under “Choose Method”, choose the authentication app.
- When DigitalOcean shows a QR code, leave that page open and add it to the extension as described below — or click “Try this instead” under it for a code to enter manually — then enter the code from the extension in the field provided.
Add DigitalOcean to Authenticator
- Install 2FA Authenticator from the Chrome Web Store and pin it to the toolbar, so its icon is one click away.
- Leave the DigitalOcean page with the QR code open. Click the Authenticator icon, then “Add Account” → “QR Code” → “Scan QR from screen”.
- The account appears in the list with a six-digit code that changes every 30 seconds. Rename it if you like — the name is only for you.
- Go back to DigitalOcean and type the current code into the confirmation field. If it is about to expire, wait for the next one.
- DigitalOcean confirms that two-factor authentication is on. From now on it will ask for a code when you sign in — click the extension icon and copy it.
No QR code, or it will not scan? Look for the option to enter a key manually on DigitalOcean’s setup screen, copy the key, and add it in the extension with “Add Account” → “Manual” → “Secret Key”.
Get 2FA Authenticator for Chrome — freeDownload your DigitalOcean backup codes
Choose backup codes as your backup method: they appear on the screen, and you can download them as a text file called digitalocean_backupcodes.txt. Keep it somewhere you can reach without this computer. Each code works once; when only a few are left, generate more — the remaining old ones stop working. DigitalOcean recommends backup codes over a second authenticator app, which it offers as a backup only when the main method is SMS.
The code is not accepted?
Most often the QR code changed: the website makes a new one each time its setup page is reloaded or opened again, so the account you added first no longer matches. Start the setup again, add the QR code that is on the screen now and type its code in straight away. Two entries for the same website? Use the newest. Other reasons: why codes are refused.
Typed the key in by hand? Paste it into the TOTP code generator and compare the code with the one in the extension. If they differ, the key was copied wrong — add the account again.
Questions
- Can I use DigitalOcean 2FA without a phone?
- Yes. DigitalOcean names phone apps such as Google Authenticator, Authy, 1Password, Microsoft Authenticator and Duo, but it checks only the code, and any authenticator that makes standard time-based codes works. The Authenticator extension reads the QR code straight off the Control Panel and keeps the codes in Chrome.
- What if I lose access to my authenticator?
- Sign in with one of your backup codes — if you cannot find them, search your computer for digitalocean_backupcodes.txt, the file’s default name. If your backup method does not work either, submit a ticket to DigitalOcean support to restore access to your account.
- I log in to DigitalOcean with Google or GitHub. Where is 2FA?
- In that Google or GitHub account. DigitalOcean’s own 2FA setting is only for logins with a username and password; with Google or GitHub sign-in, turning on 2-Step Verification there protects your DigitalOcean login as well.
- How do I switch DigitalOcean to a different authenticator app?
- Disable 2FA on the My Account page, then set it up again with the new app — DigitalOcean shows a new QR code. Remove the old DigitalOcean entry from the extension afterwards, so you do not copy a code that no longer works.
Your codes, one click from the login page
Authenticator keeps your 2FA codes in the browser, on your device only — free to use, open source, no account and no phone needed. Local backups and optional password protection come built in.
Get 2FA Authenticator for Chrome — free