Skip to content
/ Oink Public

A lightweight DDNS client for Porkbun

License

Notifications You must be signed in to change notification settings

RLado/Oink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oink!

A lightweight DDNS client for Porkbun

Oink! is an unofficial DDNS client for porkbun.com built in Go. Oink! only depends on Go's standard library.


How to install

You can install Oink! using an official package or by using make.

Get it from the Snap Store

Setup instructions for the snap package can be found on the Snap Store

On distributions supporting .deb files (Debian, Ubuntu, ...)

dpkg -i <oink_pkg>.deb

On Arch-based distros

Note: Also available in the AUR

pacman -U <oink_pkg>.pkg.tar.zst 

Or you can build from source and install using make

Requires make and go

make
sudo make install

You may uninstall using sudo make uninstall to remove all configuration files and binaries

For distributions using init systems other than systemd alternative init scripts are provided in the init directory


How to setup

The setup process is simple:

  • If installed correctly you should find Oink!'s configuration file in /etc/oink_ddns/config.json. Open the file with your text editor of choice.
  • In the configuration file you should find the following contents that must be filled in:

⚠️ In case you do not already have an API key, you will need to request one at: https://porkbun.com/account/api

{
    "global": {
        "secretapikey": "<your secret api key here>",
        "apikey": "<your api key here>",
        "interval": 900,
        "ttl": 600
    },
    "domains": [
        {
            "domain": "<your domain here>",
            "subdomain": "<your subdomain here>"
        }
    ]
}

If you want to update more than one domain or subdomain, you can add new domains like so:

{
    "global": {
        "secretapikey": "<your secret api key here>",
        "apikey": "<your api key here>",
        "interval": 900,
        "ttl": 600
    },
    "domains": [
        {
            "secretapikey": "<override secret api key here>",
            "apikey": "<override api key here>",
            "domain": "<your domain here>",
            "subdomain": "<your subdomain here>",
            "ttl": 800
        },
        {
            "domain": "<your domain 2 here>",
            "subdomain": "<your subdomain 2 here>"
        }
    ]
}

Entries must at least contain the domain and subdomain fields.

  • Enable and start the service using systemd

⚠️ Make sure to enable API ACCESS in your porkbun domain's control panel

systemctl enable oink_ddns
systemctl start oink_ddns
  • You are done! Your domain DNS record should update automatically