Levelrail
Skip to content

Self-host NetBox with Docker ​

Source-of-truth IPAM and DCIM for tracking IP space, racks, devices, and cabling.

This page describes the Levelrail template for NetBox (Infrastructure). It deploys the services below as one Docker Compose app on your own server.

Project site: https://github.com/netbox-community/netbox-docker.

Recommended memory: about 1024 MiB.

Services, ports and volumes ​

ServiceImageContainer portsVolumes
dbpostgres:17-alpinenone
netbox_db_data -> /var/lib/postgresql/data
netboxnetboxcommunity/netbox:v4.6-5.0.28080
netbox_media -> /opt/netbox/netbox/media
netbox_reports -> /opt/netbox/netbox/reports
netbox_scripts -> /opt/netbox/netbox/scripts
redisredis:7-alpinenone
netbox_redis_data -> /data

Environment variables ​

ServiceVariableValue
dbPOSTGRES_DBPreset in the template
dbPOSTGRES_PASSWORDGenerated at deploy
dbPOSTGRES_USERPreset in the template
netboxALLOWED_HOSTSPreset in the template
netboxDB_HOSTPreset in the template
netboxDB_NAMEPreset in the template
netboxDB_PASSWORDGenerated at deploy
netboxDB_USERPreset in the template
netboxREDIS_CACHE_DATABASEPreset in the template
netboxREDIS_CACHE_HOSTPreset in the template
netboxREDIS_CACHE_PORTPreset in the template
netboxREDIS_DATABASEPreset in the template
netboxREDIS_HOSTPreset in the template
netboxREDIS_PORTPreset in the template
netboxSECRET_KEYGenerated at deploy
netboxSUPERUSER_EMAILPreset in the template
netboxSUPERUSER_NAMEPreset in the template
netboxSUPERUSER_PASSWORDGenerated at deploy

Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.

Deploy NetBox with Levelrail ​

In the dashboard, open Apps, choose New app, then Browse templates, and select NetBox. Review the Compose body and deploy.

With the CLI:

levelrail-cli templates deploy netbox --name my-netbox

See Service template catalog for how templates work, and Getting started if you have not installed Levelrail yet.

More Infrastructure templates ​

All templates are listed in the self-host gallery.

Released under the Apache 2.0 License.