1.3 KiB
Dynamic DNS Client for Porkbun API
A simple program for keeping all of your "A" records up to date!
Note: this program assumes that all domains and subdomains will be sharing the same IP.
To use, you will first need your own Porkbun API key + secret.
Once you know your key+secret, download and place the porkbun-ddns executable in a folder.
Create a new file in the same folder, and name it .env.
Copy the text below into the .env file, replacing the XXX's and example domains with your own information.
Note: only include top-level domains, the program will take care of identifying and updating any sub-domains
{
"secretapikey": "XXXXXXXXXXXXX",
"apikey": "XXXXXXXXXXXXX",
"domains": [
"example.com",
"example.net",
"example.io"
]
}
You are now ready to run the program! Running it will retreive all "A" records belonging to the domains you specified, then update any outdated IP addresses.
I recommend scheduling the program with something like cron so that you aren't manually running it each time you want to update your DNS information.
Source code is included, you can build it yourself if you want but the executable is up to date.
This program was written in Vim with only the Go standard library, if that means anything to you..