This is a guide how to run HTN DNS Seeder so that you can send it to me as inclusion to be in the default DNS Seeders.
For effective decentralization, it’s crucial to include multiple DNS seeders in the HTN Node by default. Without DNS seeders, new nodes cannot automatically discover and join the network, creating a single point of failure and hindering network connectivity. Including multiple seeders ensures reliable access and prevents dependency on a single source.
Remember you will need node so that the DNS Seeder can listen to the node’s messages to catch peers to the seeder. This is not required to be running constantly, but for the first list of seeds it’s required. Then you need Domain with nameserver that supports NS records. Then you need the code for building and installing DNS Seeder and you must make sure that your system has port 53 usable.
You need a domain address with DNS that allows you to create NS record, NS stands for ‘nameserver,’ and the nameserver record indicates which DNS server is authoritative for that domain (i.e. which server contains the actual DNS records). Basically, NS records tell the Internet where to go to find out a domain’s IP address.
Godaddy for example supports NS records, but if your domain nameserver does not allow NS record you can use Desec as free nameserver which supports NS Records. You need to set your domain nameserver addresses to Desec nameservers to use Desec.
You need Git and Go 1.17 and other build essentials, since Go depends on GCC for some features. In Ubuntu build-essential package. In Windows TDM-GCC. Basically everything that is required for building node.
You will also require the DNS Seeder source from Github.
First lets clone the project:
git clone https://github.com/Hoosat-Oy/dnsseeder.git
Change to the project directory:
cd dnsseeder
Build & install the seeder
go install .
DNS Seeder will now be installed in either $GOROOT/bin or $GOPATH/bin depending on your configuration. For Windows users it is by default cd C:\Users<YourUsername>\go\bin and for Ubuntu Linux it is by default cd $HOME/go/bin.
You need to create NS record that points to subdomain and make that subdomain to point to the server which will run the DNS Seeder.
For example the DNS records used for mainnet-dnsseed.hoosat.fi dns seeder.
RECORD | SUBDOMAIN | ADDRESS |
---|---|---|
A | ns-seed | 65.108.11.185 |
AAAA | ns-seed | 2a01:4f9:6a:4752::2 |
NS | mainnet-dnsseed | ns-dnsseed.hoosat.fi |
DNS Seeder requires exclusive access to port 53.
netstat -aon | findstr :53
taskkill /PID <PID> /F
You need to make sure that your server does not have anything listening on 53, because the DNS seeder will be using it.
In the case of Ubuntu as an example, open the resolvd conf:
sudo nano /etc/systemd/resolved.conf
Save your changes and exit the editor.
Next you need to create symbolic link for /run/systemd/resolve/resolv.conf
with /etc/resolv.conf
as the destination:
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
Then you need to reboot your Ubuntu system so that the port 53 is open.
You can check if 53 port is open with the following command:
sudo lsof -i :53
There will not be any output if port 53 is usable and port 53 must be usable if you want to run mainnet DNS Seeder. This is example for Ubuntu and you may need to do it differently depending on your operation system, but you can find guides on internet.
You can run the dnsseeder with the following command, but modify it for your domains:
./dnsseeder --default-seeder=localhost:42421 --host=mainnet-dnsseed.hoosat.fi --nameserver=ns-dnsseed.hoosat.fi --listen=0.0.0.0:53
Now it will start listening for peers from the HTN Node. You can give HTN developers the Host address for inclusion into HTN source as default DNS Seeder.