Get started · Android app

Set tags up with your phone

The Knura app sets tags up, checks them and resets them with your phone's own NFC, so you don't need a USB reader. Your keys never reach the phone: it only passes messages between the tag and your knurd.

See it in action

From pairing to a working tag

A walkthrough of the app with example values. It follows your phone's light or dark mode, like the real app.

Click a step to jump to it.
Alpha, Android only. The app is a test build you install from GitHub, not from the Play Store. An iPhone app comes later. Prefer plain text? The same guide is in the repository.

Before you start

  • knurd works with your phone. Follow Get started until tapping a tag shows "Tap verified". master.key and public.url must 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:

Terminal
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:

knurd.properties
admin.listen.host=192.168.1.50
Keep port 8425 at home. Never forward it on your router or put it on Tailscale Funnel: knurd refuses requests that come through a tunnel. Give the computer a fixed address in your router, because the phone remembers it. Creds files made earlier for 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

  1. On the phone, open this link and download the app: knura.apk. It always has the newest test build.
  2. Open the download and tap Install.
  3. 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

Terminal
knurctl admin pair-phone my-phone    # any name; shows a QR code

This makes a login token that may set tags up, adds it to admin.provision.tokens in knurd.properties, and shows a QR code. Then:

  1. Restart knurd. Its first lines should say Phones may set tags up with these admin tokens: my-phone.
  2. In the app, tap Scan pairing code, scan the code, and unlock with your fingerprint or screen lock.
The code holds the token, so don't photograph or share it. Lost the phone? 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.

ActionWhat it does
Set up a tagKnura 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 infoUID, link, whose keys it has, and whether the link checks out.
Check a tapReads the tag like a phone tap and checks it with your keys.
Reset tagAll keys back to zero, no link. Turn the switch off for a tag that still has factory keys.
Status, Tags, Recent tapsThe 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 tokenLock 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 saysWhat 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 withYou 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 offRestart knurd after pair-phone.
this token may not set tags upThe name isn't in admin.provision.tokens.
the tag refused the keyFlip the "Tag already has Knura keys" switch, or check the tag with Tag info.
another phone is setting a tag upWait 20 seconds for the earlier attempt to time out.
knurd said no: 404knurd 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.tokens names 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.