Guides
Is it safe to share or photograph your HomeKit setup code?
A setup code can't take over an accessory that is already paired, so the risk is smaller than it sounds, but not zero. Here is what someone could do with your code, and when to keep it private.
3 min read
The setup code on a smart-home accessory is a secret of sorts. It is what proves to the accessory that you are allowed to add it. So it is reasonable to wonder whether a photo of the sticker in a forum post, or a code shared with a housemate, is a risk.
The short answer: much less than you might think, but not none.
What the code actually does
The setup code is used once, during pairing. Your iPhone and the accessory use it to prove to each other that you have the accessory in front of you. After that, a cryptographic pairing takes over, and the code isn’t needed again in normal use.
That gives the code two limits:
- It only works on an unpaired accessory. A HomeKit accessory that is already in your home refuses to pair with anyone else. A Matter accessory only accepts a new platform when you open a pairing window yourself, and that uses a fresh, temporary code, not the one on the sticker.
- It only works up close. Pairing runs over Bluetooth, Thread or your local network. Someone with your code and no access to your home or your Wi-Fi can’t do anything with it.
When the code does matter
The code becomes useful to someone else when the accessory is unpaired and they are nearby. In practice, that means:
- After a factory reset, until you pair it again.
- During setup, before you have finished adding it.
- When it changes hands. Anyone who has seen the code can pair a second-hand accessory once it is reset, which is why a buyer should always reset it themselves.
- In shared buildings, such as flats, offices or rented houses, where people may be within Bluetooth range or on the same network.
None of these is common, and all of them need someone close by. But for an accessory that controls a door lock, a garage door or a camera, you want no gaps at all.
Sharing codes sensibly
- Blur the code and the QR before posting photos of an accessory online. Forum posts and social media last for years, long after you have moved house or sold the device.
- Share with people in your home, not the internet. Giving a housemate or partner your codes is fine. They already have physical access.
- Pass codes on when you sell. The buyer needs it, and the code can’t be changed. See removing an accessory before selling it.
- Reset second-hand locks and cameras as soon as you get them, whatever the seller says.
Where to keep them
Setup codes are worth keeping, because you need them after every reset and every move. But a few common ways of keeping them are less private than they look:
- Photos get shared, synced to Google Photos or other services, and turn up in shared albums and memories.
- Notes and spreadsheets are often synced to work accounts or shared with others.
- Stickers copied onto the inside of a cupboard are visible to anyone who opens it, including tradespeople and future owners.
Our guide to storing setup codes securely covers what good storage looks like.