Where to get an administrator code for a Xiaomi lock: all ways of 2026

Xiaomi smart locks (including models under the Mi Home, Aqara and Yeelight brands) require an administrator code to set up, reset or add new users. Without this code, you won't be able to control the lock through the app, change security settings or restore access after a crash. The problem is that the manufacturer rarely specifies the standard code in the documentation, and users often lose or forget it after the initial setup.

This article will help you understand where to look for the factory administrator code for your lock model, how to reset it through official and informal methods, and what to do if the previous owner did not provide access. We analyzed the instructions for popular models (including Xiaomi Mi Smart Door Lock, Aqara N100/N200, Yeelight Smart Lock) and collected current data for 2026.

1. Standard Administrator Codes for Xiaomi Locks

Most Xiaomi smart locks come with a factory administrator code, which can be found in one of the following places:

  • πŸ“¦ On the device box – often pasted on the inside of the lid or on a label with a serial number (look for inscriptions like Admin Code, Master). PIN or ).
  • πŸ“„ In the paper manual, it's called "First Connection" or "Security" and in the Chinese market models, the code can be specified in characters (e.g., characters, ).
  • πŸ”– On the warranty card – some sellers put the code next to the serial number.
  • πŸ“± In annex Mi Home/Aqara β€” If the lock has already been connected, the code can be displayed in the device settings (path: Device) β†’ Settings β†’ Security β†’ Administrator code).

For most Xiaomi Mi Smart Door Lock models (such as Mijia Smart Door Lock 1S or 2S), the standard administrator code is 123456 or 888888. However, locks for the European market (with EU firmware) can use a unique code generated during the first setup, in which case the factory code is missing and must be reset.

⚠️ Warning: If you buy a lock from hand, be sure to ask the seller for an administrator code or reset before handing over the device. Without this code, you will not be able to re-attach the lock to your Mi Home account!

πŸ“Š What is your smart lock Xiaomi?
Xiaomi Mi Smart Door Lock
Aqara N100/N200
Yeelight Smart Lock
Another brand
I haven't bought it yet.

2. How to find out the administrator code through the Mi Home app

If the lock is already connected to your Mi Home account, you can view or generate a new one directly in the app. The instructions are relevant for Mi Home 6.0+ (2023-2026):

  1. Open the Mi Home app and go to the Devices tab.
  2. Select your lock from the list (e.g., Xiaomi Smart Door Lock).
  3. Slap the icon. βš™οΈ Settings in upper right corner.
  4. Go to Security or Access Management (the name may vary depending on the model).
  5. Find the Administrator Code or Master PIN. The current code will be displayed here (may be hidden by stars – click on the icon of the eye). πŸ‘οΈ, show).

If the code is not displayed or the section is blocked, it means:

  • πŸ”’ You do not have administrator rights (the lock is linked to another account).
  • πŸ“΅ The lock is disconnected from the network (check the connection to Xiaomi Gateway or Wi-Fi).
  • πŸ”„ Requires firmware update (in older versions of the application, the section may be missing).

In Aqara models (such as the Aqara N100), the administrator code can be found in the Aqara Home app along the way: Device β†’ Settings β†’ Security β†’ Administrator password. If a partition is missing, try updating the app to the latest version.

πŸ’‘

If the code in the app is hidden but you have forgotten it, try entering the last PIN you use – sometimes the system saves it in the cache.

3. Resetting the administrator code through the hardware button

If you can't get the code through the app (for example, a lock is tied to someone else's account), the only way is through a hardware reset. Most Xiaomi locks support this procedure, but it differs depending on the model.

Model of the castleResetting methodNotes
Xiaomi Mi Smart Door Lock 1S/2S1. Remove the battery lid. 2. Press and hold the Reset button (little red or black) for 10 seconds until the light flashes. 3. Enter a new code on the lock keyboard.After the reset, the lock will be detached from all accounts.
Aqara N100/N2001. Unscrew the screws on the inner panel. 2. Press the RST button on the board 5 times in a row. 3. The lock will emit an audible signal - enter a new code.Requires a Torx T5 screwdriver.
Yeelight Smart Lock1. Hold the Unlock button for 15 seconds. 2. After the double beep, enter 0000 (factory code for resetting).It only works on firmware until 2023.

⚠️ Important: Hardware reset removes all user codes, fingerprints and connection data to the Mi Home. After the procedure, the lock will be like new - you need to add it again to the application.

Make sure the batteries are charged (at least 50%)|

Prepare a screwdriver for disassembly (if required)|

Write down the serial number of the castle (in case of request for support)|

Check for a backup mechanical key

-->

4. Alternative ways to get an administrator code

If the standard methods don’t work, try one of these options:

  • πŸ“§ Contact Xiaomi for support – send a photo of the box, check and serial number of the lock to support mail@mi.com (for the European market or through the form on the website mi.com/support. In response, you may send a code or instructions for resetting.
  • πŸ› οΈ Use service commands - some locks support hidden combinations for resetting. N100 You can try to enter on the keyboard: #999*123456# (where 123456 β€” factory-code).
  • πŸ”§ Connect via Xiaomi Gateway β€” if the lock is integrated into the Mi Home system, try removing it from the app and adding it again.

For Zigbee-enabled locks (like Aqara), try resetting the code via the Xiaomi Gateway hub:

  1. Open Mi Home and go to the hub settings.
  2. Select Zigbee Devices β†’ Your Lock β†’ Delete.
  3. Press the button on the hub for 5 seconds to reboot it.
  4. Add the lock again – sometimes it resets the code to standard.

⚠️ Warning: Some gray sellers offer services to crack the codes of Xiaomi locks through connection to the board.This not only violates the warranty, but can damage the device.

What to do if the lock is blocked after a failed reset?
If after the hardware reset, the lock stopped responding to the code input, try: 1. Remove the batteries for 10 minutes, then insert back. 2. Connect the lock to the Xiaomi Gateway via Pairing modes (press the lock button for 3 seconds until the blue indicator flashes). 3. Contact the service center with a check - some models have a hidden service mode to unlock.

5. How to protect the administrator code from loss

To avoid the problem of losing code in the future, follow these guidelines:

  • πŸ” Save the code in the password manager (e.g. Bitwarden, 1Password) The name of the Xiaomi Lock Admin Code".
  • πŸ“± Take a picture of the box and the instructions – sometimes the code is printed in small print on the sticker.
  • πŸ“ Make a physical copy – write the code on paper and store it in a safe place (for example, in a safe or together with documents for an apartment).
  • πŸ‘₯ Configure a backup administrator – in the Mi Home application you can add a second user with administrator rights (path: Device) β†’ Access management β†’ Add administrator).

If you sell or transfer the lock to another person, make sure to reset through the hardware button, which will delete all your data and allow the new owner to configure the device from scratch, otherwise they will not be able to control the lock through their Mi Home app.

πŸ’‘

Never use simple codes like 1111 or 0000, which are easy to pick up, and the best option is a 6-digit code without repeating numbers (for example, 472951).

6. Frequent mistakes and how to avoid them

When working with the administrator code, users often make these mistakes:

Mistake.Effects of consequencesHow to avoid
Use one code for all locksIf the code is leaked, the attacker will gain access to all your devices.Generate unique codes for each lock.
Storing code in phone notes without encryptionIf you steal a phone or hack an account, the code will be known to third parties.Use secure password managers.
Resetting the lock without a backup mechanical keyIf the reset goes wrong, you may be left without access to the door.Always keep the key on hand during the procedure.
Ignoring firmware updatesOlder versions may have vulnerabilities that allow you to reset code without access.Check for updates in Mi Home regularly.

Another common problem is the firmware conflict, for example, if you bought a lock for the Chinese market (with CN firmware) but you try to connect it to your European Mi Home account, the admin code may not work.

  1. Check the region of your account in Mi Home (in your profile settings).
  2. If the region does not match the castle region, create a new account for the respective country.
  3. Update the lock firmware through Mi Home – sometimes this solves the compatibility problem.

FAQ: Answers to Frequent Questions

Can I reset the administrator code without breaking the lock?
Yes, in most Xiaomi Mi Smart Door Lock and Aqara models, the reset button is located under the removable battery compartment cover. You don't need to disassemble the device completely, except for the enhanced protection models (such as the Xiaomi Smart Door Lock Pro), where the button is hidden under the inner panel.
What if the lock is not connected to the Mi Home after reset?
Try the following steps: Remove the lock from the device list in Mi Home (if it still shows up there); Reboot the Xiaomi Gateway (if you use it); Press the reset button on the lock again and hold it for 15 seconds; Add the lock again through Add the device β†’ Manual β†’ Lock. If it doesn't work, check that the lock firmware is compatible with your region in Mi Home.
Can I use the same administrator code for multiple Xiaomi locks?
Technically, yes, but it's extremely insecure, because if an attacker learns the code of one lock, they'll have access to all your devices, and it's recommended that you generate unique codes for each lock and store them in a secure password manager.
How do I know which region of the firmware is near my castle?
There are two ways: Look at the box or in the instructions – usually the region is indicated next to the model (e.g., the model, CN, EU, US). In the Mi Home app, go to the lock settings and find Device Information or Firmware. This may include a region (e.g., a region, 4.6.1_0033 (CN)). If the firmware is Chinese (CN), If your Mi Home account is linked to another region, the lock may not work properly.
What if the previous owner did not give the administrator code?
In this case, you have three options: Contact the seller and request the code (if the purchase was recent, it is your right under consumer law); perform a hardware reset (instructions above); Contact Xiaomi with proof of purchase (check, photo of the box with the serial number). They can help reset the code remotely. If nothing helps, contact the service center - some models can be unlocked through service software.