How to Host a Remote Script

Search IconIcon to open search

There’s a text editor called micro which can be installed with a single line of bash:

$ curl | bash

The genius of this solution is how easy the installation process is.

With micro as an inspiration, I try to bring the same elegance to my dotfile setup .

All I need is a hosting provider that can host a static file. I chose GitLab Pages because it capable of just that (and it doesn’t cost me anything).

GitLab Pages expects a file named index.html, so I used this name for the script file. Even though its an .html file, curl will treat it as a plain-text file. Whenever this file changes, GitLab CI/CD uploads the latest version of the script.

At this point, the script index.html is being served as a plain-text file at (the free domain provided by GitLab).

$ curl | bash

Looks good… but we can do better.

Like with, I configured a custom domain as an alias for the script’s real address. I had to go into the DNS settings for my custom domain. I added the 2 custom DNS records:

Host name Type TTL Data A 3600 TXT 3600 " TXT gitlab-pages-verification-code=************"

In addition, I disabled Force HTTPS so that curl doesn’t have to worry about HTTP 301 redirects.

Now, the script can be accessed at either or

$ curl | bash

This command is all I need to obtain my dotfiles.