longkeyy/dynu-updater

By longkeyy

Updated over 1 year ago

Image
Networking
Internet of things
1

3.9K

longkeyy/dynu-updater repository overview

Dynu IP Updater Docker

Repository Overview

This repository contains a Docker-based solution for automatically updating your Dynu DNS records. It's designed to keep your dynamic IP address in sync with your Dynu DNS settings, ensuring that your domain always points to the correct IP address.

Key Features
  • Automatic IP Updates: Periodically checks and updates your Dynu DNS records.
  • Multi-Architecture Support: Built for both AMD64 and ARM64 architectures.
  • Flexible Configuration: Supports configuration via environment variables, .env file, and command-line arguments.
  • Docker Integration: Easy to deploy and run in containerized environments.
  • Customizable Update Interval: Default update interval is 5 minutes, but can be adjusted.

Installation and Configuration

Follow these steps to install and configure the Dynu IP Updater:

  1. Prepare Your Dynu Credentials:

    • Log into your Dynu Control Panel: https://www.dynu.com/en-US/ControlPanel
    • Navigate to "Manage Credentials" under the "Control Panel" menu.
    • Look for the "IP Update Password" section. This is the password you'll need to use with this updater.
    • If you haven't set an IP Update Password yet, create one now.
  2. Pull the Docker Image:

    docker pull longkeyy/dynu-updater:latest
    
  3. Prepare Configuration: Create a .env file with the following contents:

    USERNAME=your_dynu_username
    HASHED_PASSWORD=your_sha256_hashed_ip_update_password
    HOSTNAME=your.domain.com
    ALIAS=optional_alias
    IPV4=optional_static_ipv4
    IPV6=optional_static_ipv6
    

    Replace the values with your actual Dynu credentials and settings. For HASHED_PASSWORD, use the SHA256 hash of your IP Update Password (see hashing instructions below).

  4. Run the Container:

    Create a docker-compose.yml file in the same directory as your .env file:

    version: '3'
    services:
      dynu-updater:
        image: longkeyy/dynu-updater:latest
        container_name: dynu-updater
        env_file: .env
        restart: unless-stopped
    

    Then run:

    docker-compose up -d
    
    Using Docker CLI

    If you prefer to use the Docker CLI directly:

    docker run -d --name dynu-updater --env-file .env --restart unless-stopped longkeyy/dynu-updater:latest
    
Configuration Options

The Dynu IP Updater can be configured using environment variables, a .env file, or command-line arguments.

Required Parameters
  • Either HASHED_PASSWORD or a plain password (which will be hashed) must be provided. This should be your Dynu IP Update Password, not your account password.
  • HOSTNAME must be provided.
Optional Parameters
  • USERNAME: Your Dynu username (if required for authentication)
  • ALIAS: If you're updating an alias instead of the main hostname
  • IPV4: Static IPv4 address (if not provided, the current public IP will be used)
  • IPV6: Static IPv6 address (if not provided, the current public IP will be used)
Configuration Priority

The order of priority for configuration is:

  1. Command-line arguments (highest priority)
  2. Environment variables
  3. .env file (lowest priority)
Using Environment Variables

You can set the variables directly in the docker-compose.yml file:

version: '3'
services:
  dynu-updater:
    image: longkeyy/dynu-updater:latest
    container_name: dynu-updater
    environment:
      - USERNAME=your_dynu_username
      - HASHED_PASSWORD=your_sha256_hashed_ip_update_password
      - HOSTNAME=your.domain.com
      - ALIAS=optional_alias
      - IPV4=optional_static_ipv4
      - IPV6=optional_static_ipv6
    restart: unless-stopped
Using Command-Line Arguments

When using Docker Compose, you can override settings by modifying the command:

version: '3'
services:
  dynu-updater:
    image: longkeyy/dynu-updater:latest
    container_name: dynu-updater
    command: 
      - "-u"
      - "your_dynu_username"
      - "-hp"
      - "your_sha256_hashed_ip_update_password"
      - "-h"
      - "your.domain.com"
      - "-a"
      - "optional_alias"
      - "-4"
      - "optional_static_ipv4"
      - "-6"
      - "optional_static_ipv6"
    restart: unless-stopped
Hashing Your Password

To hash your IP Update Password using SHA256, you can use the following command:

echo -n "your_ip_update_password" | sha256sum | awk '{print $1}'

Use the output of this command as the value for HASHED_PASSWORD.

Usage

Once configured and running, the Dynu IP Updater will automatically check and update your DNS records every 5 minutes. You can monitor its activity by checking the container logs:

docker-compose logs

or

docker logs dynu-updater

To stop the updater:

docker-compose down

or

docker stop dynu-updater

To start it again:

docker-compose up -d

or

docker start dynu-updater

Tag summary

Content type

Image

Digest

sha256:3c41a5233

Size

6.1 MB

Last updated

over 1 year ago

docker pull longkeyy/dynu-updater:1.1