Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
Infrastructure resource modeling for network and data centre teams, and a source of truth for what is installed where. It records IP address and VLAN space (IPAM), sites, racks, devices, interfaces and cabling, circuits, virtual machines and clusters, with a REST and GraphQL API, change logging, webhooks, custom fields, custom scripts and a plugin system. Data lives in PostgreSQL; Redis-compatible servers hold the task queue and the cache, and a separate worker process runs background jobs, including housekeeping. The community netbox-docker project builds the image used here.
Runs on a VPS from $12/mo (Kamatera 4GB, 4 GB RAM) · prices checked Nov 2026
Fits home hardware (1,361 MB measured idle, RAM only): Raspberry Pi 4 (4 GB) (arm64 untested), Raspberry Pi 5 (8 GB) (arm64 untested), Repurposed laptop (8 GB), Intel N100 mini PC (16 GB), AMD Ryzen mini PC (32 GB).
Pick NetBox when you need a single, queryable record of network and data-centre infrastructure: IP prefixes and addresses, VLANs, sites, racks, devices with their interfaces and cables, circuits, and virtual machines, all tied together so a change shows up everywhere it matters. Automation tools read it through the REST or GraphQL API, and webhooks, custom fields, custom scripts and plugins cover the rest. It is Apache-2.0 (the repository's licence file is the Apache 2.0 text), Python and Django on PostgreSQL. Our snippet adapts the netbox-docker compose file, pins `netboxcommunity/netbox:v4.7.4-5.1.1` (NetBox 4.7.4, netbox-docker 5.1.1, pushed 2026-10-29, amd64 and arm64) instead of the floating `v4.7` tag, pins PostgreSQL 18.6 and Valkey 9.1.3 as the task queue and the cache, generates every secret into `.env`, and creates the first administrator from `SUPERUSER_*` variables instead of the interactive `createsuperuser`. It adds a database and Valkey healthcheck dependency to the web container and raises its start period to 600 seconds, because the first boot applies all migrations. The worker is a second container from the same image; there is no separate housekeeping container, because since NetBox 4.4 housekeeping is a system job run by that worker. Look elsewhere for a lightweight inventory of a homelab: NetBox needs five containers, and it models networks rather than appliances and licences.
Paid link — we earn a commission if you shop through it.
Run these commands on your server:
# NetBox — infrastructure source of truth — adapted from netbox-docker's docker-compose.yml, pinned to netboxcommunity/netbox:v4.7.4-5.1.1, postgres:18.6-alpine and valkey/valkey:9.1.3-alpine; secrets and the first admin account come from a generated .env, and the web healthcheck start period is raised to 600s because first-boot migrations took about 7 minutes on a 2 vCPU box, and `docker compose up -d` waits through them
cat > .env <<EOF
DB_PASSWORD=$(openssl rand -hex 16)
REDIS_PASSWORD=$(openssl rand -hex 16)
REDIS_CACHE_PASSWORD=$(openssl rand -hex 16)
SECRET_KEY=$(openssl rand -hex 32)
API_TOKEN_PEPPER_1=$(openssl rand -hex 32)
SUPERUSER_PASSWORD=$(openssl rand -hex 12)
EOF
cat > docker-compose.yml <<'EOF'
x-netbox: &netbox
image: docker.io/netboxcommunity/netbox:v4.7.4-5.1.1
restart: unless-stopped
env_file: .env
environment:
DB_HOST: postgres
DB_NAME: netbox
DB_USER: netbox
REDIS_HOST: redis
REDIS_CACHE_HOST: redis-cache
SKIP_SUPERUSER: "false"
SUPERUSER_NAME: admin
SUPERUSER_EMAIL: admin@example.com
user: "netbox:root"
volumes:
- netbox-media-files:/opt/netbox/netbox/media:rw
- netbox-reports-files:/opt/netbox/netbox/reports:rw
- netbox-scripts-files:/opt/netbox/netbox/scripts:rw
services:
netbox:
<<: *netbox
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
redis-cache:
condition: service_healthy
ports:
- "8000:8080"
healthcheck:
test: /opt/netbox/health.sh
start_period: 600s
timeout: 3s
interval: 15s
netbox-worker:
<<: *netbox
depends_on:
netbox:
condition: service_healthy
command:
- /opt/netbox/venv/bin/python
- /opt/netbox/netbox/manage.py
- rqworker
healthcheck:
test: ps -aux | grep -v grep | grep -q rqworker || exit 1
start_period: 20s
timeout: 3s
interval: 15s
postgres:
image: docker.io/postgres:18.6-alpine
restart: unless-stopped
environment:
POSTGRES_DB: netbox
POSTGRES_USER: netbox
POSTGRES_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: pg_isready -q -t 2 -d $$POSTGRES_DB -U $$POSTGRES_USER
start_period: 20s
timeout: 30s
interval: 10s
retries: 5
volumes:
- netbox-postgres:/var/lib/postgresql
redis:
image: docker.io/valkey/valkey:9.1.3-alpine
restart: unless-stopped
command:
- sh
- -c
- valkey-server --appendonly yes --requirepass $$REDIS_PASSWORD
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
healthcheck: &redis-healthcheck
test: '[ $$(valkey-cli --pass "$${REDIS_PASSWORD}" ping) = ''PONG'' ]'
start_period: 5s
timeout: 3s
interval: 1s
retries: 5
volumes:
- netbox-redis-data:/data
redis-cache:
image: docker.io/valkey/valkey:9.1.3-alpine
restart: unless-stopped
command:
- sh
- -c
- valkey-server --requirepass $$REDIS_PASSWORD
environment:
REDIS_PASSWORD: ${REDIS_CACHE_PASSWORD}
healthcheck: *redis-healthcheck
volumes:
- netbox-redis-cache-data:/data
volumes:
netbox-media-files:
netbox-postgres:
netbox-redis-cache-data:
netbox-redis-data:
netbox-reports-files:
netbox-scripts-files:
EOF
docker compose up -d
timeout 600 bash -c 'until curl -fsSL -o /dev/null http://localhost:8000/login/; do sleep 3; done'
# → http://SERVER_IP:8000 — the NetBox login page; sign in as admin with the SUPERUSER_PASSWORD line in .env (grep SUPERUSER_PASSWORD .env)NetBox's documentation, the netbox-docker README and its compose files flag these before you rely on it:
NetBox used 1361 MB of RAM at idle on GCP e2-standard-2 · Ubuntu 26.04 LTS · Docker 29.9.3 (first boot, measured Nov 2026). We list a minimum of 2048 MB.
The NetBox install snippet is marked verified on Ubuntu 26.04 (Nov 2026).