Public | Automated Build

Last pushed: 8 hours ago
Short Description
Docker image for
Full Description

Netbox docker image

Docker image for NetBox.

Using docker-compose

  1. Create a copy of docker-compose.example.yml
  2. Adapt at least the following environment variables:

    • ALLOWED_HOSTS: accepts multiple hostnames separated using spaces
    • SECRET_KEY: required, should be randomly generated and 50 characters or more

      Optionally you can also change the database password by modifying POSTGRES_PASSWORD and DB_PASS.

  3. Create a new superuser using the following command:

     $ sudo docker-compose run --rm netbox createsuperuser
  4. Start the service stack:

     $ sudo docker-compose up -d

NetBox will be available under port 8000.

Docker Pull Command
Source Repository

Comments (2)
a year ago

Hello pitkey,

I've updated the seceret_key in the compose file, but I am seeing below errors. Could you please help take a look?

--> sudo docker-compose run --rm netbox superuser

Couldn't import dot_parser, loading of dot files will not be possible.
Traceback (most recent call last):
File "./", line 10, in <module>
File "/usr/local/lib/python2.7/site-packages/django/core/management/", line 353, in execute_from_command_line
File "/usr/local/lib/python2.7/site-packages/django/core/management/", line 345, in execute
File "/usr/local/lib/python2.7/site-packages/django/core/management/", line 348, in run_from_argv
self.execute(args, **cmd_options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/", line 399, in execute
output = self.handle(
args, options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/", line 89, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/", line 20, in init
self.loader = MigrationLoader(self.connection)
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/", line 49, in init
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/", line 176, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/", line 65, in applied_migrations
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/", line 52, in ensure_schema
if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/", line 233, in cursor
cursor = self.make_cursor(self._cursor())
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/", line 204, in _cursor
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/", line 199, in ensure_connection
File "/usr/local/lib/python2.7/site-packages/django/db/", line 95, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/", line 199, in ensure_connection
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/", line 171, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/postgresql/", line 175, in get_new_connection
connection = Database.connect(
File "/usr/local/lib/python2.7/site-packages/psycopg2/", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: FATAL: password authentication failed for user "netbox"

a year ago

i did
docker pull pitkley/netbox
docker run pitkley/netbox -ti /bin/bash
error msg i got is:
/sbin/ line 19: SECRET_KEY: SECRET_KEY needs to be set

Any way to start the image?