> For the complete documentation index, see [llms.txt](https://docs.nfh.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nfh.global/build/onboarding/file-based.md).

# File-based onboarding

On this path you publish records directly on a domain under your own control, in conformance with the [DeDi protocol specification](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol).

Any file-based publisher — NFO or NP — must publish at least two files:

| File                                                                                                                                                                               | Location                                                                                                                                                                                                          | Purpose                                                    | Schema                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DeDi index file](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/docs/publishing-dedi-files.md#6-the-manifest--well-knowndediindexjson) | `https://<your-domain>/.well-known/dedi.index.json`                                                                                                                                                               | Lists your signing keys and the registry files you publish | [dedi-manifest.schema.json](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/schemas/dedi-manifest.schema.json)                                                                                                                                                                                                                                                                                                                                                |
| [Registry file(s)](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/docs/publishing-dedi-files.md#5-the-dedi-file)                        | URL declared in the index file ([hosting conventions](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/docs/publishing-dedi-files.md#52-layout-and-hosting-conventions)) | The registry records themselves, signed by you             | [dedi-file.schema.json](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/schemas/dedi-file.schema.json); records follow [beckn\_subscriber\_reference.json](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/schemas/beckn_subscriber_reference.json) (NFO) or [beckn\_subscriber.json](https://github.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/blob/main/schemas/beckn_subscriber.json) (NP) |

## How a file-based network comes together

Publishing your DeDi index file and registry **is** your onboarding — for NFOs and NPs alike. The sequence below shows an NFO onboarding its network together with its NPs.

**Step 1 — NFO expresses intent to join the NFH fabric.** The NFO enters its domain on the [NFH fabric onboarding portal](https://fabric.nfh.global/#onboarding).

**Step 2 — NFO publishes its index and participant registry.** The NFO publishes its DeDi index file at `nfo.com/.well-known/dedi.index.json`, and creates its reference registry of network participants — suggested name `nfoname_networkname_env_ref_registry` — at `nfo.com/dedi/nfoname_networkname_env_ref_registry.json`. The registry must use the [Beckn Subscriber Reference schema](https://raw.githubusercontent.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/refs/heads/main/schemas/beckn_subscriber_reference.json).

**Step 3 — NP publishes its records.** The NP publishes its DeDi index file at `np.com/.well-known/dedi.index.json`, and creates its network key registry at `np.com/dedi/nfoname_networkname_env_registry.json` (e.g. `nfo-x_mobility_prod_registry.json`), using the [Beckn Subscriber schema](https://raw.githubusercontent.com/LF-Decentralized-Trust-labs/decentralized-directory-protocol/refs/heads/main/schemas/beckn_subscriber.json). It then shares its registry URL with the NFO.

**Step 4 — NFO updates its records.** The NFO adds the new NP's details to its registry of NPs, re-signs, and republishes.

```mermaid
sequenceDiagram
    participant NFO as NFO (nfo.com)
    participant P as NFH fabric onboarding portal
    participant NP as NP (np.com)

    NFO->>P: 1. Express intent — enter domain
    NFO->>NFO: 2. Publish /.well-known/dedi.index.json<br/>+ nfoname_networkname_env_ref_registry.json
    NP->>NP: 3. Publish /.well-known/dedi.index.json<br/>+ nfoname_networkname_env_registry.json
    NP-->>NFO: 3. Share URL of registry (or dedi.global lookup URL)
    NFO->>NFO: 4. Add NP record to reference registry,<br/>re-sign and republish
```

## If you are an NFO

* **Onboarding your network**: do Steps 1 and 2 — express intent on the onboarding portal, then publish your index file and reference registry.
* **Adding an NP to your network**: do Step 4 each time an NP joins — add a record with the NP's `subscriber_id` and registry URL (in either [URL form](#registry-url-forms)) to your reference registry, then re-sign and republish both the registry file and your index file (the index carries the registry's digest).

## If you are an NP

Your onboarding is Step 3 — publishing your DeDi index file at `np.com/.well-known/dedi.index.json` and your network key registry at `np.com/dedi/nfoname_networkname_env_registry.json`, using the Beckn Subscriber schema.

* **Joining under an NFO**: share your registry URL with the NFO, which adds your record to its reference registry (Step 4).
* **Not tied to any NFO yet**: enter your domain on the NFH fabric onboarding portal yourself, then publish. You are then on the NFH fabric standalone, and NFOs can add you to their networks later.

## Reuse of an existing dedi.global presence

Where an NP already maintains a presence on dedi.global, that existing record may be used for onboarding, without requiring the NP to publish files independently. In this case, the lookup URL from dedi.global can be used in the NFO's registry, for example:

```
https://api.dedi.global/dedi/lookup/np2.com/nfo-x_mobility_prod_registry
```

## Registry URL forms

An NP's registry URL can be in one of two forms, depending on the path the NP uses:

| NP path    | URL form                                               | Example                                                                   |
| ---------- | ------------------------------------------------------ | ------------------------------------------------------------------------- |
| Hosted     | `api.dedi.global/dedi/lookup/<domain>/<registry-name>` | `https://api.dedi.global/dedi/lookup/np.com/nfo-x_mobility_prod_registry` |
| File-based | `<domain>/dedi/<registry-name>`                        | `https://np.com/dedi/nfo-x_mobility_prod_registry`                        |

See all of these files fully written out in the [worked example](/build/onboarding/worked-example.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nfh.global/build/onboarding/file-based.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
