Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master
README
NamecoinToBind 3.0.5
====================

This version has a first support of the new spec (old spec is still supported for a while) :
- https://dot-bit.org/Domain_names


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


TODO :
------

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

* Improve reference remplacements (https://dot-bit.org/Domain_names#Domain_references & https://dot-bit.org/Domain_names#Sub-domains)

Something went wrong with that request. Please try again.