# Snap DynDNS Server using INWX domains **Snap DynDNS Server** enables you to set up your own simple Dynamic DNS service. It requires you to use domains managed by the registrar InterNetworX (inwx.de) and their API. This server may be simply customised to be able to work with other domain sellers and their specific APIs. It can set the IP of any existing domain entry, may it be IPv4 or IPv6 (and theoretically all kinds INWX supports). All domains of the clients have to be part of the same INWX account. The idea of the service is to enable compatibility with as many client devices as possible. So clients only would need to send a GET or POST request to your service which contains their individual user data (which you can create freely) and their desired IP address for their domain. This server has a client application as counterpart, named [Snap DynDNS client](https://src.mehl.mx/mxmehl/snap-dyndns-client). Using the latter, you will be able to retrieve the IP of your computer and send it to this service which in return updates the domain for you. ## Requirements The installation requires the possibility to execute PHP and Bash files. It also requires curl to be installed. There's no need for a database to be installed as everything is handled by flat text files. The code has been tested with PHP 5.5, CentOS 7, and Apache 2.2.15. Please be aware to migrate the `.htaccess` file if you use other webservers so the sensitive files like `config.cfg` and `users.db` are safe. ## Installation Clone the git repository to your server and move them to a public web-accessible folder of your choice. Now rename/copy the files `config.cfg.sample` and `users.db.sample` to `config.cfg` and `users.db` respectively. Open them in an editor and modify the settings so they match your data. ### config.cfg In this file you have to put your inwx.de username and password. It is needed to login to the API and update the IP of your domain entry. ### users.db In this file you can create users which can use your service. Unauthorized requests which do not match any of the content here will not work. Each line matches one existing single domain entry in your INWX account. It is not necessary the DynDNS domain names to be part of the same domain (`example.com`), they can also be different ones – they just have to be part of the same INWX account (please tell me if you need this to be improved, it shouldn't be a big deal). #### Gather INWX domain ID Given you own the domain example.com which you can administrate in your INWX account. For each client, you can create a subdomain, in this example `user1.example.com` and `user2.example.com`. For INWX, each domain has a unique ID. To find out this ID, you will have to use a tool like Firebug or the in-built web inspector tools by Firefox or Chromium. Use the *inspect element* feature, hover over the subdomain line in your nameserver/DNS settings (where you can define the IPs, currently on `https://www.inwx.de/de/nameserver2`), and in the id attribute of the `