RIPE Updater uses a three-file template system to define the RIPE database attributes written for every managed prefix. Rather than hard-coding attributes per prefix, you define reusable building blocks — an LIR-to-organisation mapping, one or more base attribute files, and a named template list — that compose the final RIPE object at runtime. This keeps attribute management centralised and makes it straightforward to serve multiple customers or LIRs with different RIPE attributes from a single deployment. Place all template files in the directory specified byDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jalmargyyk/ripe-updater/llms.txt
Use this file to discover all available pages before exploring further.
TEMPLATES_DIR (default: /opt/ripeupdater/templates). When running in Docker, mount this directory into the container as a read-only volume.
The three template components
1. lir_org.json — LIR to organisation mapping
1. lir_org.json — LIR to organisation mapping
lir_org.json maps each LIR identifier (as it appears in the NetBox lir custom field on aggregates) to a RIPE organisation handle. The application looks up the aggregate that contains the prefix being processed, reads its lir custom field, and uses this file to resolve the corresponding org attribute.LIR identifiers in this file must be lowercase and match the choices you configured on the lir NetBox custom field exactly.lir_org.json
2. base_*.json — base attribute templates
2. base_*.json — base attribute templates
A base template file defines a set of RIPE object attributes that are shared by a group of prefixes — typically all prefixes belonging to one operator or one customer. You can have as many base files as you need; the naming convention is Example — a customer with different contact handles:Notice that the customer base template hard-codes the
base_<name>.json.Each file contains an attributes array of single-key objects. The special entry {"org": ""} is a placeholder that tells the application to auto-fill the org attribute from the lir_org mapping at runtime. Any other entry with a non-empty value is included verbatim in the generated RIPE object.Example — your own company:base_mycompany.example.json
base_mycustomer1.example.json
org handle instead of using the empty {"org": ""} placeholder. Use this approach when a customer’s organisation handle is fixed and does not come from the LIR mapping.Start from the example:3. templates.json — named template list
3. templates.json — named template list
templates.json lists every named template that operators can select on a NetBox prefix via the ripe_template custom field. Each entry specifies:inherit— the base template file to merge attributes from.attributes— a list of template-specific attribute overrides, typically just adescrfield that identifies the use case.
templates.json
How inheritance works
When a webhook arrives for a prefix, the application:- Reads the template entry from
templates.jsonthat matches theripe_templatefield on the prefix. - Loads the
inheritbase template file and collects itsattributes. - Merges the template-level
attributeswith the base attributes. Template-level attributes take precedence over base attributes with the same key (with the exception ofdescrandcountry, which can appear multiple times). - Prepends the dynamically generated attributes: the prefix itself (as
inetnumorinet6num),netname(set to the template name),org(resolved from the LIR mapping or from the base template), andcountry(resolved from the site region hierarchy). - Appends the
statusattribute last.
attributes list, and you can add attributes that do not exist in the base at all.
The {"org": ""} placeholder
Including {"org": ""} (an empty string value) in a base template tells the application to substitute the org attribute with the RIPE organisation handle resolved from the lir_org.json mapping for the aggregate that contains the prefix. This is the recommended approach for your own LIRs, because it keeps the organisation reference in one place.
If you hard-code {"org": "ORG-EXAMPLE1-RIPE"} instead, that value is used directly and no lookup is performed. Use this when the organisation handle is always the same regardless of which LIR owns the aggregate — for example, for a customer who has their own RIPE organisation.
TEST database attribute patching
WhenRIPE_DB=TEST, the application automatically rewrites the following attributes in every generated object before submitting it to the RIPE test database. This is necessary because your production RIPE objects (maintainers, organisations, persons) are not present in the test database.
| Attribute | Replaced with |
|---|---|
org | Value of RIPE_TEST_ORG |
mnt-by, mnt-ref, mnt-lower, mnt-domains, mnt-routes, mnt-irt | Value of RIPE_TEST_MNT |
admin-c, tech-c, abuse-c | Value of RIPE_TEST_PERSON |
source | TEST |
status (IPv4) | Value of RIPE_TEST_STATUS_V4 |
status (IPv6) | Value of RIPE_TEST_STATUS_V6 |
The provided
.env.example file is pre-configured to work with the example template files against the RIPE TEST database. You can use these together to validate your setup before switching RIPE_DB to RIPE for production.