# Setting up dynamic DNS (DDNS)

## :fast\_forward: Quick steps guide

{% hint style="info" %}
The following steps align with our [mainnet guide](/nodebridge-africa/readme/ethereum-staking-guide/ethereum-staking-guide/setting-up-a-validator-on-eth2-mainnet/part-iii-tips-1.md). You may need to adjust file names and directory locations where appropriate. The core concepts remain the same.
{% endhint %}

### :dagger: Why do I need a dynamic DNS service?

* Most internet connections are through a dynamic IP address and can change weekly or even daily.
* Frequent IP changes can make it difficult to host services such as a validator.
* As a workaround, you can use a DDNS (Dynamic DNS) service.
* Using a subdomain (i.e. mySubDomain.duckdns.org), you relate this to your latest dynamic IP address.
* Periodically, say every 5 minutes, your computer updates a subdomain with your latest dynamic IP address.
* Other validators or users would find you via the subdomain, instead of IP address.

{% hint style="info" %}
There are many [alternative DDNS services](https://hackerspad.net/software/duck-dns/#alternatives) but seldom do they accept crypto donations like [Duck DNS](https://www.duckdns.org).
{% endhint %}

### :robot: Minimum System Requirements

* Linux cron

### :construction: How to Configure the DDNS

For the purpose of this tutorial, we will be using [DuckDNS.org](https://www.duckdns.org/install.jsp)

1\. Sign in and create an account with your preferred social media login.

2\. Follow the instructions on[ how to setup duckdns for linux cron.](https://www.duckdns.org/install.jsp)

3\. Configure the **beacon-chain** to use your new DDNS subdomain.

{% tabs %}
{% tab title="Prysm" %}

```bash
# Edit your beacon-chain unit file
sudo nano /etc/systemd/system/beacon-chain.service

# Append the following flag to ExecStart
--p2p-host-dns <SUBDOMAIN>

# Example of what ExecStart could look like.
# prysm.sh beacon-chain --mainnet --p2p-host-dns mySubDomain.duckdns.org

# Reload the new unit file
sudo systemctl daemon-reload

# Restart your beacon-chain
sudo systemctl restart beacon-chain
```

{% endtab %}
{% endtabs %}

{% hint style="success" %}
Nice work. You're running a DDNS now.
{% endhint %}

{% hint style="info" %}
Be sure to familiarize yourself with the [official docs and faqs.](https://www.duckdns.org/faqs.jsp)
{% endhint %}

## :robot: Start staking by building a validator <a href="#start-staking-by-building-a-validator" id="start-staking-by-building-a-validator"></a>

{% hint style="success" %}
Congrats on completing the guide. ✨
{% endhint %}

## :jigsaw: Reference Material

{% embed url="<https://www.duckdns.org/install.jsp>" %}


---

# 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://nodebridge-africa.gitbook.io/nodebridge-africa/readme/gnosis-staking-guide-1/setting-up-a-validator-on-eth2-mainnet/part-iii-tips-1/setting-up-dynamic-dns-ddns.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.
