[GH-ISSUE #26] Self-hosting Instructions #14

Closed
opened 2026-02-27 14:49:57 +03:00 by kerem · 23 comments
Owner

Originally created by @asmartin on GitHub (Jan 13, 2016).
Original GitHub issue: https://github.com/netbootxyz/netboot.xyz/issues/26

Would it be possible to provide instructions for how to create your own self-hosted version of http://boot.netboot.xyz (where ipxe chainloads to) for situations where you cannot access the Internet website (e.g slow connection, firewall, etc)?

Originally created by @asmartin on GitHub (Jan 13, 2016). Original GitHub issue: https://github.com/netbootxyz/netboot.xyz/issues/26 Would it be possible to provide instructions for how to create your own self-hosted version of http://boot.netboot.xyz (where ipxe chainloads to) for situations where you cannot access the Internet website (e.g slow connection, firewall, etc)?
kerem 2026-02-27 14:49:57 +03:00
Author
Owner

@antonym commented on GitHub (Jan 14, 2016):

Really it's just a matter of grabbing the src directory, dropping it on a webserver, editing boot.cfg and it's done. I'll try and add something to the docs sooner or later.

<!-- gh-comment-id:171505109 --> @antonym commented on GitHub (Jan 14, 2016): Really it's just a matter of grabbing the src directory, dropping it on a webserver, editing boot.cfg and it's done. I'll try and add something to the docs sooner or later.
Author
Owner

@asmartin commented on GitHub (Jan 14, 2016):

That would be fantastic! Thanks!

<!-- gh-comment-id:171524142 --> @asmartin commented on GitHub (Jan 14, 2016): That would be fantastic! Thanks!
Author
Owner

@antonym commented on GitHub (Jan 14, 2016):

Just one thing to note, if you can't access the internet, you probably aren't going to have much success installing anything since it's all on the internet. :)

<!-- gh-comment-id:171524425 --> @antonym commented on GitHub (Jan 14, 2016): Just one thing to note, if you can't access the internet, you probably aren't going to have much success installing anything since it's all on the internet. :)
Author
Owner

@asmartin commented on GitHub (Jan 14, 2016):

True, but for my use case I am just interested in self-hosting for security rather than pointing pxe at the cloud

<!-- gh-comment-id:171525523 --> @asmartin commented on GitHub (Jan 14, 2016): True, but for my use case I am just interested in self-hosting for security rather than pointing pxe at the cloud
Author
Owner

@chris18890 commented on GitHub (Jan 14, 2016):

@antonym in addition to modifying boot.config, do you have to recompile ipxe to point at your own url?

<!-- gh-comment-id:171796089 --> @chris18890 commented on GitHub (Jan 14, 2016): @antonym in addition to modifying boot.config, do you have to recompile ipxe to point at your own url?
Author
Owner

@DavidVentura commented on GitHub (Jan 29, 2016):

"Big images" such as gparted take a very long time to load for me, debian8-text takes ~1 min. Debian graphics takes <3 min (I came back 3 min later and it was loaded). Gparted takes >10min. Is this because of latency? I have a 50mbps downlink. I could mirror the ISOs locally if the problem is the bandwidth/latency.

<!-- gh-comment-id:176962263 --> @DavidVentura commented on GitHub (Jan 29, 2016): "Big images" such as gparted take a very long time to load for me, debian8-text takes ~1 min. Debian graphics takes <3 min (I came back 3 min later and it was loaded). Gparted takes >10min. Is this because of latency? I have a 50mbps downlink. I could mirror the ISOs locally if the problem is the bandwidth/latency.
Author
Owner

@antonym commented on GitHub (Jan 29, 2016):

I think it's probably more related to Sourceforge's mirrors where GParted hosts its builds. Their mirrors are typically overloaded and sluggish.

<!-- gh-comment-id:177019175 --> @antonym commented on GitHub (Jan 29, 2016): I think it's probably more related to Sourceforge's mirrors where GParted hosts its builds. Their mirrors are typically overloaded and sluggish.
Author
Owner

@DavidVentura commented on GitHub (Jan 30, 2016):

How do I build the ISO? I want to point to my servers to test timings locally.

Oops. I wasn't able to build it because you can't compile iPXE on arch atm. Worked fine on Debian

<!-- gh-comment-id:177041752 --> @DavidVentura commented on GitHub (Jan 30, 2016): How do I build the ISO? I want to point to my servers to test timings locally. Oops. I wasn't able to build it because you can't compile iPXE on arch atm. Worked fine on Debian
Author
Owner

@asmartin commented on GitHub (Mar 26, 2016):

Any updates on this? I would really like to test out netboot.xyz, but don't want to rely on pulling down installers from online due to the possibility of mirrors being compromised (like what happened with Linux Mint)

<!-- gh-comment-id:201702706 --> @asmartin commented on GitHub (Mar 26, 2016): Any updates on this? I would really like to test out netboot.xyz, but don't want to rely on pulling down installers from online due to the possibility of mirrors being compromised (like what happened with Linux Mint)
Author
Owner

@asmartin commented on GitHub (Aug 27, 2016):

Any updates on this?

<!-- gh-comment-id:242929013 --> @asmartin commented on GitHub (Aug 27, 2016): Any updates on this?
Author
Owner

@MayhemBill commented on GitHub (Feb 15, 2017):

Has this been updated at all? or still dead?

<!-- gh-comment-id:279887680 --> @MayhemBill commented on GitHub (Feb 15, 2017): Has this been updated at all? or still dead?
Author
Owner

@asmartin commented on GitHub (Feb 15, 2017):

I am still interested in this as well

On Feb 14, 2017 7:08 PM, "BillyTheHero" notifications@github.com wrote:

Has this been updated at all? or still dead?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/antonym/netboot.xyz/issues/26#issuecomment-279887680,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADuYu-TrfPsPhAOWl_1suV8-j2zqo5dDks5rclAhgaJpZM4HDuzo
.

<!-- gh-comment-id:279898511 --> @asmartin commented on GitHub (Feb 15, 2017): I am still interested in this as well On Feb 14, 2017 7:08 PM, "BillyTheHero" <notifications@github.com> wrote: > Has this been updated at all? or still dead? > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/antonym/netboot.xyz/issues/26#issuecomment-279887680>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/ADuYu-TrfPsPhAOWl_1suV8-j2zqo5dDks5rclAhgaJpZM4HDuzo> > . >
Author
Owner

@TechnologyClassroom commented on GitHub (Jul 20, 2017):

@asmartin, @TheHeroBilly, and @DavidVentura, this can be accomplished on a LAN by serving up the images that the .ipxe files point to on a local server via http, ftp, or your file server favorite method. The netboot menu could be modified to point to your server instead of the original source. After that is setup, the repos would still be coming from the original source. You could mirror repos locally and modify the images to point to your local repos. A script to set all of that up would be nice.

<!-- gh-comment-id:316740452 --> @TechnologyClassroom commented on GitHub (Jul 20, 2017): @asmartin, @TheHeroBilly, and @DavidVentura, this can be accomplished on a LAN by serving up the images that the .ipxe files point to on a local server via http, ftp, or your file server favorite method. The netboot menu could be modified to point to your server instead of the original source. After that is setup, the repos would still be coming from the original source. You could mirror repos locally and modify the images to point to your local repos. A script to set all of that up would be nice.
Author
Owner

@MitchRatquest commented on GitHub (Sep 29, 2017):

Maybe I'm late to the party, but I've successfully done this with using buildroot on a tiny ARM computer. You can find the repo here: https://github.com/MitchRatquest/tinyNetboot

It uses Dnsmasq and python to host the files. Its a matter of tweaking the mirror locations to point to the local machine. While slow (100mbs), its powered by a USB port, and boots/serves files quicker than the target machine gets into netboot, so it works for me.

<!-- gh-comment-id:333128627 --> @MitchRatquest commented on GitHub (Sep 29, 2017): Maybe I'm late to the party, but I've successfully done this with using buildroot on a tiny ARM computer. You can find the repo here: https://github.com/MitchRatquest/tinyNetboot It uses Dnsmasq and python to host the files. Its a matter of tweaking the mirror locations to point to the local machine. While slow (100mbs), its powered by a USB port, and boots/serves files quicker than the target machine gets into netboot, so it works for me.
Author
Owner

@webairnetboot commented on GitHub (Nov 2, 2017):

Self Hosted netboot.xyz - Use at your own risk!

I'm setting up an in-house netboot server, cloning the git repo to a Cent OS 6.9 server.
Hopefully someone can use this to get their own self hosted solution working.

First let's get some basic dependencies installed:
yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel expat-devel virtualenv gcc pyliblzma genisoimage cdw xorriso

Next install the web server of your choice and PHP7, you may not need all of the modules I've chosen to install:
yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-mcrypt.x86_64 php70w-bcmath.x86_64 php70w-fpm.x86_64 php70w-gd.x86_64 php70w-intl.x86_64 php70w-mbstring.x86_64 php70w-ldap.x86_64 php70w-opcache.x86_64 php70w-mysql.x86_64 php70w-pear.noarch php70w-soap.x86_64 php70w-tidy.x86_64 php70w-xml.x86_64 php70w-xmlrpc.x86_64 php70w-phpdbg.x86_64 php70w-process.x86_64 php70w-pspell.x86_64 php70w-recode.x86_64 php70w-snmp.x86_64

Next upgrade python to latest version without breaking yum, I used the steps outlined by Daniel Eriksson with success:
https://danieleriksson.net/2017/02/08/how-to-install-latest-python-on-centos/

I skipped the python 2.7 and went with only 3.6.3:
wget http://python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz
tar xf Python-3.6.3.tar.xz
cd Python-3.6.3
./configure --prefix=/usr/local --enable-optimizations --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make && make altinstall

I also opted to strip symbols from the shared library to reduce the memory footprint out of sheer geekdom:
strip /usr/local/lib/libpython3.6m.so.1.0

Next, install MkDocs and its pip dependencies:
pip install mkdocs

Then I git cloned the netboot.xyz source to /usr/local/src:
git clone https://github.com/antonym/netboot.xyz.git

Run the prep-release.sh script which compiles ipxe accordingly and prepares the documentation for publishing:
cd netboot.xyz
script/prep-release.sh

Now you're ready to create the site for the web server:
mkdocs build

Once the build completes you should have a directory named "site" which can be copied to the DocumentRoot of your custom URL.

You may need to tweak the above accordingly for your specific environment. As stated, use at your own risk! :)

<!-- gh-comment-id:341563027 --> @webairnetboot commented on GitHub (Nov 2, 2017): ## Self Hosted netboot.xyz - Use at your own risk! I'm setting up an in-house netboot server, cloning the git repo to a Cent OS 6.9 server. Hopefully someone can use this to get their own self hosted solution working. First let's get some basic dependencies installed: `yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel expat-devel virtualenv gcc pyliblzma genisoimage cdw xorriso` Next install the web server of your choice and PHP7, you may not need all of the modules I've chosen to install: `yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-mcrypt.x86_64 php70w-bcmath.x86_64 php70w-fpm.x86_64 php70w-gd.x86_64 php70w-intl.x86_64 php70w-mbstring.x86_64 php70w-ldap.x86_64 php70w-opcache.x86_64 php70w-mysql.x86_64 php70w-pear.noarch php70w-soap.x86_64 php70w-tidy.x86_64 php70w-xml.x86_64 php70w-xmlrpc.x86_64 php70w-phpdbg.x86_64 php70w-process.x86_64 php70w-pspell.x86_64 php70w-recode.x86_64 php70w-snmp.x86_64` Next upgrade python to latest version without breaking yum, I used the steps outlined by Daniel Eriksson with success: [https://danieleriksson.net/2017/02/08/how-to-install-latest-python-on-centos/ ](https://danieleriksson.net/2017/02/08/how-to-install-latest-python-on-centos/) I skipped the python 2.7 and went with only 3.6.3: `wget http://python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz` `tar xf Python-3.6.3.tar.xz` `cd Python-3.6.3` `./configure --prefix=/usr/local --enable-optimizations --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"` `make && make altinstall` I also opted to strip symbols from the shared library to reduce the memory footprint out of sheer geekdom: `strip /usr/local/lib/libpython3.6m.so.1.0` Next, install [MkDocs](https://github.com/Collizo4sky/sitepoint_mkdocs) and its pip dependencies: `pip install mkdocs` Then I git cloned the [netboot.xyz](url) source to /usr/local/src: `git clone https://github.com/antonym/netboot.xyz.git` Run the prep-release.sh script which compiles ipxe accordingly and prepares the documentation for publishing: `cd netboot.xyz` `script/prep-release.sh` Now you're ready to create the site for the web server: `mkdocs build` Once the build completes you should have a directory named "site" which can be copied to the DocumentRoot of your custom URL. You may need to tweak the above accordingly for your specific environment. As stated, use at your own risk! :)
Author
Owner

@antonym commented on GitHub (Nov 2, 2017):

Haven't forgotten about this... my main goal is to get some Ansible playbooks that you should just be able to run and have it set up everything for a local copy with your own settings. Just been trying to find some time to hack on them and get them working with basic functionality.

<!-- gh-comment-id:341566711 --> @antonym commented on GitHub (Nov 2, 2017): Haven't forgotten about this... my main goal is to get some Ansible playbooks that you should just be able to run and have it set up everything for a local copy with your own settings. Just been trying to find some time to hack on them and get them working with basic functionality.
Author
Owner

@dragon788 commented on GitHub (Nov 8, 2018):

I wonder if Docker or Ansible would be the less painful route.

<!-- gh-comment-id:437172662 --> @dragon788 commented on GitHub (Nov 8, 2018): I wonder if Docker or Ansible would be the less painful route.
Author
Owner

@asmartin commented on GitHub (Nov 9, 2018):

I would advocate for ansible

On Thu, 8 Nov 2018 at 16:04, dragon788 notifications@github.com wrote:

I wonder if Docker or Ansible would be the less painful route.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/antonym/netboot.xyz/issues/26#issuecomment-437172662,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADuYuwo0b20plEt3Y-Hz_dIDJyOLwy5Fks5utKpigaJpZM4HDuzo
.

<!-- gh-comment-id:437224659 --> @asmartin commented on GitHub (Nov 9, 2018): I would advocate for ansible On Thu, 8 Nov 2018 at 16:04, dragon788 <notifications@github.com> wrote: > I wonder if Docker or Ansible would be the less painful route. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/antonym/netboot.xyz/issues/26#issuecomment-437172662>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/ADuYuwo0b20plEt3Y-Hz_dIDJyOLwy5Fks5utKpigaJpZM4HDuzo> > . >
Author
Owner

@akiross commented on GitHub (Dec 17, 2018):

Would be nice to have this on docker with something like this: https://jpetazzo.github.io/2013/12/07/pxe-netboot-docker/

One could run the image and configure the bridge to use a specific eth card to have it up and running.

<!-- gh-comment-id:448010152 --> @akiross commented on GitHub (Dec 17, 2018): Would be nice to have this on docker with something like this: https://jpetazzo.github.io/2013/12/07/pxe-netboot-docker/ One could run the image and configure the bridge to use a specific eth card to have it up and running.
Author
Owner

@antonym commented on GitHub (Dec 2, 2019):

For an update on this, I'm looking at switching over to Ansible for self-hosting and we should be swapping out the existing code in the repo for the Ansible templates in the coming weeks:

https://netboot.xyz/blog/2019-11-29-self-hosting-and-live-booting/

<!-- gh-comment-id:560212614 --> @antonym commented on GitHub (Dec 2, 2019): For an update on this, I'm looking at switching over to Ansible for self-hosting and we should be swapping out the existing code in the repo for the Ansible templates in the coming weeks: https://netboot.xyz/blog/2019-11-29-self-hosting-and-live-booting/
Author
Owner

@asmartin commented on GitHub (Dec 2, 2019):

That sounds great, thanks!

On Sun, Dec 1, 2019, 9:27 PM Antony Messerli notifications@github.com
wrote:

For an update on this, I'm looking at switching over to Ansible for
self-hosting and we should be swapping out the existing code in the repo
for the Ansible templates in the coming weeks:

https://netboot.xyz/blog/2019-11-29-self-hosting-and-live-booting/


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/antonym/netboot.xyz/issues/26?email_source=notifications&email_token=AA5ZROZ3BFBTIQ7BQ7KGL6TQWR6CXA5CNFSM4BYO5TUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFSCVBQ#issuecomment-560212614,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA5ZRO42BQEKADR23ELB4NLQWR6CXANCNFSM4BYO5TUA
.

<!-- gh-comment-id:560234635 --> @asmartin commented on GitHub (Dec 2, 2019): That sounds great, thanks! On Sun, Dec 1, 2019, 9:27 PM Antony Messerli <notifications@github.com> wrote: > For an update on this, I'm looking at switching over to Ansible for > self-hosting and we should be swapping out the existing code in the repo > for the Ansible templates in the coming weeks: > > https://netboot.xyz/blog/2019-11-29-self-hosting-and-live-booting/ > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/antonym/netboot.xyz/issues/26?email_source=notifications&email_token=AA5ZROZ3BFBTIQ7BQ7KGL6TQWR6CXA5CNFSM4BYO5TUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFSCVBQ#issuecomment-560212614>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AA5ZRO42BQEKADR23ELB4NLQWR6CXANCNFSM4BYO5TUA> > . >
Author
Owner

@antonym commented on GitHub (Dec 11, 2019):

The development branch now contains the work being done with Ansible. It's still in dev but it's in a place that can be tested if anyone wants to hack around with it:

https://github.com/netbootxyz/netboot.xyz/tree/development#self-hosting-netbootxyz

<!-- gh-comment-id:564320610 --> @antonym commented on GitHub (Dec 11, 2019): The development branch now contains the work being done with Ansible. It's still in dev but it's in a place that can be tested if anyone wants to hack around with it: https://github.com/netbootxyz/netboot.xyz/tree/development#self-hosting-netbootxyz
Author
Owner

@antonym commented on GitHub (Dec 25, 2019):

Docs are now up here: https://netboot.xyz/selfhosting/ and the Ansible code has made its way into netboot.xyz master.

<!-- gh-comment-id:568851935 --> @antonym commented on GitHub (Dec 25, 2019): Docs are now up here: https://netboot.xyz/selfhosting/ and the Ansible code has made its way into netboot.xyz master.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/netboot.xyz#14
No description provided.