# gandi-dyndns-node

> Little piece of code in NodeJS to replace dynamically your IP of a Gandi's domain by your actual external IP address (for those who have a dynamic IP and who have some domains at Gandi's company).

Latest version **1.1.3** (published 2018-02-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install gandi-dyndns-node
pnpm add gandi-dyndns-node
yarn add gandi-dyndns-node
bun add gandi-dyndns-node
```

Provides the command `gandi`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2018-02-16 |
| First published | 2018-02-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Ghyslain Bruno |
| Maintainers | ghyslainbruno |
| Keywords | gandi, dns, ip, ipv4, dyndns, node, nodejs |

## Links

- npm: https://www.npmjs.com/package/gandi-dyndns-node
- Repository: https://github.com/GhyslainBruno/gandi-dyndns-node
- Homepage: https://github.com/GhyslainBruno/gandi-dyndns-node#readme
- Issues: https://github.com/GhyslainBruno/gandi-dyndns-node/issues
- npm.io page: https://npm.io/package/gandi-dyndns-node

## Dependencies (4)

- [config](https://npm.io/package/config.md) ^1.29.4
- [request](https://npm.io/package/request.md) ^2.83.0
- [commander](https://npm.io/package/commander.md) ^2.14.1
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.2

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.1.3 (latest) — 2018-02-16
- 1.1.2 — 2018-02-16
- 1.1.1 — 2018-02-16
- 1.1.0 — 2018-02-16
- 1.0.3 — 2018-02-15
- 1.0.2 — 2018-02-15
- 1.0.1 — 2018-02-15
- 1.0.0 — 2018-02-15

## README

[![NPM](https://nodei.co/npm/gandi-dyndns-node.png)](https://nodei.co/npm/gandi-dyndns-node/)

[![npm version](https://badge.fury.io/js/gandi-dyndns-node.svg)](https://badge.fury.io/js/gandi-dyndns-node)

# gandi-dyndns-node

This package is a very little piece of code (written in NodeJS) made just to be usefull. 

Why ? 
---

Because when you have some domain(s) at Gandi's and also have an IP dynamically changed you can't use a usual DynDns service.

How does it work ? 
---

Will check what is your external IP address, using Gandi's service (http://me.gandi.net), check if the value at Gandi is the good one, and if not change it, quite simple. 

In order to use it you just have to add options to the "update" command: 
* --domain-name: the domain on which you want to check the IP address
* --name: the name of the record you want to check (basically "@", but could be different)
* --type: the type of record you want to check (basically "A", but could be different)
* --api-key: your personnal API Key (which can be found in [here](https://account.gandi.net/) from the "security" section)

So basically, here is what you have to do to use it: 

```{r, engine='bash', count_lines}
npm install -g gandi-dyndns-node
``` 

```{r, engine='bash', count_lines}
gandi --domain-name YOUR_DOMAIN_NAME --name NAME_OF_RECORD --type TYPE_OF_RECORD --api-key YOUR_API_KEY update
```

This code uses the [LiveDNS API](http://doc.livedns.gandi.net/) from the Gandi v5. 

For any help you can refer to the Gandi documentation. 

For any bugs, PR are welcomed. 

Hope this helps.

Pro tips: using it in a [cron task](https://www.google.fr/search?q=add+a+cron+task&rlz=1C5CHFA_enFR705FR709&oq=add+a+cron+task&aqs=chrome..69i57.3798j0j7&sourceid=chrome&ie=UTF-8) can be usefull.

Pro tips #2: here is the crontab task working for Raspbian (but should work everywere, I guess) : 
 ```{r, engine='bash', count_lines}
 */5 * * * * /usr/local/lib/node_modules/gandi-dyndns-node/bin/gandyndnscli.js --domain-name YOUR_DOMAIN_NAME --name NAME_OF_RECORD --type TYPE_OF_RECORD --api-key YOUR_API_KEY update >> /tmp/gandi_dyndns_logs.txt
 ```

---
_Source: https://npm.io/package/gandi-dyndns-node · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
