Site Tools


software:netbox

Software - Netbox

Installation

Netbox install instructions

  • For the server name in the netbox config file, use IP address of netbox server if the FQDN isn't reachable.
    • sudo nano /etc/nginx/sites-available/netbox
  • Allow HTTPS through the firewall
    • sudo ufw allow https && sudo ufw reload

Howto

Videos

https://netboxlabs.com/docs/netbox/en/stable/installation/
4 GB RAM
25 GB HDD
8 Processor Cores
Ubuntu 24.04.2 Server

sudo apt update -y
sudo apt upgrade -y
sudo apt install -y git nano apache2 postgresql postgresql-common libpq-dev redis-server git python3 python3-pip python3-venv python3-dev build-essential libxml2-dev libxslt1-dev libffi-dev  libssl-dev zlib1g-dev
sudo systemctl status apache2
sudo systemctl status postgresql
sudo systemctl status redis
psql -V
	Must be version 12 or later

sudo -u postgres psql
CREATE USER netbox LOGIN CREATEDB PASSWORD 'ISEisC00L!';
CREATE DATABASE netboxdb OWNER netbox;
\l
\du
\q

sudo -u postgres psql --username netbox --password --host localhost netboxdb
ISEisC00L!
\conninfo
\q

sudo nano /etc/redis/redis.conf
Search nano with Ctrl+w
	requirepass foobared
requirepass ISEisC00L!
Save with Ctrl+o and then Ctrl+x to exit

sudo systemctl restart redis
sudo systemctl status redis
redis-cli
AUTH ISEisC00L!
PING
exit

sudo useradd -r -d /opt/netbox -s /usr/sbin/nologin netbox
cd /opt; sudo git clone -b master --depth 1 https://github.com/netbox-community/netbox.git
sudo chown -R netbox:netbox /opt/netbox
cd /opt/netbox/netbox/netbox
sudo -u netbox python3 ../generate_secret_key.py
sudo -u netbox cp configuration_example.py configuration.py

sudo -u netbox nano configuration.py
ALLOWED_HOSTS = ['*']
DATABASE = {
    'NAME': 'netboxdb',         # Database name
    'USER': 'netbox',               # PostgreSQL username
    'PASSWORD': 'ISEisC00L!',           # PostgreSQL password
REDIS = {
    'tasks': {
        'PASSWORD': 'ISEisC00L!',
    'caching': {
        'PASSWORD': 'ISEisC00L!',
SECRET_KEY = '3U!F+#Vs&a7U8)fPkkb9u#NmJr%(Ud*wS7yhQ(UE1smOMvEh4k'
End of edit
Save

sudo -u netbox /opt/netbox/upgrade.sh

source /opt/netbox/venv/bin/activate
python3 /opt/netbox/netbox/manage.py createsuperuser
netadmin
n@n.com
ISEisC00L!

(Don't use sudo)
python3 /opt/netbox/netbox/manage.py runserver 0.0.0.0:8000 --insecure
Now open up a browser and navigate to http://IP:8000
To deactivate:
Ctrl+c



#sudo chown --recursive netbox /opt/netbox/netbox/media/
#sudo chown --recursive netbox /opt/netbox/netbox/reports/
#sudo chown --recursive netbox /opt/netbox/netbox/scripts/

sudo ln -s /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-housekeeping

To start Netbox server:
source /opt/netbox/venv/bin/activate
python3 /opt/netbox/netbox/manage.py runserver 0.0.0.0:8000 --insecure
software/netbox.txt · Last modified: by adminent