</span><spanid=__span-0-2><aid=__codelineno-0-2name=__codelineno-0-2href=#__codelineno-0-2></a>set service dhcp-server use-dnsmasq enable
</span><spanid=__span-0-3><aid=__codelineno-0-3name=__codelineno-0-3href=#__codelineno-0-3></a>set service dns forwarding options \"dhcp-match=set:bios,60,PXEClient:Arch:00000\"
</span><spanid=__span-0-4><aid=__codelineno-0-4name=__codelineno-0-4href=#__codelineno-0-4></a>set service dns forwarding options \"dhcp-boot=tag:bios,netboot.xyz.kpxe,,SERVERIP\"
</span><spanid=__span-0-5><aid=__codelineno-0-5name=__codelineno-0-5href=#__codelineno-0-5></a>set service dns forwarding options \"dhcp-match=set:efi32,60,PXEClient:Arch:00002\"
</span><spanid=__span-0-6><aid=__codelineno-0-6name=__codelineno-0-6href=#__codelineno-0-6></a>set service dns forwarding options \"dhcp-boot=tag:efi32,netboot.xyz.efi,,SERVERIP\"
</span><spanid=__span-0-7><aid=__codelineno-0-7name=__codelineno-0-7href=#__codelineno-0-7></a>set service dns forwarding options \"dhcp-match=set:efi32-1,60,PXEClient:Arch:00006\"
</span><spanid=__span-0-8><aid=__codelineno-0-8name=__codelineno-0-8href=#__codelineno-0-8></a>set service dns forwarding options \"dhcp-boot=tag:efi32-1,netboot.xyz.efi,,SERVERIP\"
</span><spanid=__span-0-9><aid=__codelineno-0-9name=__codelineno-0-9href=#__codelineno-0-9></a>set service dns forwarding options \"dhcp-match=set:efi64,60,PXEClient:Arch:00007\"
</span><spanid=__span-0-10><aid=__codelineno-0-10name=__codelineno-0-10href=#__codelineno-0-10></a>set service dns forwarding options \"dhcp-boot=tag:efi64,netboot.xyz.efi,,SERVERIP\"
</span><spanid=__span-0-11><aid=__codelineno-0-11name=__codelineno-0-11href=#__codelineno-0-11></a>set service dns forwarding options \"dhcp-match=set:efi64-1,60,PXEClient:Arch:00008\"
</span><spanid=__span-0-12><aid=__codelineno-0-12name=__codelineno-0-12href=#__codelineno-0-12></a>set service dns forwarding options \"dhcp-boot=tag:efi64-1,netboot.xyz.efi,,SERVERIP\"
</span><spanid=__span-0-13><aid=__codelineno-0-13name=__codelineno-0-13href=#__codelineno-0-13></a>set service dns forwarding options \"dhcp-match=set:efi64-2,60,PXEClient:Arch:00009\"
</span><spanid=__span-0-14><aid=__codelineno-0-14name=__codelineno-0-14href=#__codelineno-0-14></a>set service dns forwarding options \"dhcp-boot=tag:efi64-2,netboot.xyz.efi,,SERVERIP\"
</span><spanid=__span-0-15><aid=__codelineno-0-15name=__codelineno-0-15href=#__codelineno-0-15></a>commit; save
</span></code></pre></div></p><h4id=dnsmasqdd-wrtopenwrttomatopihole>Dnsmasq/DD-WRT/OpenWRT/Tomato/PIHOLE<aclass=headerlinkhref=#dnsmasqdd-wrtopenwrttomatopiholetitle="Permanent link">¶</a></h4><p>Various locations to set Additional/Custom DNSMASQ options in UI or config files Set the following lines: <divclass="language-text highlight"><pre><span></span><code><spanid=__span-1-1><aid=__codelineno-1-1name=__codelineno-1-1href=#__codelineno-1-1></a>dhcp-match=set:bios,60,PXEClient:Arch:00000
</span></code></pre></div> Ensure you restart the DNSMASQ service after the changes.</p><h4id=microsoft-server-dhcp>Microsoft Server DHCP<aclass=headerlinkhref=#microsoft-server-dhcptitle="Permanent link">¶</a></h4><ul><li>Run the DHCP program</li><li>Under Scope/Scope Options</li><li>check option 066 and enter the FQDN or IP of your TFTP boot server</li><li>check option 067 and enter one of the following bootfile names:</li><li>Default BIOS file name- netboot.xyz.kpxe</li><li>UEFI 32 bit file name- netboot.xyz.efi</li><li>UEFI 64 bit file name- netboot.xyz.efi</li></ul><p>Anything else from a router standpoint is a crapshoot for supporting Dnsmasq options or proprietary PXE boot options, check Google for support (try your exact router model number with 'pxe boot') or look into setting up your own DHCP server in Linux. This image also contains <code>netboot.xyz.efi</code> which can be used to boot using UEFI network boot. The UEFI boot and menu will have limited functionality if you choose to use it.</p><h2id=usage>Usage<aclass=headerlinkhref=#usagetitle="Permanent link">¶</a></h2><p>To help you get started creating a container from this image you can either use docker-compose or the docker cli.</p><divclass="admonition info"><pclass=admonition-title>Info</p><p>Unless a parameter is flaged as 'optional', it is <em>mandatory</em> and a value must be provided.</p></div><h3id=docker-compose-recommended-click-here-for-more-info>docker-compose (recommended, <ahref=https://docs.linuxserver.io/general/docker-compose>click here for more info</a>)<aclass=headerlinkhref=#docker-compose-recommended-click-here-for-more-infotitle="Permanent link">¶</a></h3><divclass="language-yaml highlight"><pre><span></span><code><spanid=__span-2-1><aid=__codelineno-2-1name=__codelineno-2-1href=#__codelineno-2-1></a><spanclass=nn>---</span>
</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-3-1><aid=__codelineno-3-1name=__codelineno-3-1href=#__codelineno-3-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>Containers 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>3000:3000</code></td><td>Web configuration interface.</td></tr><tr><tdstyle="text-align: center;"><code>69:69/udp</code></td><td>TFTP Port.</td></tr><tr><tdstyle="text-align: center;"><code>8080:80</code></td><td>NGINX server for hosting assets.</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>MENU_VERSION=1.9.9</code></td><td>Specify a specific version of boot files you want to use from NETBOOT.XYZ (unset pulls latest)</td></tr><tr><tdstyle="text-align: center;"><code>PORT_RANGE=30000:30010</code></td><td>Specify the port range tftp will use for data transfers <ahref=https://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol#Details>(see Wikipedia)</a></td></tr><tr><tdstyle="text-align: center;"><code>SUBFOLDER=/</code></td><td>Specify a subfolder if running this behind a reverse proxy (IE /proxy/)</td></tr><tr><tdstyle="text-align: center;"><code>NGINX_PORT=80</code></td><td>Specify a different internal port for the asset server</td></tr><tr><tdstyle="text-align: center;"><code>WEB_APP_PORT=3000</code></td><td>Specify a different internal port for the configuration UI</td></tr></tbody></table><h3id=volume-mappings-v>Volume Mappings (<code>-v</code>)<aclass=headerlinkhref=#volume-mappings-vtitle="Permanent link">¶</a></h3><table><thead><tr><thstyle="text-align: center;">Volume</th><th>Function</th></tr></thead><tbody><tr><tdstyle="text-align: center;"><code>/config</code></td><td>Storage for boot menu files and web application config</td></tr><tr><tdstyle="text-align: center;"><code>/assets</code></td><td>Storage for NETBOOT.XYZ bootable assets (live CDs and other files)</td></tr></tbody></table><h4id=miscellaneous-options>Miscellaneous Options<aclass=headerlinkhref=#miscellaneous-optionstitle="Permanent link">¶</a></h4><table><thead><tr><thstyle="text-align: center;">Parameter</th><th>Function</th></tr></thead><tbody><tr><td></td><td></td></tr></tbody></table><h2id=environment-variables-from-files-docker-secrets>Environment variables from files (Docker secrets)<aclass=headerlinkhref=#environment-variables-from-files-docker-secretstitle="Permanent link">¶</a></h2><p>You can set any environment variable from a file by using a special prepend <code>FILE__</code>.</p><p>As an example:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-4-1><aid=__codelineno-4-1name=__codelineno-4-1href=#__codelineno-4-1></a>-e<spanclass=w></span><spanclass=nv>FILE__MYVAR</span><spanclass=o>=</span>/run/secrets/mysecretva
</span></code></pre></div><p>Will set the environment variable <code>MYVAR</code> based on the contents of the <code>/run/secrets/mysecretvariable</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 your_user</code> as below:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-5-1><aid=__codelineno-5-1name=__codelineno-5-1href=#__codelineno-5-1></a>id<spanclass=w></span>your_user
</span></code></pre></div><h2id=docker-mods>Docker Mods<aclass=headerlinkhref=#docker-modstitle="Permanent link">¶</a></h2><p><ahref="https://mods.linuxserver.io/?mod=netbootxyz"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=netbootxyz&query=%24.mods%5B%27netbootxyz%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><p>Shell access whilst the container is running:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-7-1><aid=__codelineno-7-1name=__codelineno-7-1href=#__codelineno-7-1></a>docker<spanclass=w></span><spanclass=nb>exec</span><spanclass=w></span>-it<spanclass=w></span>netbootxyz<spanclass=w></span>/bin/bash
</span></code></pre></div></li><li><p>To monitor the logs of the container in realtime:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-8-1><aid=__codelineno-8-1name=__codelineno-8-1href=#__codelineno-8-1></a>docker<spanclass=w></span>logs<spanclass=w></span>-f<spanclass=w></span>netbootxyz
</span></code></pre></div></li><li><p>Container version number:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-9-1><aid=__codelineno-9-1name=__codelineno-9-1href=#__codelineno-9-1></a>docker<spanclass=w></span>inspect<spanclass=w></span>-f<spanclass=w></span><spanclass=s1>'{{ index .Config.Labels "build_version" }}'</span><spanclass=w></span>netbootxyz
</span></code></pre></div></li><li><p>Image version number:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-10-1><aid=__codelineno-10-1name=__codelineno-10-1href=#__codelineno-10-1></a>docker<spanclass=w></span>inspect<spanclass=w></span>-f<spanclass=w></span><spanclass=s1>'{{ index .Config.Labels "build_version" }}'</span><spanclass=w></span>lscr.io/linuxserver/netbootxyz:latest
</span></code></pre></div></li></ul><h2id=updating-info>Updating Info<aclass=headerlinkhref=#updating-infotitle="Permanent link">¶</a></h2><p>Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the <ahref=#application-setup>Application Setup</a> section above to see if it is recommended for the image.</p><p>Below are the instructions for updating containers:</p><h3id=via-docker-compose>Via Docker Compose<aclass=headerlinkhref=#via-docker-composetitle="Permanent link">¶</a></h3><ul><li><p>Update images:</p><ul><li><p>All images:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-11-1><aid=__codelineno-11-1name=__codelineno-11-1href=#__codelineno-11-1></a>docker-compose<spanclass=w></span>pull
</span></code></pre></div></li></ul></li><li><p>You can also remove the old dangling images:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-15-1><aid=__codelineno-15-1name=__codelineno-15-1href=#__codelineno-15-1></a>docker<spanclass=w></span>image<spanclass=w></span>prune
</span></code></pre></div></li></ul><h3id=via-docker-run>Via Docker Run<aclass=headerlinkhref=#via-docker-runtitle="Permanent link">¶</a></h3><ul><li><p>Update the image:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-16-1><aid=__codelineno-16-1name=__codelineno-16-1href=#__codelineno-16-1></a>docker<spanclass=w></span>pull<spanclass=w></span>lscr.io/linuxserver/netbootxyz:latest
</span></code></pre></div></li><li><p>Stop the running container:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-17-1><aid=__codelineno-17-1name=__codelineno-17-1href=#__codelineno-17-1></a>docker<spanclass=w></span>stop<spanclass=w></span>netbootxyz
</span></code></pre></div></li><li><p>Delete the container:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-18-1><aid=__codelineno-18-1name=__codelineno-18-1href=#__codelineno-18-1></a>docker<spanclass=w></span>rm<spanclass=w></span>netbootxyz
</span></code></pre></div></li><li><p>Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your <code>/config</code> folder and settings will be preserved)</p></li><li><p>You can also remove the old dangling images:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-19-1><aid=__codelineno-19-1name=__codelineno-19-1href=#__codelineno-19-1></a>docker<spanclass=w></span>image<spanclass=w></span>prune
</span></code></pre></div></li></ul><h3id=image-update-notifications-diun-docker-image-update-notifier>Image Update Notifications - Diun (Docker Image Update Notifier)<aclass=headerlinkhref=#image-update-notifications-diun-docker-image-update-notifiertitle="Permanent link">¶</a></h3><divclass="admonition tip"><pclass=admonition-title>Tip</p><p>We recommend <ahref=https://crazymax.dev/diun/>Diun</a> for update notifications. Other tools that automatically update containers unattended are not recommended or supported.</p></div><h2id=building-locally>Building locally<aclass=headerlinkhref=#building-locallytitle="Permanent link">¶</a></h2><p>If you want to make local modifications to these images for development purposes or just to customize the logic:</p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-20-1><aid=__codelineno-20-1name=__codelineno-20-1href=#__codelineno-20-1></a>git<spanclass=w></span>clone<spanclass=w></span>https://github.com/linuxserver/docker-netbootxyz.git
</span></code></pre></div><p>The ARM variants can be built on x86_64 hardware and vice versa using <code>lscr.io/linuxserver/qemu-static</code></p><divclass="language-bash highlight"><pre><span></span><code><spanid=__span-21-1><aid=__codelineno-21-1name=__codelineno-21-1href=#__codelineno-21-1></a>docker<spanclass=w></span>run<spanclass=w></span>--rm<spanclass=w></span>--privileged<spanclass=w></span>lscr.io/linuxserver/qemu-static<spanclass=w></span>--reset
</span></code></pre></div><p>Once registered you can define the dockerfile to use with <code>-f Dockerfile.aarch64</code>.</p><p>To help with development, we generate this dependency graph.</p><detailsclass=info><summary>Init dependency graph</summary><divclass=d2><divclass=d2-light><?xml version="1.0" encoding="utf-8"?><svgxmlns=http://www.w3.org/2000/svgxmlns:xlink=http://www.w3.org/1999/xlinkd2version=v0.6.8preserveaspectratio="xMinYMin meet"viewbox="0 0 829 3126"><svgid=d2-svgclass=d2-d4139f98a3964a128e8ef419b9da34a1width=829height=3126viewbox="11 11 829 3126"><rectx=11.000000y=11.000000width=829.000000height=3126.000000rx=0.000000fill=#FFFFFFstroke-width=0class=" fill-N7"/><styletype=text/css><![CDATA[