Home Explore Blog Models CI



docker

1st chunk of `content/manuals/security/for-developers/2fa/new-recovery-code.md`
f5306a6389b0dc6d8db2f1f7e4a0e06f886989eda75bf3080000000100000329
---
description: Generate a new 2fa recovery code
keywords: Docker, docker, registry, security, Docker Hub, authentication, two-factor
  authentication, account security
title: Generate a new recovery code
aliases:
- /docker-hub/2fa/new-recovery-code/
weight: 10
---

If you have lost your two-factor authentication recovery code and still have
access to your Docker Hub account, you can generate a new recovery code.

1. Sign in to your [Docker account](https://app.docker.com/login).
2. Select your avatar and then from the drop-down menu, select **Account settings**.
3. Select **2FA**.
4. Enter your password, then select **Confirm**.
5. Select **Generate new code**.

This generates a new code. Select the visibility icon to view the code. Remember to save your recovery code
and store it somewhere safe.

Title: Generating a New 2FA Recovery Code for Docker Hub
Summary
If you've lost your 2FA recovery code but can still access your Docker Hub account, you can generate a new one through your account settings. Navigate to the 2FA section, confirm your password, and generate a new code. Make sure to save the new code in a secure location.