Skip to content

Installation

Requirements

  • NetBox 4.7.x.
  • Python 3.12 to 3.14 (whatever NetBox itself uses).

The package has no runtime dependency of its own beyond NetBox.

Bare metal

Install the package into NetBox's virtual environment:

source /opt/netbox/venv/bin/activate
pip install netbox-ipam-treeview-plugin

To keep it across NetBox upgrades, add it to /opt/netbox/local_requirements.txt:

netbox-ipam-treeview-plugin

Enable it in configuration.py:

PLUGINS = ["netbox_ipam_treeview"]

The plugin ships static files (JavaScript and CSS), so collect them, then restart NetBox:

python /opt/netbox/netbox/manage.py collectstatic --no-input
sudo systemctl restart netbox

There is no migration to run. NetBox's own upgrade.sh runs migrate and collectstatic anyway.

netbox-docker

netbox-docker images do not include plugins; build a custom image on top of the upstream one. The venv inside the image has no pip, only uv:

FROM netboxcommunity/netbox:v4.7.2
COPY ./plugin_requirements.txt /opt/netbox/
RUN /usr/local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt
RUN DEBUG="true" SECRET_KEY="dummydummydummydummydummydummydummydummydummydummy" \
    /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input

with plugin_requirements.txt containing:

netbox-ipam-treeview-plugin

Put PLUGINS (and PLUGINS_CONFIG, if any) in a file such as /etc/netbox/config/plugins.py; netbox-docker loads every *.py file in /etc/netbox/config/.

Checking the install

After the restart:

  • IPAM → Prefixes has a Prefix Tree entry right below Prefixes.
  • /plugins/ipam-tree/ shows the tree.
  • Prefix, Aggregate and VRF pages have a Tree tab.

If the page renders without styling or the carets do nothing, the static files were not collected.