# DAR Upload Process

Metra requires your validator to host and serve the DARs representing the Metra templates.

You must upload Metra’s DAR contracts to your validator node.

#### 5.1 Upload the DAR file to the validator

Use Canton Console or Validator API:

```
uploadDar my-metra.dar
```

#### 5.2 If accessing validator locally

Forward your participant or validator pod to localhost:

Example (Kubernetes):

```
kubectl port-forward {pod-name} 5002:5002 -n {namespace}
```

Then access Ledger API at:

```
http://localhost:5002
```

#### 5.3 Exposing the node via Ingress

If not already exposed, configure your ingress:

Example (pseudocode):

```
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: canton-api
spec:
  rules:
  - host: api.YOUR_HOST_DOMAIN
    http:
      paths:
      - path: /ledger-api
        backend:
          service:
            name: ledger-api-svc
            port: 5001
      - path: /validator-api
        backend:
          service:
            name: validator-api-svc
            port: 5002
```

This ensures Metra can call both APIs through the same base URL.


---

# Agent Instructions: 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:

```
GET https://hydrax.gitbook.io/metra-docs/onboarding/quickstart/dar-upload-process.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
