How to disable Two-Factor Authentication (2FA) on Cyberpanel login.

Sometimes you may be trying to access Cyberpanel but into a screen that asks you to input a Two-Factor Authentication (2FA), which you have never set and yet you do not know where to get. Well, you can as well disable it. Please be guided below; Prerequisites: Step 1: Connect to the Server via SSH [

Last updated 30 Nov 2026Also in: CyberPanel, Security

Sometimes you may be trying to access Cyberpanel but into a screen that asks you to input a Two-Factor Authentication (2FA), which you have never set and yet you do not know where to get. Well, you can as well disable it. Please be guided below;

Prerequisites:

  • SSH Access to the server running CyberPanel.
  • Root or Sudo Privileges for performing administrative tasks on the server.

Step 1: Connect to the Server via SSH

  • Connect to your server using SSH. If you do not know how to, refer here

Step 2: Enter the MySQL Command Line

  • Once logged into your server, use the following command to retrieve the MySQL root password stored by CyberPanel and log into MySQL as the root user:
MYSQL_PWD=`cat /etc/cyberpanel/mysqlPassword` mysql -uroot

Step 3: Switch to the CyberPanel Database

  • To start interacting with CyberPanel’s database, enter the following command:
USE cyberpanel;
  • You should see a message indicating the database has been changed.

Step 4: Disable 2FA for the Admin Account

  • To disable 2FA for the admin account, execute the following SQL command:
UPDATE `loginSystem_administrator` SET `twoFA` = '0' WHERE `loginSystem_administrator`.`id` = 1;
  • You will see a success message such as the one in the image below

  • Even if no rows were changed, the command will still disable 2FA for the admin account as long as the matched rows is greater than 0.

Step 5 : Clear Browser Cache then Log Back into CyberPanel

  • Before attempting to log back into CyberPanel, clear your browser cache. This will ensure that any cached 2FA login requests are removed.
  • Now try to access your CyberPanel login page using the admin credentials. Two-Factor Authentication should no longer be required.

Was this article helpful?