Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jalmargyyk/netbox-ripe-updater/llms.txt

Use this file to discover all available pages before exploring further.

Netbox RIPE Updater uses a three-file JSON template system to define the attributes written to INETNUM and INET6NUM objects in RIPE-DB. Rather than hard-coding RIPE attributes per prefix, you define reusable base templates that carry shared attributes (maintainers, contacts, source), compose named templates on top of those bases, and map each of your LIRs to its RIPE organisation object. This separation keeps common settings in one place and lets you mix and match templates across customers and use cases without duplication.
Point RIPE_DB=TEST in .env.updater while you are building and validating your templates. The RIPE TEST database accepts writes without affecting live registry data, so you can iterate safely before switching to RIPE_DB=RIPE in production.

Template components

The template directory (set by RIPE_TEMPLATE_DIR in .env and mounted into the container as TEMPLATES_DIR) must contain three files.
FilePurpose
lir_org.jsonMaps each LIR identifier to its RIPE organisation object handle.
base_*.jsonOne or more base templates, each defining a full set of INETNUM/INET6NUM attributes.
templates.jsonNamed templates that extend a base template and add or override specific attributes.
The ripe_template custom field on a NetBox prefix selects which named template from templates.json to apply when writing to RIPE-DB.

lir_org.json

This file maps each LIR key (used in the lir custom field on NetBox aggregates) to the corresponding RIPE organisation object identifier.
lir_org.json
{
    "templates": {
        "lir_org": {
            "de.examplelir1": "ORG-EIPB1-TEST",
            "nl.examplelir2": "ORG-TT1-TEST"
        }
    }
}
Each key on the left (e.g. de.examplelir1) must exactly match a choice value in the lir custom field in NetBox. The value on the right (e.g. ORG-EIPB1-TEST) is the RIPE organisation object handle that will be written to the org attribute when a base template contains an empty {"org": ""} placeholder.

Base templates

A base template defines the full set of RIPE attributes that will appear on INETNUM and INET6NUM objects. Create one base template for each distinct set of contacts or maintainers — typically one for your own company and one for each customer that requires different RIPE contacts.

Example: company base template

base_mycompany.json
{ "attributes": [
    {"org": ""},
    {"remarks": "Managed by ripe-updater"},
    {"admin-c": "AA1-TEST"},
    {"tech-c": "AA1-TEST"},
    {"notify": "noc@example.com"},
    {"mnt-by": "TEST-DBM-MNT"},
    {"source": "TEST"}
]}
The empty {"org": ""} object is required for auto-fill. When the updater encounters this placeholder it replaces the empty string with the organisation handle looked up from lir_org.json for the aggregate’s LIR. Omitting this entry means the org attribute will not be set (and INCLUDE_ORG=no must be set if you want to suppress org entirely).
AttributeDescription
orgEmpty string placeholder — auto-filled from lir_org.json.
remarksFree-text remark written to the RIPE object.
admin-cAdministrative contact NIC handle.
tech-cTechnical contact NIC handle.
notifyEmail address notified on changes to the object.
mnt-byMntner object responsible for maintaining this record.
sourceDatabase source (TEST for the test database, RIPE for production).

Example: customer base template

When a customer requires different contacts or maintainers, create a separate base template. In this case the org value is set explicitly rather than auto-filled.
base_mycustomer1.json
{ "attributes": [
    {"remarks": "Managed by ripe-updater"},
    {"org": "ORG-EIPB1-TEST"},
    {"admin-c": "AA2-TEST"},
    {"tech-c": "AA2-TEST"},
    {"abuse-c": "AA1-TEST"},
    {"notify": "noc@example.com"},
    {"mnt-by": "TEST-NCC-HM-MNT"},
    {"source": "TEST"}
]}

templates.json and template inheritance

templates.json defines the named templates that appear as choices in the ripe_template custom field in NetBox. Each named template specifies a set of additional attributes and the base template it inherits from.
templates.json
{
    "templates": {
        "CLOUD-POOL": {
            "attributes": [
                {"descr": "MyCompany Cloud Pool"}
            ],
            "inherit": "base_mycompany.example.json"
        },
        "INFRA-TRANSFER-NET": {
            "attributes": [
                {"descr": "MyCompany Infrastructure Transfer Network"}
            ],
            "inherit": "base_mycompany.example.json"
        },
        "CUST-ACCESS-NET": {
            "attributes": [
                {"descr": "MyCompany Customer Access"}
            ],
            "inherit": "base_mycompany.example.json"
        },
        "CUST-ACCESS-NET-MYCUSTOMER1": {
            "attributes": [
                {"descr": "MyCustomer 1 Ltd., Example Street 33"}
            ],
            "inherit": "base_mycustomer1.example.json"
        }
    }
}
The inherit field names the base template file to merge with. When the updater processes a prefix, it combines the attributes from the named template with those from its inherited base template. Attributes in the named template are prepended, so descr appears before the attributes from the base file in the final RIPE object. The template keys (CLOUD-POOL, INFRA-TRANSFER-NET, etc.) must be added as choices to the ripe_template custom field in NetBox so that prefix editors can select them.

Setting up your own templates

1

Copy the example directory

Copy the bundled example templates to a new directory that you will manage separately:
cp -r ripe-templates/example ripe-templates/custom
2

Update RIPE_TEMPLATE_DIR

Point the RIPE_TEMPLATE_DIR variable in .env at your new directory:
.env
RIPE_TEMPLATE_DIR=./ripe-templates/custom
3

Edit lir_org.json

Replace the example LIR-to-organisation mappings with your own:
lir_org.json
{
    "templates": {
        "lir_org": {
            "de.yourlir": "ORG-YOURORG-RIPE"
        }
    }
}
4

Create base templates

Create one base_*.json file for each distinct set of RIPE contacts your prefixes require. Use {"org": ""} as a placeholder for LIR-derived organisation handles.
5

Edit templates.json

Define the named templates your NetBox operators will select. Reference your new base template filenames in each inherit field:
templates.json
{
    "templates": {
        "CLOUD-POOL": {
            "attributes": [
                {"descr": "Your Cloud Pool"}
            ],
            "inherit": "base_yourcompany.json"
        }
    }
}
6

Add template names to NetBox

Add each key from templates.json (e.g. CLOUD-POOL) as a choice in the ripe_template custom field in NetBox so that prefix editors can select them.

Environment variables

Review all application and Docker Compose variables.

NetBox setup

Configure custom fields, regions, and the webhook in NetBox.

Build docs developers (and LLMs) love