Services without DNS: an identity-first model using Nostr - Now with punch-able Proof of Concept

An overview of an identity-first service model using NCC-02, NCC-05, and NCC-06, showing how services can be owned, discovered, and reached without relying on DNS. - Now with working PoC client...

lostcause

2. Januar 2026January 2, 2026 · 7 Min. Lesezeit7 min read

image

Services without DNS: an identity-first model using NCC#

This project demonstrates a working proof of concept for running and discovering services without relying on DNS. Instead of names and registrars, services are anchored to cryptographic identities and published over Nostr using signed, immutable records.

The result is a system where ownership, reachability, and trust are decoupled, verifiable, and client-resolved.

DNS becomes optional, not foundational.

This work is a proof of concept and reference implementation. The specifications, libraries, and sidecar are under active development and should not yet be considered production-hardened. The goal is to validate the model, explore client and relay behaviour, and provide a concrete basis for further review and iteration.

Although this project is demonstrated using Nostr relays, the model is service-agnostic. NCC-02 and NCC-05 apply to any networked service, including APIs, web services, media endpoints, and full web applications. Relays provide the discovery and distribution backbone. The service itself does not need to be a relay, or even Nostr-aware, to participate.

This includes standard web apps. A web application can be discovered, resolved, and reached via NCC records, with clients resolving identity and endpoints independently of DNS.


The components#

NCC-02 – Identity-bound service ownership

NCC-02 defines how a Nostr identity asserts ownership of a service.

An NCC-02 record is a signed Nostr event that binds:

This record answers a single question: who owns this service?

Because the event is signed by the service key, ownership is cryptographically verifiable. Any client can confirm that the service belongs to that identity without relying on DNS, registries, or central authorities.

Key properties:

NCC-02 does not describe where a service runs or how to reach it. It is purely the ownership anchor.


Service record attestations

Service record attestations extend NCC-02 by allowing other identities to make signed statements about a service, without changing ownership.

An attestation is a separate Nostr event that references an NCC-02 service record and asserts some claim about it.

Critically:

Ownership remains singular. Claims about the service can be plural.

Attestations are intentionally generic and client-interpreted. They can represent:

The NCC system does not interpret or enforce these claims. Clients decide:

Attestations provide evidence, not authority. They replace central trust anchors with explicit, signed statements evaluated client-side.


image

NCC-05 – Cryptographic location resolution

NCC-05 defines how a service publishes where it can be reached, independently of DNS.

An NCC-05 record is associated with an NCC-02 service and contains one or more locators, each describing a concrete endpoint:

Locators may be public or encrypted using NIP-44, allowing private endpoints to be published safely.

Key properties:

NCC-05 does not proxy traffic, establish tunnels, or provide anonymity by itself. It is strictly a location description and resolution mechanism.


Potential service patterns#

NCC-05 enables a range of service models beyond simple dynamic IP resolution:

Relays act only as the distribution backbone. The services themselves can be arbitrary protocols and do not need to be Nostr-aware.


image

NCC-06 – Sidecar and operational control plane

NCC-06 operationalises NCC-02 and NCC-05.

The sidecar is a local daemon that:

The sidecar does not forward traffic and is not a proxy. It acts as a publisher, monitor, and control plane that keeps service records accurate and current.

Because service identity is decoupled from network location, the sidecar enables rapid endpoint and metadata rotation under a stable identity. Services can move hosts, rotate IPs or onion addresses, update TLS fingerprints, or change publication relays and have the new state published within minutes.

Changing the service’s npub creates a new identity and is treated as a distinct service.

image

The client’s role#

This model only works because the client is an active participant rather than a passive resolver.

The reference client shows how a client discovers NCC-02 service records, verifies ownership, and then resolves NCC-05 locator records to determine where a service can actually be reached. When locators are private, the client handles decryption using NIP-44 and decides which endpoints it is authorised to see.

The client is also responsible for correlating service records, locator records, and any attestations into a single, coherent view of a service. Trust is not implicit. Each client applies its own policy about which attestations to accept, which identities to trust, and when to fail closed.

Endpoint selection is likewise a client decision. The client chooses between multiple locators deterministically, respecting priority, expiry, and freshness, and automatically follows changes as new records are published. When endpoints rotate or infrastructure moves, the client converges on the new state without manual reconfiguration.

Connections are made directly to the resolved service endpoints. Where required, the client can route traffic to onion services using a local bridge, allowing standard web applications and browsers to participate without special network configuration.

In this architecture, relays act purely as the distribution layer and the sidecar keeps service records accurate over time. The client is where meaning is enforced. What to trust, where to connect, and how to react to change are all resolved locally, without any global authority.


How it fits together#

All components use:


Why this matters#

DNS-based service discovery couples identity, location, and trust into a brittle hierarchy. NCC separates these concerns:

This makes services more portable, harder to censor, easier to migrate, and independently verifiable.

DNS becomes optional, not foundational.


Code and references#

NPM Libraries used: ncc-02-js, ncc-05-js

#nostr #builders #privacy #p2p #tor #dns #decentralization #nostrdevs #ncc #npm #js

#builders#decentralization#dns#js#ncc#nostr#nostrdevs#npm#p2p#privacy#tor

Written by

Comments

No comments yet. Start the conversation.