diff options
| author | Joe Carstairs <me@joeac.net> | 2025-12-15 13:54:30 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2025-12-15 13:54:30 +0000 |
| commit | 3d2a0602e49d69a402387b965a4458779149ebc3 (patch) | |
| tree | 25bae7ef58633f457f87d5a6e4476c09e27e8418 /README.md | |
| parent | a7b5490ea9066a19c4fcd5b41b8b321b4356470c (diff) | |
add README
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..8296334 --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +# digitalocean_dyndns + +Forked from [dc25/digitalocean_dyndns](https://github.com/dc25/digitalocean_dyndns). + +This script automatically keeps your DNS records for a HTTPS website working +when you're hosting from a network with a dynamically allocated IP address, such +as a typical home network. + +To use this script, first mark the shell files as runnable: + +```sh +chmod +x ./dyndns.sh +chmod +x ./get_ip_addr.sh +``` + +Then to set things up, first write your domain name, e.g. `example.com`, to +`DIGITALOCEAN_DOMAIN`. Secondly, go to your DigitalOcean account and generate a +Personal Access Token with scopes for creating, reading, and deleting domains. +Write this to `DIGITALOCEAN_TOKEN`. + +The script should now run. Try it out: + +```sh +./dyndns.sh +``` + +Go to the control panel in DigitalOcean for your domain, and check the A and +AAAA records are what you expect. If they are, the next step is to get this +script to run regularly. + +You could do this in a number of ways. Probably the easiest is with crontab. +Run `crontab -e` to open your crontab for editing, and add these two lines: + +```cron +* * * * * /home/.../dyndns.sh 4 > /tmp/dyndns.sh.4.log 2>&1 +* * * * * /home/.../dyndns.sh 6 > /tmp/dyndns.sh.6.log 2>&1 +``` + +Wait one minute, and check the logs. If you want to see that it works, delete +the REPEAT_CHECK_A and REPEAT_CHECK_AAAA files and wait for the script to run +again. You may also want to have an MTA set up, as cron will try to send any +unhandled output to your inbox. |
