Live data from Hacker News

Static site hosting hurdles

notes.volution.ro

141–150 of 183 posts

Re: Static site hosting hurdles

#141

Static hosting on VPS cite is easy as hell. Get a VPS with Ubuntu 22.04 for as low as 3 Euros/Month, execute the following commands: ``` sudo apt-get install -y nginx python3-certbot-nginx certbot sudo ufw allow "Nginx Full" sudo unlink /etc/nginx/sites-enabled/default sudo mkdir -p /srv/https/website sudo chown -vR $MYUSER:$MYUSER /srv/https/website echo "I've created my website here." > /srv/https/website/index.htm…

This is great but what the article is about that you're underestimating is the decision anxiety and subsequent complexity of arriving at the specific configuration you've posted.

Even after you've for some reason decided on which tech to use (nginx, etc.), it doesn't set itself up (well it does but not in as easy-to-use config as yours). Examples of how to configure it well are going to vary depending on where you read - your example is unique, which should one follow.

Or if you want to create your own config from scratch reading docs, I'm sure your configuration is the product of many hours of trial and error and a bit of debugging.

---

As an aside, for anyone reading this who is looking for a good static hosting setup, this is a great one.

Re: Static site hosting hurdles

#142
post #23

Uh what's wrong with shared hosting? I use Dreamhost but there are dozens of others. It costs less than $10/month and I've used it since 2009. I think the industry (or part of a generation of programmers) somehow collectively forgot that it exists. I don't see any mention of it in the article -- it solves the problem exactly. It easily serves and survives all the spikes from Hacker News that my site gets. Shared host…

> what's wrong with shared hosting? You answered that yourself: > It costs less than $10/month That’s a lot of dollars for a static website. There are a myriad of free options and there have been for years. Kinda disappointing that they weren’t mentioned. Anyone wanting to deploy a static website knows the big 4, completely free: Netlify, Vercel, CloudFlare Pages, GitHub Pages.

There are still some limits to these (for example Netlify limits the bandwidth you can use each month), but yeah, for most practical purposes the free tier should do just fine.

On a side note, I'm wondering if one can host one site simultaneously on e. g. Netlify and Vercel and load-balance those (for example, with round-robin DNS) to stay within free limits for longer.

Re: Static site hosting hurdles

#143
post #67

Earlier quoted context omitted.

Generally speaking, I subscribe to the philosophy of KISS. For a multi-user environment where a dozen people could be accessing the same file at any given time, yeah some sort of version control system will probably make everyone's life easier. For a single user environment as is likely the case for most static websites? Yeah, it's just needless complexity. In fact, you lost me at "static site generator". WTF? Just w…

> In fact, you lost me at "static site generator". WTF? Just write the damn HTML and CSS yourself, it's static after all. At a minimum, static site generators create indexes, table-of-contents, tags, sorts by date, and other such features. Pretty much no one writes good, raw, HTML these days. Documentation is written Sphinx, texinfo, docbook, and many other formats. Why? Because compiling chapters (or pages) together…

My website [1] is good raw (X)HTML [2]. It's just a couple of pages though, nothing fancy. If I was keeping a blog or something, I would definitely go for an SSG.

[1]: https://notpushk.in/

[2]: https://gitlab.com/notpushkin/notpushk.in

Re: Static site hosting hurdles

#144

Yeah I went with Netlify for my static site because I have zero desire to ever been an IT admin. I do skip the static generator part and go with artisinally hand crafted HTML/CSS/JS instead. It’s radically simpler and ultimately better imho.

How do you get your content into Netlify? They push the CI/CD angle pretty hard (sometimes to the exclusion of other things; e.g. bugs in the CLI that break things if you aren't on their expected/happy path) and the fetishization of GitHub-integrated CI/CD leads to stuff that is about as complex as the traditional undesirable IT overhead.

Re: Static site hosting hurdles

#145

I switched from Vercel static site hosting, because I recently read an article here about how it's usually more economical to scale vertically instead of horizontally (i.e. use one big server for everything). Even though I'm only running a few services, I did the math and realized it's absolutely true. I can fit everything I'm running onto one DigitalOcean droplet behind Cloudflare for $24/month + an extra 25gb block…

There's a bit of risk to having all your eggs in one basket.

One is security, although containers mitigate that. Another is resource allocation. If one piece of software hogs all the resources, others will suffer.

Personally I split things just because it matches my mental model. My personal website runs somewhere. My professional website runs somewhere else. My home server gets its own dedicated hardware.

Re: Static site hosting hurdles

#146
post #60

Earlier quoted context omitted.

>Is there anything really wrong with a CPanel host with FTP upload? Nothing, other than that it's not cool with the kids because it's the grandpa's way of being a webmaster. Personally, being an old school grump, I'll choose FTP upload over Git nonsense any day of the week because why in the nine seas of the seven hells do I need to sign up for Github, upload all my crap there, download-install and run a Git daemon,…

Lots of us old school grumps still running things the old fashioned way for many years, serving millions of requests without issue, customers happy, and with a deployment pipeline anyone can understand :)

Because were more interested in getting things done, rather than tech fad signaling.

Re: Static site hosting hurdles

#148
post #60

Earlier quoted context omitted.

>Is there anything really wrong with a CPanel host with FTP upload? Nothing, other than that it's not cool with the kids because it's the grandpa's way of being a webmaster. Personally, being an old school grump, I'll choose FTP upload over Git nonsense any day of the week because why in the nine seas of the seven hells do I need to sign up for Github, upload all my crap there, download-install and run a Git daemon,…

You over-focus on what's cool or fashionable. For many of us that's absolutely not the reason to go (or not to go) with a platform. GIT is extremely useful for versioning. I want that. If I make a dumb mistake I want to have a diff that I've fixed a typo / grammar / added more links etc. You neither need to use GitHub nor give your GitHub credentials to anything. You can just make a public repo and have it cloned / p…

Git for static site versioning? Why not just copy the HTML into a new folder? Takes seconds. Zero complexity. Gets backed up with your regular system backups.

Git is great for collaborative or complex projects, but for a static site, you're using a freight train to bring a single tomato to market.

Re: Static site hosting hurdles

#149
post #23

Uh what's wrong with shared hosting? I use Dreamhost but there are dozens of others. It costs less than $10/month and I've used it since 2009. I think the industry (or part of a generation of programmers) somehow collectively forgot that it exists. I don't see any mention of it in the article -- it solves the problem exactly. It easily serves and survives all the spikes from Hacker News that my site gets. Shared host…

> what's wrong with shared hosting? You answered that yourself: > It costs less than $10/month That’s a lot of dollars for a static website. There are a myriad of free options and there have been for years. Kinda disappointing that they weren’t mentioned. Anyone wanting to deploy a static website knows the big 4, completely free: Netlify, Vercel, CloudFlare Pages, GitHub Pages.

There are web hosting plans at less than 3$/month.

There are also community hosting networks offering different kind of hosting services for a small sum / year. Here is an example of such a network mostly france based but I am sure there are same kind of initiatives all over the world: https://www.chatons.org

Re: Static site hosting hurdles

#150

Earlier quoted context omitted.

You over-focus on what's cool or fashionable. For many of us that's absolutely not the reason to go (or not to go) with a platform. GIT is extremely useful for versioning. I want that. If I make a dumb mistake I want to have a diff that I've fixed a typo / grammar / added more links etc. You neither need to use GitHub nor give your GitHub credentials to anything. You can just make a public repo and have it cloned / p…

Git for static site versioning? Why not just copy the HTML into a new folder? Takes seconds. Zero complexity. Gets backed up with your regular system backups. Git is great for collaborative or complex projects, but for a static site, you're using a freight train to bring a single tomato to market.

Well, even though I can reinvent `git diff` I still don't want to. GIT gives me good diffs and I don't view it as an unnecessary overhead.

¯\_(ツ)_/¯

Post reply on HN