NamecoinToBind is a php script that generates bind zones for .bit domains from the namecoin blockchain by using the name_scan rpc command.
PHP Shell


NamecoinToBind 3.0.5

This version has a first support of the new spec (old spec is still supported for a while) :

Dependencies :

- idn	(php5-idn crash with some domain names, so the idn binary is used)
- php5-cli
- a running namecoin

Install :

apt-get install idn php5-cli

* Bind configuration :
Copy the file etc/bind/named.conf.bit to /etc/bind/ 
Edit the file /etc/bind/named.conf.options and add :
- at the bottom of the file :
  // .bit zone
  include "/etc/bind/named.conf.bit";

* Create the following folder :
- /etc/bind/dotbit/
chown www-data -R /etc/bind/dotbit/

* NamecoinToBind configuration :
(replace <NamecoinToBind> with the folder you extracted NamecoinToBind files)
Copy the file <NamecoinToBind>/etc/cron.d/namecoinToBind to /etc/cron.d/
Edit the file /etc/cron.d/namecoinToBind and replace the NamecoinToBind path with yours
Copy the file <NamecoinToBind>/config.php.dist to <NamecoinToBind>/config.php
Edit the file <NamecoinToBind>/config.php to change :
- the namecoin user/pass/ip
- the hostname and ip of your server (hostname can be "ns.your-domain.bit" if you want)

* Create the following folders :
- <NamecoinToBind>/cache
- <NamecoinToBind>/stat

Launch : ./ &
Add it at startup (in /etc/rc.local before line 'exit 0' on debian) :
  # update .bit domains
  su -c '/<NamecoinToBind>/ > /dev/null &'


* Support the following records :
- loc
- service
- delegate
- import

* Improve reference remplacements ( &