██████╗ ██████╗ ██████╗ ███╗ ██╗███████╗
██╔════╝ ██╔═══██╗██╔══██╗████╗ ██║██╔════╝
██║ ███╗██║ ██║██║ ██║██╔██╗ ██║███████╗
██║ ██║██║ ██║██║ ██║██║╚██╗██║╚════██║
╚██████╔╝╚██████╔╝██████╔╝██║ ╚████║███████║
╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝
GoDNS is a dynamic DNS (DDNS) tool, it is based on my early open source project: DynDNS.
Now I rewrite DynDNS by Golang and call it GoDNS.
For MIPS32 platform, please checkout the mips32 branch, this branch is contributed by hguandl, in this branch, the support for mips32 is added, which means it could run properly on Openwrt and LEDE.
- Get source code from Github:
git clone https://github.com/timothyye/godns.git
- Go into the godns directory, get related library and then build it:
cd godns
go get
go build
$ ./godns -h
Usage of ./godns:
-c string
Specify a config file (default "./config.json")
-d Run it as docker mode
-h Show help
- Get config_sample.json from Github.
- Rename it to config.json.
- Configure your domain/sub-domain info, username and password of DNSPod account.
- Configure log file path, max size of log file, max count of log file.
- Configure user id, group id for safety.
- Save it in the same directory of GoDNS, or use -c=your_conf_path command.
nohup ./godns &
- Install
upstart
first - Copy
./upstart/godns.conf
to/etc/init
- Start it as a system service:
sudo start godns
- Modify
./systemd/godns.service
and config it. - Copy
./systemd/godns.service
to/lib/systemd/system
- Start it as a systemd service:
sudo systemctl enable godns
sudo systemctl start godns
Now godns supports to run in docker.
- Pull godns image from docker hub:
docker pull timothyye/godns:1.0
- Run godns in container and pass config parameters to it via enviroment variables:
docker run -d --name godns --restart=always \
-e EMAIL=your_dnspod_account \
-e PASSWORD=your_dnspod_password \
-e DOMAINS="your_domain1,your_domain2" DOCKER_IMAGE_ID