What you need
- NTAG 424 DNA tags (stickers, cards or key fobs with this chip).
- A USB NFC reader that speaks PC/SC, such as the ACR122U, to set up tags.
- Java 21 for knurctl and knurd, and Node.js 20.19 or newer for the Matter bridge.
- An HTTPS address phones can reach, for example through Tailscale Funnel.
1. Set up your tags
Download knurctl and knurd from the latest release, or build from source (git clone https://github.com/knura-dev/knura.git, then ./gradlew :knurctl:installDist; the README has the full steps). Then put a tag on the reader and run:
# make a master key (back it up) $ knurctl init # give the tag its keys and tap link $ knurctl provision # read it the way a phone does $ knurctl tap
knurctl info shows a tag's ID, link and whose keys it has, and knurctl reset puts it back to factory keys. On Linux, knurctl needs the PC/SC daemon (pcsc-lite on Fedora).
2a. Run knurd at home
knurd listens on this computer only. Put an HTTPS tunnel in front of it so phones can reach it. Tailscale Funnel is free, needs no domain or router changes, and gives a fixed address:
$ sudo tailscale funnel --bg 8424 $ echo 'public.url=https://<computer>.<tailnet>.ts.net' >> knurd.properties $ knurctl provision --from knura # rewrite the tag's link
2b. Run it on Kubernetes
A Helm chart runs knurd and knurgN in one pod, with the Matter bridge as an optional sidecar. knurctl stays on your computer because it needs the USB reader.
# keys go in a Secret you make yourself, never in values $ kubectl --namespace knura create secret generic knura-keys --from-file=k8s-keys/master.key $ helm install knura deploy/helm/knura --namespace knura # or try everything on a throwaway local cluster $ deploy/kind/test.sh
The test script builds the images, starts a kind cluster and checks that a tap verifies, that a replay is refused even after a restart, and that the Matter bridge got the tap. CI runs it on every pull request. Images aren't published to a registry yet, so you build them locally from the repository.
3. Optional: keep tags working when you move
Register with tap.knura.io and tags carry its address instead of yours. Moving knurd then means registering the new address, not rewriting tags.
$ knurctl resolver register # creates your owner ID and key $ knurctl resolver register # after restarting knurd: forwards to public.url $ knurctl provision --from knura $ knurctl resolver check # where do my taps go?
You can always skip the resolver by giving knurctl provision your own --base-url.
4. Manage knurd from knurctl
knurd's admin API runs on a separate, never-public port. It shows status, recent taps and every tag seen, and since v0.3.0-alpha it lets a paired Android phone set tags up, with the keys staying on knurd.
# on knurd's own computer $ knurctl admin status $ knurctl admin taps $ knurctl admin tags # from another computer: a token and pinned TLS $ knurctl admin tls create $ knurctl admin token add laptop $ knurctl admin status --creds knurctl-creds.properties
See Security for how the admin port is locked down.