> For the complete documentation index, see [llms.txt](https://docs-old.zus.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-old.zus.network/guides/setup-a-blockchain/step-2-setup-the-network-for-0chain-components.md).

# Step 2: Setup the network for Züs components

### Build and Configure 0dns

0dns service is responsible for connecting to the network and fetching all the magic blocks from the network, which are saved in the DB.\
\
1\. Navigate to 0dns directory

```
cd 0dns
```

2\. Open the 0dns configuration file(0dns.yaml) using the nano editor.

```
nano docker.local/config/0dns.yaml
```

3\. Disable both `use_https` and `use_path` (set them to `false`).This is required to fix the miner and sharder URLs so they work locally.

<figure><img src="/files/CwY2J2DZtR0d9zvFo8Gb" alt=""><figcaption><p>Modify 0dns.yaml</p></figcaption></figure>

4\. Save the changes and run the following command inside the 0dns directory

```
./docker.local/bin/build.sh
```

Here is the screenshot of the terminal after a successful build:

<figure><img src="/files/FJ4gif5G4UDymwysarRT" alt=""><figcaption><p>0dns build</p></figcaption></figure>

### Set up a Docker Network

To create sharder, blobber, miner containers and allow interaction between them. You need to create a network using Docker, which connects them with each other.

1. To set up a network go to the 0chain directory

   ```
   cd 0chain
   ```
2. Run the setup network script

   ```
   docker.local/bin/setup.network.sh
   ```

   On successful Setup, you will receive a network ID in response :

   ```
   d9c238b3f21899137c905b13a4c52fbcab46bee4527d0b6525031c3401b4d329
   ```

### Start the 0dns container

To connect to the test network we just created and to fetch all the magic blocks. Run the 0dns container.

1.Navigate to `0dns` directory

```
cd 0dns
```

2.Run the start script as (sudo or root) using the command.

```
./docker.local/bin/start.sh
```

This should be a response after a successful start:

```
Starting 0dns ...
[+] Running 1/1
 ⠿ Container 0dns-0dns-1  Started
```


---

# 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-old.zus.network/guides/setup-a-blockchain/step-2-setup-the-network-for-0chain-components.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.
