</span></code></pre></div><h3id=docker-cli-click-here-for-more-info>docker cli (<ahref=https://docs.docker.com/engine/reference/commandline/cli/>click here for more info</a>)<aclass=headerlinkhref=#docker-cli-click-here-for-more-infotitle="Permanent link">¶</a></h3><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-1-1><aid=__codelineno-1-1name=__codelineno-1-1href=#__codelineno-1-1></a>docker<spanclass=w></span>run<spanclass=w></span>-d<spanclass=w></span><spanclass=se>\</span>
</span></code></pre></div><h2id=parameters>Parameters<aclass=headerlinkhref=#parameterstitle="Permanent link">¶</a></h2><p>Docker images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <code><external>:<internal></code> respectively. For example, <code>-p 8080:80</code> would expose port <code>80</code> from inside the container to be accessible from the host's IP on port <code>8080</code> outside the container.</p><h3id=ports-p>Ports (<code>-p</code>)<aclass=headerlinkhref=#ports-ptitle="Permanent link">¶</a></h3><table><thead><tr><thstyle="text-align: center;">Parameter</th><th>Function</th></tr></thead><tbody><tr><tdstyle="text-align: center;"><code>8000</code></td><td>will map the container's port 8000 to port 8000 on the host</td></tr></tbody></table><h3id=environment-variables-e>Environment Variables (<code>-e</code>)<aclass=headerlinkhref=#environment-variables-etitle="Permanent link">¶</a></h3><table><thead><tr><thstyle="text-align: center;">Env</th><th>Function</th></tr></thead><tbody><tr><tdstyle="text-align: center;"><code>PUID=1000</code></td><td>for UserID - see below for explanation</td></tr><tr><tdstyle="text-align: center;"><code>PGID=1000</code></td><td>for GroupID - see below for explanation</td></tr><tr><tdstyle="text-align: center;"><code>TZ=Etc/UTC</code></td><td>specify a timezone to use, see this <ahref=https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List>list</a>.</td></tr><tr><tdstyle="text-align: center;"><code>SUPERUSER_EMAIL=</code></td><td>Email address for <code>admin</code> account</td></tr><tr><tdstyle="text-align: center;"><code>SUPERUSER_PASSWORD=</code></td><td>Password for <code>admin</code> account</td></tr><tr><tdstyle="text-align: center;"><code>ALLOWED_HOST=</code></td><td>The hostname you will use to access the app (i.e., netbox.example.com)</td></tr><tr><tdstyle="text-align: center;"><code>DB_NAME=</code></td><td>Database name (default: netbox)</td></tr><tr><tdstyle="text-align: center;"><code>DB_USER=</code></td><td>Database user</td></tr><tr><tdstyle="text-align: center;"><code>DB_PASSWORD=</code></td><td>Database password</td></tr><tr><tdstyle="text-align: center;"><code>DB_HOST=</code></td><td>Database host (default: postgres)</td></tr><tr><tdstyle="text-align: center;"><code>DB_PORT=</code></td><td>Database port (defaul: 5432)</td></tr><tr><tdstyle="text-align: center;"><code>REDIS_HOST=</code></td><td>Redis host (default: redis)</td></tr><tr><tdstyle="text-align: center;"><code>REDIS_PORT=</code></td><td>Redis port number (default: 6379)</td></tr><tr><tdstyle="text-align: center;"><code>REDIS_PASSWORD=</code></td><td>Redis password (default: none)</td></tr><tr><tdstyle="text-align: center;"><code>REDIS_DB_TASK=</code></td><td>Redis database ID for tasks (default: 0)</td></tr><tr><tdstyle="text-align: center;"><code>REDIS_DB_CACHE=</code></td><td>Redis database ID for caching (default: 1)</td></tr><tr><tdstyle="text-align: center;"><code>BASE_PATH=</code></td><td>The path you will use to access the app (i.e., /netbox, optional, default: none)</td></tr><tr><tdstyle="text-align: center;"><code>REMOTE_AUTH_ENABLED=</code></td><td>Enable remote authentication (optional, default: False)</td></tr><tr><tdstyle="text-align: center;"><code>REMOTE_AUTH_BACKEND=</code></td><td>Python path to the custom Django authentication backend to use for external user authentication (optional, default: netbox.authentication.RemoteUserBackend)</td></tr><tr><tdstyle="text-align: center;"><code>REMOTE_AUTH_HEADER=</code></td><td>Name of the HTTP header which informs NetBox of the currently authenticated user. (optional, default: HTTP_REMOTE_USER)</td></tr><tr><tdstyle="text-align: center;"><code>REMOTE_AUTH_AUTO_CREATE_USER=</code></td><td>If true, NetBox will automatically create local accounts for users authenticated via a remote servic
</span></code></pre></div><p>Will set the environment variable <code>PASSWORD</code> based on the contents of the <code>/run/secrets/mysecretpassword</code> file.</p><h2id=umask-for-running-applications>Umask for running applications<aclass=headerlinkhref=#umask-for-running-applicationstitle="Permanent link">¶</a></h2><p>For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional <code>-e UMASK=022</code> setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up <ahref=https://en.wikipedia.org/wiki/Umask>here</a> before asking for support.</p><h2id=user-group-identifiers>User / Group Identifiers<aclass=headerlinkhref=#user-group-identifierstitle="Permanent link">¶</a></h2><p>When using volumes (<code>-v</code> flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user <code>PUID</code> and group <code>PGID</code>.</p><p>Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.</p><p>In this instance <code>PUID=1000</code> and <code>PGID=1000</code>, to find yours use <code>id user</code> as below:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-3-1><aid=__codelineno-3-1name=__codelineno-3-1href=#__codelineno-3-1></a><spanclass=w></span>$<spanclass=w></span>id<spanclass=w></span>username
</span></code></pre></div><h2id=docker-mods>Docker Mods<aclass=headerlinkhref=#docker-modstitle="Permanent link">¶</a></h2><p><ahref="https://mods.linuxserver.io/?mod=netbox"title="view available mods for this container."><imgalt="Docker Mods"src="https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=netbox&query=%24.mods%5B%27netbox%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml"></a><ahref="https://mods.linuxserver.io/?mod=universal"title="view available universal mods."><imgalt="Docker Universal Mods"src="https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml"></a></p><p>We publish various <ahref=https://github.com/linuxserver/docker-mods>Docker Mods</a> to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.</p><h2id=support-info>Support Info<aclass=headerlinkhref=#support-infotitle="Permanent link">¶</a></h2><ul><li>Shell access whilst the container is running:</li><li><code>docker exec -it netbox /bin/bash</code></li><li>To monitor the logs of the container in realtime:</li><li><code>docker logs -f netbox</code></li><li>Container version number</li><li><code>docker inspect -f '{{ index .Config.Labels "build_version" }}' netbox</code></li><li>Image version number</li><li><code>docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/netbox:latest</code></li></ul><h2id=versions>Versions<aclass=headerlinkhref=#versionstitle="Permanent link">¶</a></h2><ul><li><strong>11.06.23:</strong> - Rebase to Alpine 3.18, deprecate armhf.</li><li><strong>14.05.23:</strong> - Build local docs on first run.</li><li><strong>05.03.23:</strong> - Rebase to Alpine 3.17.</li><li><strong>02.11.22:</strong> - Rebase to Alpine 3.16, migrate to s6v3.</li><li><strong>01.08.22:</strong> - Remove py3-pillow, add tiff to fix deps.</li><li><strong>26.07.22:</strong> - Add py3-pillow package back on arm to fix build issue.</li><li><strong>10.12.21:</strong> - Remove py3-pillow package to fix dependency issue with 3.2.0.</li><li><strong>10.12.21:</strong> - Rebase to Alpine 3.15.</li><li><strong>26.04.21:</strong> - Added Redis database environment variables.</li><li><strong>03.02.21:</strong> - Added remote authentication environment variables.</li><li><strong>02.01.21:</strong> - Added BASE_PATH environment variable.</li><li><strong>23.08.20:</strong> - Initial Release.</li></ul><hr><divclass=md-source-file><small> Last update: <spanclass="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">August 31, 2023</span><br> Created: <spanclass="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">February 6, 2019</span></small></div></article></div></div><buttontype=buttonclass="md-top md-icon"data-md-component=tophidden><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12Z"/></svg> Back to top </button></main><footerclass=md-footer><navclass="md-footer__inner md-grid"aria-label=Footer><ahref=../docker-netbootxyz/class="md-footer__link md-footer__link--prev"aria-label="Previous: netbootxyz"><divclass="md-footer__button md-icon"><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg></div><divclass=md-footer__title><spanclass=md-footer__direction> Previous </span><divclass=md-ellipsis> netbootxyz </div></div></a><ahref=../docker-nextcloud/class="md-footer__link md-footer__link--next"aria-label="Next: nextcloud"