# DDNS Setup ## Porkbun API Follow this [porkbun](https://kb.porkbun.com/article/190-getting-started-with-the-porkbun-api) guide on enabling the api for your domain. ## ddns-updater [ddns-updater](https://github.com/qdm12/ddns-updater) is the program used to update Porkbun's A record of your domain. ### Docker install Install the [docker](https://docs.docker.com/engine/install/debian/) package from official docker repositories. ### Setup Create a directory with config.json inside, and make sure that its owner has a uid of 1000. mkdir data touch data/config.json # Owned by user ID of Docker container (1000) chown -R 1000 data # all access (for creating json database file data/updates.json) chmod 700 data # read access only chmod 400 data/config.json Configuration for porkbun in config.json { "settings": [ { "provider": "porkbun", "domain": "domain.com", "host": "@", "api_key": "PORKBUN SECRET KEY", "secret_api_key": "PORKBUN API KEY", "ip_version": "ipv4" } ] } Optional `"ttl"` paramter specifing A record TTL not included. ### Usage docker run -d -p 8000:8000/tcp -v "$(pwd)"/data:/updater/data qmcgaw/ddns-updater This will start a docker container that will start updating the DNS records. Status updates can be seen in a web server by going to localhost:8000.