Skip to content

The Porkbun DDNS Python API wrapped into a lightweight docker image

License

Notifications You must be signed in to change notification settings

Pavlinchen/Porkbun-DDNS-Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Porkbun DDNS Docker

This Repository wraps the (now legacy, but as of 01/2025 still working) Porkbun dynamic DNS (DDNS) Python API into a lightweight, multiplattform docker image

Table of contents

  1. Usage
  2. Building from source
  3. Environment variables

Usage

For an in depth explanation on how the API works or how to get started, please refer to the official getting started guide, the official API documentation and/or the wrapped official porkbun repository.

Docker compose

version: "3"
services:
    porkbun-ddns:
        image: pavlinchen/porkbun-ddns
        container_name: porkbun-ddns
        restart: always
        pull_policy: always
        environment:
            APIKey: <YourAPIKey>
            SecretAPIKey: <YourSecretAPIKey>
            Domain: <YourDomain>
            Schedule: <YourSchedule (in cron syntax)> #optional
            TZ: <YourTimezone> #optional

CLI

docker run -d \
-e APIKey="<YourAPIKey>" \
-e SecretAPIKey="<YourSecretAPIKey>" \
-e Domain="<YourDomain>" \
-e Schedule="<YourSchedule (in cron syntax)>" \
-e TZ="<YourTimezone>" \
--pull=always \
--restart always \
--name porkbun-ddns \
pavlinchen/porkbun-ddns

Building from source

Tip

Please note, that the pull=always policy needs to be removed (or changed) in order to run the local build.
Furthermore the tag for your container ("pavlinchen/porkbun-ddns" in the examples above) needs to be adjusted when running the locally built container to the tag that is set with '-t' here ("porkbun-ddns" below).

git clone https://github.com/Pavlinchen/Porkbun-DDNS-Docker
cd Porkbun-DDNS-Docker
docker build . -t porkbun-ddns

Environment variables

Argument description example default required
APIKey The API key provided to you by porkbun pk1_abcdef123456 None yes
SecretAPIKey The secret API key provided to you by porkbun sk1_abcdef123456 None yes
Domain The Domain you want to map to your IP adress, as seen here google.com domains
(would be domains.google.com)
None yes
Schedule Schedule to execute the script to sync DNS A records with your IP address in cron syntax */10 * * * *
(every 10 minutes)
*/5 * * * *
(every 5 minutes)
no
TZ Your Timezone in tz database format name
(only really needed, if used in schedule)
Europe/Berlin UTC no

About

The Porkbun DDNS Python API wrapped into a lightweight docker image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published