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