Skip to main content

UniFi Network provider for octoDNS

Project description

UniFi Network provider for octoDNS

An octoDNS provider that targets UniFi Network controllers for local DNS management.

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.0
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@ec9661f8b335241ae4746eea467a8509205e6a30#egg=octodns_unifi

Configuration

Requires UniFi Network 10.1+ with the integration API (v1) and an API key.

providers:
  unifi:
    class: octodns_unifi.UnifiProvider
    # Controller hostname or IP (for local access)
    host: unifi.example.com
    # API key generated from UniFi controller settings
    api_key: env/UNIFI_API_KEY
    # Site name (optional, defaults to 'default')
    site: default
    # Disable SSL verification for self-signed certs (optional, defaults to true)
    verify_ssl: true
    # For cloud access via api.ui.com, provide your console ID (optional)
    # console_id: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:123456"
    # Default TTL in seconds (optional, defaults to 300)
    default_ttl: 300
    # Zone list for dynamic zone config (optional)
    # If omitted, zones are auto-detected from existing records assuming
    # two-label zones (e.g. example.com). Use explicit zones for multi-label
    # TLDs like co.uk or com.au.
    # zones:
    #   - example.com.
    #   - internal.example.

Cloud access

To manage DNS via the Ubiquiti cloud API instead of connecting directly to the controller, set console_id to your console's ID (found in the URL at unifi.ui.com):

providers:
  unifi:
    class: octodns_unifi.UnifiProvider
    host: unused
    api_key: env/UNIFI_API_KEY
    console_id: env/UNIFI_CONSOLE_ID

Support Information

Records

The following record types are supported:

Record Support
A Yes
AAAA Yes
CNAME Yes
MX Yes
TXT Yes
SRV Yes

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

octodns_unifi-1.1.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

octodns_unifi-1.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file octodns_unifi-1.1.0.tar.gz.

File metadata

  • Download URL: octodns_unifi-1.1.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for octodns_unifi-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b980ba6afa1d29178f3afb650d09f3880d94dd4aea6606b2dedc740c5a9da034
MD5 12ebbdf56fc9728862690a11e0132e18
BLAKE2b-256 469e3cbe45b5242e2678c6a8731f86198518d2bb8da0a5d6531542cb82e9ee8b

See more details on using hashes here.

File details

Details for the file octodns_unifi-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: octodns_unifi-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for octodns_unifi-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6712e0dcd03c6f628d60ad99cc32d98e4b7a6be093906766847ad68255c39bb6
MD5 d7d75b4df6fdb81a9f40b8ce6b936df7
BLAKE2b-256 7463cb79142246818042750b546067b9ab397d083c1792b7138692399ff6f78d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page