DreamHost DNS Updater
This project is intended to simulate dynamic DNS for DreamHost customers. It will monitor the specified domains on your DreamHost account and keep them updated when your IP public changes.
The current version support IPv4 only.
- Generate an API key here: https://panel.dreamhost.com/?tree=home.api
- I suggest giving access only to the DNS functions (all 3 are required)
- Paste the API key at the top of dh-dns.py (
API_KEY = "YOUR_API_KEY_GOES_HERE")
- Update the
DOMAINSlist at the top of dh-dns.py with the domains you want to monitor (DOMAINS = ["dyn.example.com","test.example.com"]) - Update the
COMMENTif you wish. This will be added to the DNS records if not blank (COMMENT = "Last updated by dh-dns: {date}") - Update
UPDATE_INTERVALif you wish to update more or less frequently. Default is 60 minutes (UPDATE_INTERVAL = 60) - Update
LOG_LEVELif you wish to log more or less info. Available options areWARNING,INFO,DEBUGand each will give more info than the last (LOG_LEVEL = "INFO")
- Install Python (written for Python 3.5+ as of v1.4, might not work properly with earlier versions)
- Install dependent modules:
pip install pyprowlpip install IPypip install requests
- I run this on my Synology NAS as a scheduled task (at system start), using
dh-dns.shas the startup script
- Feel free to post an issue on GitHub
- If you have questions or suggestions, message me on reddit (/u/toddrob), or email me (todd at toddrob.com)
- Updated to run on Python 3.5+
- Added support for
flake8linting andblackformatting - Removed
simplejsonandurllib2dependencies, replaced withrequests - Removed
Prowlclass in favor ofpyprowlmodule - Updated to use
api.ipify.orgto get current public IP
- Added support for Prowl notifications
- Moved dh-dns.log to logs directory, set weekly log file rotation with retention of 3 previous files (via
Loggerclass) - Add
IPyandsimplejsondependency installs todh-dns.shstartup script
- Check individual domains even if last known IP matches newly-detected IP. That way if an update failed last time around, it will try again.
- Improved logging
- Added dh-dns.sh to run as a daemon on Linux (I use it on Synology)
- Updated README