kulak / namecheap-ddns

Maintain Namecheap DNS record using a simple executable written in GO language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

Overview

Calls https://myip.supermicro.com/ to detect external IP address and then calls Namecheap Dynamic DNS REST API to update DNS record.

Released image is based on portablectl image. See references section below for details.

Usage

Application Syntax

namecheap-ddns [config_file]
  • config_file is a YAML configuration file. Default value is namecheap-ddns.yaml. See, example

Portable Image Deployment Example

All of the following commands require sudo prepended if running from non-root account.

mkdir -p /usr/local/portable-images/
cd /usr/local/portable-images
curl -LO https://github.com/kulak/namecheap-ddns/releases/download/1.2/namecheap-ddns.raw
mkdir /etc/namecheap-ddns

dd of=/etc/namecheap-ddns/namecheap-ddns.yaml
# paste your file configuration
hosts: 
  - hostname1
  - hostname2
domain: domain.com
password: your_password
# Use Ctrl-D to end input stream

portablectl attach /usr/local/portable-images/namecheap-ddns.raw

# run once
systemctl start namecheap-ddns.service

# enable and run timer 
systemctl enable --now namecheap-ddns.timer

# monitor service
journalctl -u namecheap-ddns

Build

The build file uses taskfile.dev.

Refernces

Namecheap Documentation

  1. How do I enable Dynamic DNS for a domain?
  2. How do I set up a Host for Dynamic DNS?
  3. How do I use a browser to dynamically update the host's IP?

Portable Image

  1. Portable Services Introduction
  2. portablectl manpage

About

Maintain Namecheap DNS record using a simple executable written in GO language.

License:MIT License


Languages

Language:Go 100.0%