UniFi Network provider for octoDNS
Project description
UniFi Network provider for octoDNS
An octoDNS provider for managing local DNS on UniFi Network controllers.
Installation
Command line
pip install octodns-unifi
requirements.txt/setup.py
Pinning specific versions or SHAs is recommended to avoid unplanned upgrades.
Versions
# Start with the latest versions and don't just copy what's here
octodns==1.16.0
octodns-unifi==1.1.3
SHAs
# Start with the latest/specific versions and don't just copy what's here
-e git+https://git@github.com/octodns/octodns.git@9da19749e28f68407a1c246dfdf65663cdc1c422#egg=octodns
-e git+https://git@github.com/netshad0w/octodns-unifi.git@9da63f00309d76bfa94001c0cfdc0c594a647b97#egg=octodns_unifi
Configuration
Requires UniFi Network 10.1+, the integration API (v1), and an API key.
providers:
unifi:
class: octodns_unifi.UnifiProvider
# Controller hostname or IP (local access)
host: unifi.example.com
# API key from UniFi controller settings
api_key: env/UNIFI_API_KEY
# Site name (defaults to 'default')
site: default
# SSL verification (defaults to true)
# Set to false for self-signed certificates
verify_ssl: true
# Console ID for cloud access via api.ui.com (see below)
# console_id: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:123456"
# TTL in seconds (defaults to 300)
default_ttl: 300
# Explicit zone list, useful for multi-label TLDs (co.uk, com.au)
# When omitted, zones are guessed from the last two labels of each
# record (e.g. host.example.com -> example.com)
# zones:
# - example.com.
# - internal.example.
Cloud access
You can manage DNS through the Ubiquiti cloud API instead of
connecting directly to the controller. Set console_id to your
console's ID, which you can grab from the URL at
unifi.ui.com
(https://unifi.ui.com/consoles/<console_id>/...).
host is still required but gets ignored when console_id is set.
providers:
unifi:
class: octodns_unifi.UnifiProvider
host: unused
api_key: env/UNIFI_API_KEY
site: default
console_id: env/UNIFI_CONSOLE_ID
Support Information
Records
| Record | Support |
|---|---|
| A | ✅ |
| AAAA | ✅ |
| ALIAS | ❌ |
| CAA | ❌ |
| CNAME | ✅ |
| DNAME | ❌ |
| DS | ❌ |
| HTTPS | ❌ |
| LOC | ❌ |
| MX | ✅ |
| NAPTR | ❌ |
| NS | ❌ |
| PTR | ❌ |
| SPF | ❌ |
| SRV | ✅ |
| SSHFP | ❌ |
| SVCB | ❌ |
| TLSA | ❌ |
| TXT | ✅ |
| URI | ❌ |
| URLFWD | ❌ |
Limitations
Custom TTL values only work for A, AAAA, and CNAME records. For MX, TXT, and SRV, the controller manages the TTL and any octodns value is ignored.
Zone auto-detection infers zones from the last two labels of each
domain (e.g. example.com). If you use multi-label TLDs like
co.uk or com.au, set zones explicitly in the provider config.
Dynamic
UnifiProvider does not support dynamic records.
Development
See the /script/ directory for some tools to help with
the development process. They generally follow the
Script to rule them all
pattern. Most useful is ./script/bootstrap which will create a
venv and install both the runtime and development related
requirements. It will also hook up a pre-commit hook that covers
most of what's run by CI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file octodns_unifi-1.1.3.tar.gz.
File metadata
- Download URL: octodns_unifi-1.1.3.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c838d4e0c0ce22f2aecb42c40ee9c39cbd31b17151a160cbdb9378ab66be434
|
|
| MD5 |
04574fde4e2f5f238d7fd72090517748
|
|
| BLAKE2b-256 |
5c3955698544a5a0a380073f075b706148c2733ffb76cc67922782c4eeac0875
|
File details
Details for the file octodns_unifi-1.1.3-py3-none-any.whl.
File metadata
- Download URL: octodns_unifi-1.1.3-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33a5f6b9094978a0fb455729afb6d53d47dcc4aa8d444524b5cf7a1cf21da79d
|
|
| MD5 |
fa33f657d58351418a5399bfa4babddd
|
|
| BLAKE2b-256 |
1f93350ee7cddff26441d9a14ca25b2ffae99fb124659f21d1df2c7ac9aaf45f
|