-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,58 @@ | ||
# namecheap-ddns | ||
# Namecheap DDNS docker client | ||
|
||
## When to use ? | ||
|
||
If your server do not have static IP, i.e. When Public IP of your server / router keep changing, This will automatically update new IP to Namecheap record. | ||
|
||
## Why to use it ? | ||
|
||
* Easy to setup | ||
|
||
* Lightweight | ||
|
||
* No cronjob configuration required | ||
|
||
* Logs for visibility | ||
|
||
* Open source | ||
|
||
## How to use it | ||
|
||
* Enable Dynamic DNS for your domain from Namecheap. `Namecheap Account -> Domain List -> Manage -> Advanced DNS -> Dynamic DNS -> Toggle Status` | ||
|
||
* Copy the Dynamic DNS password which is generated after enabling Dynamic DNS. Keep it safe and handy. | ||
|
||
* Add a record of type `A + Dynamic DNS` with required host name. | ||
|
||
* Install docker on server. | ||
|
||
* Run below command | ||
|
||
Suppose, You need DDNS for `server.example.com` | ||
|
||
``` | ||
docker run --name server.example.com -d --restart unless-stopped -e NC_HOST='server' -e NC_DOMAIN='example.com' -e NC_PASS='DynamicDDNSPa2w0rd' linuxshots/namecheap-ddns:1.0.0 | ||
``` | ||
|
||
Here, | ||
`NC_HOST` is host name added in Namecheap record. | ||
|
||
`NC_DOMAIN` is your domain name. | ||
|
||
`NC_PASS` is your Dynamic DDNS password which is generated from Namecheap. | ||
|
||
* Check the log | ||
|
||
``` | ||
docker logs server.example.com | ||
``` | ||
|
||
* To stop, start and remove DDNS. | ||
|
||
``` | ||
docker stop server.example.com # To stop | ||
docker start server.example.com # To start after its stopped | ||
docker rm server.example.com -f # To remove | ||
``` | ||
|
||
NOTE: This sets the TTL to Automatic i.e. 30 minutes. Currently, There is no way provided by Namecheap to set custom TTL in Dynamic DDNS. |