> For the complete documentation index, see [llms.txt](https://dgtnetwork.gitbook.io/dgt-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dgtnetwork.gitbook.io/dgt-docs/6.-administrator-guide/6.3-dgt-core-setup-private-public-network/6.3.4-attach-node-to-existing-network.md).

# 6.3.4 Attach node to Existing Network

After a network is deployed or if one is already available (see [6.3.3](/dgt-docs/6.-administrator-guide/6.3-dgt-core-setup-private-public-network/6.3.3-a-physical-network.md)), the most frequent task is to connect a node to an existing network. The solution to this objective is basically the same as managing a physical network, except that there is no need to deploy a SEED configuration. To create and add a node to an existing network, you must perform the following steps:

* Prepare the environment and clone the DGT node software of a relevant version.
* Additionally, make sure the following requirements are met:
  * In case of joining a private segment (private network), you must have the following information: IP and port of the gateway, as well as a cell for connection (cluster number and node number).
  * In case of joining a private segment (private network), you received and approved the certificate of your node.
  * In case of joining a public segment (public network) you know the number of the gateway for connecting or the address/link to the JSON anchor file with the configuration of public network gateways.

&#x20;Go to the version directory (for example, «DGT-Matagami/CORE») and customize the template of the «*certificate.json*» certificate.

* Build and connect the node using one of the following commands:
  * Connecting to a closed (private) segment:

```
bash upDgtCluster.sh -G -E -SC -CB openssl -P [NODE_PORT] -H 
[SERVER_IP] -N my_host_name -S [GATE_URL:GATE_PORT]  NumCluster NumNode
```

* Connecting to an open (public) segment:

```
    bash upDgtCluster.sh -G -E -P [NODE_PORT] -N my_host_net -S 
    [GATE_URL:GATE_PORT] dyn 1
```

If more than one node from one subnet is joining, you must set the my\_host\_net as the same. A node connected to the network not only receives, but also transmits data. Therefore, you must be sure that the corresponding port is open externally (this can be checked with telnet or for an external network using the [canyouseeme](https://canyouseeme.org/) service)

* Perform a standard node health check through the BGT transaction test family or other calls


---

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

```
GET https://dgtnetwork.gitbook.io/dgt-docs/6.-administrator-guide/6.3-dgt-core-setup-private-public-network/6.3.4-attach-node-to-existing-network.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.
