Skip to content

timotree/porkbun-ddns-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Porkbun DDNS

Basic instructions for set up. Note that Windows users should use the python command instead of python3, pip instead of pip3, and the Task Scheduler instead of cron.

  1. Clone the Git repo: git clone
  2. Change to the new repo directory: cd porkbun-ddns
  3. Create a virtual environment:
    • Linux: python3 -m venv venv
    • Windows: python -m venv venv
  4. Activate the virtual environment:
    • Linux: source venv/bin/activate
    • Windows: .\venv\Scripts\activate
  5. Update pip:
    • Linux: python3 -m pip install pip -U
    • Windows: python -m pip install pip -U
  6. Install required packages:
    • Linux: pip3 install -r requirements.txt
    • Windows: pip install -r requirements.txt
  7. Optional: configure Healthchecks.io project for every 10 minutes
    • Save the UUID for your task
  8. Configure config.json
    1. Copy or rename example-config.json to config.json
    2. Populate "domain" with your TLD
    3. Populate "apikey" and "secretapikey" with your keys generated by Porkbun
    4. Optional: populate "healthchecksUUID" with your UUID from step 7
    5. Leave "lastIP" blank unless the "A" record is already set with your current IP address. Otherwise, populate with your current IP address.
  9. Schedule a task to run every 10 minutes
    • Linux: Add a cron task using: crontab -e
      • Add the job: */10 * * * * cd /path/to/porkbun-ddns; ./venv/bin/python3 porkbun-ddns.py
    • Windows: Open the Task Scheduler
      1. Click Create Task
      2. Give it a name
      3. Add a new Trigger
      4. Begin the task: On a schedule
      5. Daily
      6. Start at the top of the next hour, for convenience
      7. Repeat task every: 10 mintues
      8. Add a new Action
      9. Program: C:\Path\To\porkbun-ddns\venv\Scripts\python.exe
      10. Add arguments: porkbun-ddns.py
      11. Start in: C:\Path\To\porkbun-ddns

About

A very, very basic DDNS for Porkbun using their direct API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages