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 to disable it, or
# point it at a CA bundle (e.g. /etc/ssl/internal-ca.crt) to trust a
# self-signed/internal certificate without turning verification off.
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.
Metadata
Release files for octodns-unifi 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| octodns_unifi-1.2.1.tar.gz | 16.6 kB | Without provenance | Details for octodns_unifi-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| octodns_unifi-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for octodns_unifi-1.2.1-py3-none-any.whl |
Total release size: 25.7 kB
Release files / octodns_unifi-1.2.1.tar.gz
| Download URL | octodns_unifi-1.2.1.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4257dda5dcb7783304f2437b04d38d16db03a251c8ea39204b641b6cc0d14ae
|
|
BLAKE2b-256 checksum How to use checksums |
ad79e62271b717056722404243daeb0443f667433aa0fa157c838663904dfa1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / octodns_unifi-1.2.1-py3-none-any.whl
| Download URL | octodns_unifi-1.2.1-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b13070484362802fb7ee8d6e123048c9810c77ab0aaeaf54d94ddf0f46400fb
|
|
BLAKE2b-256 checksum How to use checksums |
ad2200d495958da234fc390a65fe3cdb6ae5f56083e2efe7da598fd463576003
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Security for octodns-unifi 1.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.