Migrating a Mastodon account is a common task when you switch instances or want a new username. The process involves moving your followers, profile, and settings to a new account. If you have two-factor authentication (2FA) enabled on your old account, you need to disable it before starting the migration. This article explains why 2FA blocks the migration and provides the exact steps to disable it, initiate the move, and re-enable 2FA on the new account.
Without disabling 2FA, the migration wizard will fail because Mastodon cannot generate the required verification code. The fix takes less than five minutes and does not require reinstalling your authenticator app. After reading this guide, you can complete the migration without losing any followers or data.
Key Takeaways: Migrating a Mastodon Account With 2FA Enabled
- Settings > Account > Two-factor Auth > Disable: Turn off 2FA on the old account before starting the migration process.
- Preferences > Account > Move to a different account: Enter the new account username and generate a migration code from the new account.
- Settings > Account > Two-factor Auth > Setup: Re-enable 2FA on the new account after the migration completes.
Why Two-Factor Authentication Prevents Account Migration
Mastodon requires you to confirm account ownership during migration by entering a verification code. When 2FA is active, the code is generated by your authenticator app. However, the migration interface cannot accept this dynamic code because it expects a static alphanumeric key called a migration code. The migration code is a one-time string that you create on the new account and paste into the old account. If 2FA is enabled, Mastodon blocks the creation of this code to prevent unauthorized moves.
The technical reason is that 2FA adds an extra authentication layer that conflicts with the migration handshake protocol. Mastodon developers designed the migration flow to work with password-based verification only. Disabling 2FA temporarily removes this conflict. After the migration, you can set up 2FA on the new account without any restrictions.
Steps to Disable 2FA and Migrate Your Mastodon Account
Follow these steps in order. You need access to both your old account and your new account. Have your authenticator app ready for the 2FA codes.
- Log in to your old Mastodon account
Open your old instance website and sign in with your username and password. If prompted, enter the 2FA code from your authenticator app. - Go to Settings > Account > Two-factor Auth
On the left sidebar, click Preferences or Settings depending on your theme. Then select Account and find the Two-factor Auth section. - Click the Disable button
Click the Disable button next to your current 2FA method. Mastodon asks you to confirm by entering your current password. Type your password and click Confirm. 2FA is now turned off for this account. - Log out of the old account
Click your profile avatar in the top right corner and select Log out. Keep this browser tab open; you will return to it later. - Create your new Mastodon account
Open a new browser tab and go to the instance where you want your new account. If you are staying on the same instance, create a new username. Complete the signup process and verify your email address. - Go to Preferences > Account > Move from a different account
On the new account, click Preferences (or Settings), then Account. Scroll down to the Move from a different account section. - Generate a migration code
Click the Create migration code button. Mastodon displays a long string of characters. Copy this code to your clipboard. Do not close this page until the migration is complete. - Return to the old account and start migration
Go back to the old account browser tab. Click Preferences > Account > Move to a different account. Paste the migration code into the text field. Enter your old account password and click Move followers. - Confirm the migration
Mastodon processes the request and displays a success message. Your old account profile now shows a redirect notice. All followers from the old account receive a notification and are automatically moved to the new account. - Enable 2FA on the new account
On the new account, go to Settings > Account > Two-factor Auth. Click Set up. Scan the QR code with your authenticator app and enter the generated code to verify. Click Enable.
What to Do If the Migration Fails After Disabling 2FA
Migration Code Expired Before Pasting
Migration codes expire after 10 minutes for security reasons. If you waited too long, generate a new code on the new account and paste it immediately into the old account. Keep both browser tabs open side by side.
Old Account Password Not Accepted
If Mastodon rejects your password, you may have caps lock enabled or an incorrect keyboard layout. Use the password reveal button to check your typing. If you forgot the password, use the password reset link on the login page before retrying the migration.
Followers Not Moving After Migration
Follower migration can take up to 24 hours because Mastodon instances process the move asynchronously. Check the new account profile after one hour. If no followers appear, verify that you entered the correct migration code. Re-run the migration process from step 6.
2FA Setup on New Account Fails
If your authenticator app does not accept the QR code, click the text link that says Or enter this code manually. Copy the alphanumeric key and paste it into your authenticator app. If the app still fails, delete the entry and try scanning the QR code again from a clean state.
Mastodon Account Migration: Old Account vs New Account Settings
| Item | Old Account | New Account |
|---|---|---|
| 2FA Status | Must be disabled before migration | Re-enable after migration |
| Migration Code | Paste code from new account | Generate code for old account |
| Follower Transfer | Automatic redirect | Receives moved followers |
| Posts and Media | Remain on old instance | Not transferred |
| Profile Bio and Avatar | Copied to new account | Can edit after migration |
After the migration, your old account displays a permanent redirect notice. You can still log in to the old account to download your archive or delete it. The new account now has all your followers, and you can customize your profile, bio, and avatar. Your posts and media do not move; only your profile information and follower list transfer. To save your old posts, use the Settings > Import and export > Export feature before starting the migration.