Install Netbox Docker
Installing Netbox is a very quick and easy process and you should be up and running in under 10 minutes! Whilst there are many ways to install Netbox for this tutorial I am going to show you how to install Netbox using Docker on an Ubuntu 22.04 server.
Netbox Installation prerequisites:
Docker, Docker Compose
How to install Netbox on Ubuntu Server
1. clone the Netbox GitHub Community Repo
git clone -b release https://github.com/netbox-community/netbox-docker.git
2. cd into netbox-docker directory
cd netbox-docker
3. define the port for Netbox
Note: default port is 8000 if that is free leave the config as below
tee docker-compose.override.yml <<EOF services: netbox: ports: - 8000:8080 EOF
On my server port 8000 was already in use so you have to change the left port number. The right port number is the container.
4. change port if needed
tee docker-compose.override.yml <<EOF services: netbox: ports: - 8050:8080 EOF
5. pull the files with docker compose pull
This will pull all the relevant files needed
docker compose pull
6. bring the server up with docker compose up
docker compose up
7. netbox installed now connect to your netbox
Once the containers have booted up, you should now be able to access your Netbox community edition at http://<server-ip>:8000 (or your chosen port) if so you have installed netbox successfully!
8. create a superuser account
What is the default username and password for Netbox on Docker?
There is no default username and password for Netbox you start by creating a superuser account using the steps below:
- At the command prompt of your server cd to NetBox-Docker
- docker compose exec netbox /opt/netbox/netbox/manage.py createsuperuser
- Enter your details
- Login
I chose to ignore the 12 character password limit as this is just a lab server
If all has gone to plan you should be able to login and be looking at Netbox
Netbox community edition homepage
Netbox install documentation – Installation Guide
Things change, so if this process is not working for you, always check out the latest official documentation here:
https://github.com/netbox-community/netbox-docker/wiki/Getting-Started
Ubuntu Server Spec
For this Lab I am running most of my containers on a Dell T3610 with 64Gb ram and a 1Tb SSD drive. It’s an older machine but still very capable of running many workloads. I am also running Ubuntu Server (not desktop) 22.04
Installation Guide for Netbox
How to configure Netbox for Network Automation
Installing Netbox is the easy party, Netbox setup will take a lot longer!
Netbox Tutorials
How to add a device to Netbox via GUI
How to add a device to Netbox via API
Leave a Reply