Setting up dynamic DNS (DDNS)

Problem: My validator is running behind a dynamic IP address and this causes connectivity issues with other validators when my dynamic IP address changes.

Quick steps guide

The following steps align with our mainnet guide. You may need to adjust file names and directory locations where appropriate. The core concepts remain the same.

🗡️ 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.

There are many alternative DDNS services but seldom do they accept crypto donations like Duck DNS.

🤖 Minimum System Requirements

  • Linux cron

🚧 How to Configure the DDNS

For the purpose of this tutorial, we will be using DuckDNS.org

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.

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

# 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

Be sure to familiarize yourself with the official docs and faqs.

🤖 Start staking by building a validator

🧩 Reference Material

Last updated