Network source-of-truth and infrastructure resource modeling (IRM) tool combining DCIM and IPAM. Built on Django + PostgreSQL + Redis.
docs/)netbox/ — Django project root; run all manage.py commands from herenetbox/netbox/ — Core settings, URLs, WSGI entrypointnetbox/<app>/ — Django apps: circuits, core, dcim, ipam, extras, tenancy, virtualization, wireless, users, vpndocs/ — MkDocs documentation sourcecontrib/ — Example configs (systemd, nginx, etc.) and other resourcespython -m venv ~/.venv/netbox
source ~/.venv/netbox/bin/activate
pip install -r requirements.txt
# Copy and configure
cp netbox/netbox/configuration.example.py netbox/netbox/configuration.py
# Edit configuration.py: set DATABASE, REDIS, SECRET_KEY, ALLOWED_HOSTS
cd netbox/
python manage.py migrate
python manage.py runserver
All commands run from the netbox/ subdirectory with venv active.
# Development server
python manage.py runserver
# Run full test suite
export NETBOX_CONFIGURATION=netbox.configuration_testing
python manage.py test
# Faster test runs (no DB rebuild, parallel)
python manage.py test --keepdb --parallel 4
# Migrations
python manage.py makemigrations
python manage.py migrate
# Shell
python manage.py nbshell # NetBox-enhanced shell
<app>/api/serializers.py; viewsets in <app>/api/views.py; URLs auto-registered in <app>/api/urls.py.<app>/graphql/types.py.<app>/filtersets.py — used for both UI filtering and API ?filter= params.django-tables2 used for all object list views (<app>/tables.py).netbox/templates/<app>/.<app>/tests/. Use netbox.configuration_testing for test config.created, last_updated fields (inherit from NetBoxModel where appropriate).url field (absolute URL of the object).FeatureQuery for generic relations (config contexts, custom fields, tags, etc.).<issue-number>-short-description (e.g., 1234-device-typerror)main branch for patch releases; feature tracks work for the upcoming minor/major release.configuration.py is gitignored — never commit it.manage.py lives in netbox/, NOT the repo root. Running from the wrong directory is a common mistake.NETBOX_CONFIGURATION env var controls which settings module loads; set to netbox.configuration_testing for tests.extras app is a catch-all for cross-cutting features (custom fields, tags, webhooks, scripts).docs/development/ for the full contributing guide and code style details.