# ============================================================ # configuration.py – NetBox local configuration # Mount this file into the container at: # /opt/netbox/netbox/netbox/configuration.py # ============================================================ # ── Required settings ───────────────────────────────────────── ALLOWED_HOSTS = [ "*", ] CSRF_TRUSTED_ORIGINS = [ "http://localhost:8084", "http://127.0.0.1:8084", "http://[::1]:8084" ] SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") DATABASE = { "NAME": "netbox", "USER": "netbox", "PASSWORD": "netbox", "HOST": "localhost", "PORT": "5000", "CONN_MAX_AGE": 300, } REDIS = { "tasks": { "HOST": "localhost", # service name in your pod / compose "PORT": 6379, "PASSWORD": "", "DATABASE": 0, "SSL": False, }, "caching": { "HOST": "localhost", "PORT": 6379, "PASSWORD": "", "DATABASE": 1, "SSL": False, }, } SECRET_KEY = "CuUxP6Vg5(f^#Tk+QRgZ)Wt9x1NG##yv(c7BSmbZ+4v@Sd(ha0" PLUGINS = [ "netbox_dns", "netbox_dns_bridge" ] # Plugin-specific configuration (optional) PLUGINS_CONFIG = { "netbox_dns_bridge": { "notify_clients": True, "tsig_keys": { "_default_": { "keyname": "_default_", "algorithm": "hmac-sha256", "secret": "yJrOo4c3rDnv3mIrNDfSpGXePsypavsUSpNGxSojcYM=", } } }, } # ── Custom validators ───────────────────────────────────────── # Reference Python classes mounted via volume into the container. # The classes must be importable (i.e. their directory must be on # PYTHONPATH or placed inside netbox/netbox/). CUSTOM_VALIDATORS = { # "dcim.site": ["my_validators.SiteValidator"], } # ── Optional / commonly changed settings ────────────────────── TIME_ZONE = "UTC" DATE_FORMAT = "N j, Y" TIME_FORMAT = "g:i a" DATETIME_FORMAT = "N j, Y g:i a" # Email #EMAIL = { # "SERVER": "localhost", # "PORT": 25, # "USERNAME": "", # "PASSWORD": "", # "USE_SSL": False, # "USE_TLS": False, # "TIMEOUT": 10, # "FROM_EMAIL": "netbox@example.com", #} # Media & static files are stored inside the container (media volume) MEDIA_ROOT = "/opt/netbox/netbox/media" LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", }, }, "root": { "handlers": ["console"], #"level": "WARNING", "level": "DEBUG", }, } API_TOKEN_PEPPERS = {1: '2QLPiNVBUPaZtvYrVNdRAdqPVBFeM+zkHcOExnBVG6O53xK2FBoewbVRYvS+ygsrMwB69j5qulkl'}