tag ──NFC──▶ phone (Knura app) ──HTTPS on your Wi-Fi──▶ knurd admin API (holds master.key)
Before you start
- knurd works with your phone. Follow Get started until tapping a tag shows "Tap verified".
master.keyandpublic.urlmust be set. - knurd and knurctl are v0.3.0-alpha or newer. That's the first release with phone setup. Your settings, keys and tags carry over from older versions.
- An Android phone with NFC, Android 11 or newer, with a screen lock set.
- The phone and knurd's computer on the same network.
Run every knurctl command below in your settings folder, where knurd.properties is.
1. Let the phone reach knurd's admin API
The admin API normally only answers its own computer. The phone reaches it over your Wi-Fi, which needs TLS. Find the computer's address on your network (it looks like 192.168.x.x, not 127.0.0.1), make the certificate if you haven't yet, and open the port:
ip -4 addr | grep inet # find this computer's 192.168.x.x address knurctl admin tls create # once sudo firewall-cmd --add-port=8425/tcp --permanent && sudo firewall-cmd --reload # Fedora
Then put that address in knurd.properties:
admin.listen.host=192.168.1.50
127.0.0.1 stop working; make new ones with knurctl admin token add <name> --admin-url https://192.168.1.50:8425.2. Install the app
- On the phone, open this link and download the app: knura.apk. It always has the newest test build.
- Open the download and tap Install.
- Allow Install unknown apps for your browser when Android asks. If Play Protect warns about an unknown developer, choose Install anyway.
Each test build is signed with a fresh key, so to install a newer one, uninstall the old app first, then pair again.
3. Pair the phone
knurctl admin pair-phone my-phone # any name; shows a QR codeThis makes a login token that may set tags up, adds it to admin.provision.tokens in knurd.properties, and shows a QR code. Then:
- Restart knurd. Its first lines should say
Phones may set tags up with these admin tokens: my-phone. - In the app, tap Scan pairing code, scan the code, and unlock with your fingerprint or screen lock.
knurctl admin token remove my-phone, and knurd refuses it straight away.4. Use it
Tap one of the four tiles, tap Start, then hold the tag, unlock, and hold the tag flat against the back of the phone until the result screen comes up. That takes a few seconds. The result screen shows the tag's UID and what changed; What knurd did has knurd's full log and Copy details copies it all. If nothing happens, slide the tag slowly around the back: phones read tags at one spot only.
While the app is open it catches every tag itself, so holding a tag to the phone early never opens the browser.
| Action | What it does |
|---|---|
| Set up a tag | Knura keys and your tap link, like knurctl provision. Turn on the "Tag already has Knura keys" switch to re-point a tag knurd already set up. |
| Tag info | UID, link, whose keys it has, and whether the link checks out. |
| Check a tap | Reads the tag like a phone tap and checks it with your keys. |
| Reset tag | All keys back to zero, no link. Turn the switch off for a tag that still has factory keys. |
| Status, Tags, Recent taps | The rows under knurd show what knurctl admin status, tags and taps show on the computer. Recent taps lists the latest 20 in your phone's time, each marked Genuine, Replay, Rejected or Malformed. They only read. |
| Remove a token | Lock out a lost laptop or phone straight away. Removing this phone's own token makes the app forget knurd. |
The app follows the phone's light or dark mode. On a foldable, the home screen shows the tag actions and knurd side by side when the phone is open, and folding it mid-session keeps going.
Setting up keys, TLS, new tokens and the resolver stays on the computer, so a lost phone can't open up your setup. If the tag slips away halfway through, run the same action again: the tag is never left in a state knurd can't fix.
Troubleshooting
| The app says | What to do |
|---|---|
| Can't reach knurd at https://... | Is knurd running, the phone on the same Wi-Fi, and port 8425 open? Does admin.listen.host match the address? |
| knurd's certificate isn't the one this phone was paired with | You made a new certificate. Forget knurd in the app, run pair-phone with a new name, and pair again. |
| setting tags up through a phone is off | Restart knurd after pair-phone. |
| this token may not set tags up | The name isn't in admin.provision.tokens. |
| the tag refused the key | Flip the "Tag already has Knura keys" switch, or check the tag with Tag info. |
| another phone is setting a tag up | Wait 20 seconds for the earlier attempt to time out. |
| knurd said no: 404 | knurd is older than the app. Update knurd and knurctl to the latest release and restart knurd. |
How it stays safe
- No keys on the phone. knurd works out each tag's keys from your master key and sends them only inside the tag's own encrypted session. The phone carries messages it can't read.
- knurd checks every reply. A made-up answer fails the session instead of leaving a half-set-up tag.
- Only phones you named. Phone setup is off unless
admin.provision.tokensnames a token. Other admin tokens can read status but can't set tags up. - Your network, your certificate. The admin port refuses public addresses and tunnels, and the app pins knurd's certificate from the QR code.
- Unlock first. The token sits in Android's Keystore and works for 30 seconds after you unlock it with your fingerprint or screen lock.
- One at a time, all logged. One phone session runs at a time, it ends after 20 seconds of silence, and every session goes in knurd's admin audit log with the token name and the tag's UID.