Back to Blog

Setting Up Two-Factor Authentication for OpenClaw

Two-Factor Authentication (2FA) is an essential security measure that adds an extra layer of protection to your OpenClaw Hub account. By requiring a second form of verification in addition to your password, 2FA helps safeguard your account from unauthorized access. In this tutorial, we will walk you through the steps of enabling and setting up 2FA for your OpenClaw account. ## Prerequisites Before you begin, ensure you have the following: 1. **OpenClaw Account**: You need to have an active account on OpenClaw. 2. **Mobile Device**: A smartphone or tablet with a 2FA app installed (e.g., Google Authenticator, Authy, or any other compatible app). 3. **Internet Connection**: Access to the internet during the setup process. ## Step-by-Step Instructions ### Step 1: Log into Your OpenClaw Account 1. Open your web browser and navigate to the **OpenClaw Hub** login page. 2. Enter your username and password, then click on the **Log In** button. ### Step 2: Navigate to Security Settings 1. Once logged in, locate your user profile icon, typically found in the top-right corner of the page. 2. Click on the icon to reveal a dropdown menu and select **Settings** or **Account Settings**. 3. In the settings menu, look for the **Security** tab and click on it. ### Step 3: Enable Two-Factor Authentication 1. In the Security settings, locate the **Two-Factor Authentication** section. 2. You will see an option to **Enable 2FA**. Click on this option. 3. OpenClaw will present a QR code and a backup code. This QR code is necessary for setting up your 2FA app. ### Step 4: Set Up Your 2FA App 1. Open your 2FA app (Google Authenticator, Authy, etc.) on your mobile device. 2. **Add a New Account**: - In Google Authenticator, tap on the **+** icon and choose **Scan a QR code**. - In Authy, tap on **Add Account** and select **Scan QR Code**. 3. Point your device’s camera at the QR code displayed on the OpenClaw screen. The app will automatically recognize it and add your OpenClaw account. 4. The app will generate a 6-digit code for your OpenClaw account. ### Step 5: Verify the 2FA Setup 1. Enter the 6-digit code generated by your 2FA app into the **Verification Code** field on the OpenClaw page. 2. Click the **Verify** button. 3. If the code is correct, you will receive a confirmation that 2FA has been successfully enabled. ### Step 6: Save Backup Codes 1. **Backup Codes**: OpenClaw provides backup codes for account recovery. Write these down and store them in a secure location. 2. In case you lose access to your 2FA app, you can use these codes to regain access to your account. ### Step 7: Log Out and Test 2FA 1. Log out of your OpenClaw account. 2. Attempt to log back in. After entering your username and password, you should be prompted to enter the 2FA code generated by your app. 3. Open your 2FA app, retrieve the code, and enter it into the OpenClaw login page to complete the authentication process. ## Troubleshooting Tips - **App Not Generating Codes**: Ensure that your mobile device’s time settings are correct. The 2FA app relies on time synchronization to generate the correct codes. Set your device to automatically sync time. - **Code Does Not Work**: Make sure you are entering the code promptly. The codes expire every 30 seconds. Also, double-check that you are using the code for the correct account. - **Lost Access to 2FA App**: If you cannot access your 2FA app, use one of the backup codes provided during the setup. If you no longer have access to your backup codes, you may need to contact OpenClaw support for account recovery. - **Account Lockout**: Repeatedly entering the wrong 2FA code can lead to temporary account lockout. Wait a few minutes before trying again. ## Final Notes Congratulations! You’ve successfully set up Two-Factor Authentication for your OpenClaw account. This additional layer of security significantly reduces the risk of unauthorized access and helps keep your data safe. ## Next Steps Now that you have enhanced your account security, consider exploring the following topics: - [Managing Account Security Settings](#) - [Recovering Your OpenClaw Account](#) - [Best Practices for Online Security](#) By taking these further steps, you can ensure that your experience with OpenClaw is both secure and seamless. Happy developing!