Using Nginx to serve bootstrap script


In this post, I will walk through the easy steps on how to host a bootstrap script on Github and make it possible to proxy it through a shorter domain.

The goal is to be able to setup the basic needed stuff on a new server with one simple command. The same way you install Oh my zsh and Brew.

I choose to host the script on Github as this provides me with flexibility and ease when I need to update and keep track of it.

In this example, I will use this which I use to bootstrap Debian servers I use.

In my Nginx configuration file for the used domain, I have this:

location / {

This makes the Github script available at:

To use the script on a machine you will need curl or wget:


curl | bash

We can do the same with wget:

wget -O - | bash

You can add the -k option in curl and --no-check-certificate in wget to skip certificate check. If you use self-signed certs, this will be needed.