rumd3x/dns-updater
Composer 安装命令:
composer create-project rumd3x/dns-updater
包简介
Updates your DNS records on your DNS provider when it changes.
README 文档
README
Updates your DNS records on your DNS provider when it changes.
About
This project is a PHP utility used to update DNS Records on multiple DNS providers. It is basically used to keep an DNS "A" Record in sync with your public IP automatically, on any provider.
Currently available providers are:
- Cloudflare
- DigitalOcean
Usage
Running Locally
This tool does not ensure that your configurations are correct. Configure your DNS settings correctly on your provider first, and use this tool only to keep the record updated.
- Download the project locally
git clone https://github.com/rumd3x/dns-updater.git
# or
composer create-project rumd3x/dns-updater
Make sure to install the dependencies with composer install when using git clone.
- Copy the
.env.examplefile to.envand fill in the necessary parameters.
PROVIDERshould be eitherdigitaloceanorcloudflare.KEYYour API key of the provider. If your provider is cloudflare it should beemail@email.com;your-api-key.DOMAINThe domain that your record belongs to, likemysite.com.RECORDThe record that will be updated E.g.'ddns'for updating the record atddns.mysite.com.
- Now run the
app/bootstrap.phpfile and watch your DNS records get updated. - Put the command to call the project on a schedule (Like a cron running it every 5 minutes or so) to make sure it is always up to date.
Running the docker way
You can also run this project using docker. It will run the project on a schedule (every 5 mins) by default. Just run the following command and you are good to go (refer for the environment variables definitions in the section above).
docker run --name dns-updater-mysite-ddns \
--env PROVIDER=cloudflare \
--env KEY=email@email.com;my-api-key-here \
--env DOMAIN=mysite.com \
--env RECORD=ddns \
--restart unless-stopped \
edmur/dns-updater
To check what's going on inside the container just run:
docker logs dns-updater-mysite-ddns
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-04-05