NetBox

NetBox is an open source IP address management (IPAM) and data center infrastructure management (DCIM) tool developed specifically to address the needs of network and infrastructure engineers. It is intended to function as a domain-specific source of truth for network operations. NetBox is built on the Django Python framework and uses a PostgreSQL database and Redis.

Software Included

Package Version License
PostgreSQL 12.50 PostgreSQL License
nginx 1.18
gunicorn 20.0.4 MIT
Redis 3.5.3 BSD
Django 3.1.3

Creating an App using the Control Panel

Click the Deploy to DigitalOcean button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.

Deploy to DO

Creating an App using the API

In addition to creating a Droplet from the NetBox 1-Click App using the control panel, you can also use the DigitalOcean API. As an example, to create a 4GB NetBox Droplet in the SFO2 region, you can use the following curl command. You need to either save your API access token) to an environment variable or substitute it in the command below.

curl -X POST -H 'Content-Type: application/json' \
         -H 'Authorization: Bearer '$TOKEN'' -d \
        '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image": "netverity-netbox-20-04"}' \
        "https://api.digitalocean.com/v2/droplets"

Getting Started After Deploying NetBox

Thanks for installing NetBox!

Once your instance has been created, the NetBox web UI will be available at https://your_droplet_public_ipv4/. You can access the system shell via SSH:

ssh root@your_droplet_public_ipv4

This instance has been provisioned with a self-signed TLS certificate, which is not suitable for production use. To replace this with a certificate issued by Let’s Encrypt:

  • Update the server_name parameter in /etc/nginx/sites-available/netbox
  • Create a DNS A record for your domain pointing to this server
  • Run the following: sudo certbot --nginx -d $DOMAIN (where $DOMAIN is your domain name)
  • Reload nginx (systemctl reload nginx)

For security reasons, this image does not automatically provision any NetBox user accounts. To create a superuser account that can be used to log in, perform the following commands on the system console:

source /opt/netbox/venv/bin/activate
python /opt/netbox/netbox/manage.py createsuperuser

To upgrade NetBox to the most recent release:

cd /opt/netbox
sudo git pull origin master
sudo upgrade.sh

The community mailing list is available should you require assistance. For commercial support or custom development services, please contact us at NetVerity.