From a0578880ef14f54647d7cfd96382395ab1e3cddb Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sun, 1 Sep 2024 22:03:26 -0500 Subject: format 2024 blog posts --- .../blog/2024-03-15-self-hosting-ddns-updater.org | 93 ++++++++++------------ 1 file changed, 41 insertions(+), 52 deletions(-) (limited to 'content/blog/2024-03-15-self-hosting-ddns-updater.org') diff --git a/content/blog/2024-03-15-self-hosting-ddns-updater.org b/content/blog/2024-03-15-self-hosting-ddns-updater.org index 4add649..64e7a6c 100644 --- a/content/blog/2024-03-15-self-hosting-ddns-updater.org +++ b/content/blog/2024-03-15-self-hosting-ddns-updater.org @@ -6,25 +6,21 @@ #+caption: DDNS Updater Web View [[https://img.cleberg.net/blog/20240315-ddns-updater/ddns.png]] -[[https://github.com/qdm12/ddns-updater][DDNS Updater]] is a program to -keep DNS A and/or AAAA records updated for multiple DNS providers. +[[https://github.com/qdm12/ddns-updater][DDNS Updater]] is a program to keep DNS A and/or AAAA records updated for multiple +DNS providers. -If you've read any of my other posts, you'll notice that I have been -searching for and using a few different DDNS updating solutions for -years. You'll also notice that I love any projects that offer a Docker -Compose solution. +If you've read any of my other posts, you'll notice that I have been searching +for and using a few different DDNS updating solutions for years. You'll also +notice that I love any projects that offer a Docker Compose solution. Luckily, DDNS Upater fits both of these preferences. ** Installation -To get started, always make sure to review the project's -[[https://github.com/qdm12/ddns-updater/blob/master/README.md][README]]. -I'll be documenting my steps below, but they may have changed by the -time you read this. +To get started, always make sure to review the project's [[https://github.com/qdm12/ddns-updater/blob/master/README.md][README]]. I'll be +documenting my steps below, but they may have changed by the time you read this. -The first step is to set up the directories and files required for the -project. +The first step is to set up the directories and files required for the project. #+begin_src sh mkdir ~/ddns-updater @@ -34,43 +30,36 @@ touch ~/ddns-updater/data/config.json *** Configuration -The main configuration you need to update is the =data/config.json= -file. There is a large list of supported providers in the README, but -I'm going to use Cloudflare in this example. +The main configuration you need to update is the =data/config.json= file. There +is a large list of supported providers in the README, but I'm going to use +Cloudflare in this example. #+begin_src sh nano ~/ddns-updater/data/config.json #+end_src -When setting up the configuration for Cloudflare, you'll need the -following: +When setting up the configuration for Cloudflare, you'll need the following: - Required Parameters - - ="zone_identifier"= is the Zone ID of your site from the domain - overview page - - ="host"= is your host and can be ="@"=, a subdomain or the wildcard - ="*"=. See - [[https://github.com/qdm12/ddns-updater/issues/243#issuecomment-928313949][this - issue comment for context]]. - - ="ttl"= integer value for record TTL in seconds (specify 1 for - automatic) - - One of the following - ([[https://developers.cloudflare.com/fundamentals/api/get-started/][how - to find API keys]]): + - ="zone_identifier"= is the Zone ID of your site from the domain overview + page + - ="host"= is your host and can be ="@"=, a subdomain or the wildcard ="*"=. + See [[https://github.com/qdm12/ddns-updater/issues/243#issuecomment-928313949][this issue comment for context]]. + - ="ttl"= integer value for record TTL in seconds (specify 1 for automatic) + - One of the following ([[https://developers.cloudflare.com/fundamentals/api/get-started/][how to find API keys]]): - Email ="email"= and Global API Key ="key"= - User service key ="user_service_key"= - - API Token ="token"=, configured with DNS edit permissions for your - DNS name's zone + - API Token ="token"=, configured with DNS edit permissions for your DNS + name's zone - Optional Parameters - - ="proxied"= can be set to =true= to use the proxy services of - Cloudflare - - ="ip_version"= can be =ipv4= (A records), or =ipv6= (AAAA records) - or =ipv4 or ipv6= (update one of the two, depending on the public - ip found). It defaults to =ipv4 or ipv6=. - - ="ipv6_suffix"= is the IPv6 interface identifier suffix to use. It - can be for example =0:0:0:0:72ad:8fbb:a54e:bedd/64=. If left empty, - it defaults to no suffix and the raw public IPv6 address obtained is - used in the record updating. + - ="proxied"= can be set to =true= to use the proxy services of Cloudflare + - ="ip_version"= can be =ipv4= (A records), or =ipv6= (AAAA records) or =ipv4 + or ipv6= (update one of the two, depending on the public ip found). It + defaults to =ipv4 or ipv6=. + - ="ipv6_suffix"= is the IPv6 interface identifier suffix to use. It can be + for example =0:0:0:0:72ad:8fbb:a54e:bedd/64=. If left empty, it defaults to + no suffix and the raw public IPv6 address obtained is used in the record + updating. #+begin_src conf { @@ -90,8 +79,8 @@ following: } #+end_src -Once you have configured the provider of your choice, correct the file -and directory permissions and ownership. +Once you have configured the provider of your choice, correct the file and +directory permissions and ownership. #+begin_src sh cd ~/ddns_updater @@ -105,8 +94,8 @@ chmod 400 data/config.json *** Docker Compose -After creating the project structure, let's create the -=docker-compose.yml= file. +After creating the project structure, let's create the =docker-compose.yml= +file. #+begin_src sh nano ~/ddns_-pdater/docker-compose.yml @@ -150,22 +139,22 @@ services: restart: always #+end_src -After configuring your preferences in the =docker-compose.yml=, launch -the container. +After configuring your preferences in the =docker-compose.yml=, launch the +container. #+begin_src sh cd ~/ddns-updater sudo docker-compose up -d #+end_src -If you've launched this on your local machine, you can launch -=localhost:8097= in your browser to see the results. +If you've launched this on your local machine, you can launch =localhost:8097= +in your browser to see the results. *** Nginx Reverse Proxy -If you launched this service on a server, other machine, or just want to -access it remotely via a domain name, you can use Nginx as a reverse -proxy to expose the service publicly. +If you launched this service on a server, other machine, or just want to access +it remotely via a domain name, you can use Nginx as a reverse proxy to expose +the service publicly. Start by creating the Nginx configuration file. @@ -193,8 +182,8 @@ server { } #+end_src -Here's a full example that uses my Authelia authentication service to -require authentication before someone can access the web page. +Here's a full example that uses my Authelia authentication service to require +authentication before someone can access the web page. #+begin_src conf server { -- cgit v1.2.3-70-g09d2