Live data from Hacker News

Static site hosting hurdles

notes.volution.ro

61–70 of 183 posts

Re: Static site hosting hurdles

#61

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…

The other problem is that one goes down, they all go down. A static website has absolutely no reason to go down.

Re: Static site hosting hurdles

#62
post #26

I guess everyone has their own solution to this. Here's mine: - Write some static html and one stylesheet - Pay DigitalOcean for the cheap plan - Run nginx + letsencrypt - Apply linux security updates promptly - Occasionally pay to renew the domain So yeah, that does take a little bit of (very simple) systems administration skills, and it's a recurring commitment. But there is no such thing as a successful but unmain…

I used to do something similar, but DigitalOcean App Platform's $0/month "starter" plan[0] hosts a static site for even less effort.

When I was self-hosting on a DigitalOcean droplet, I was using Caddy instead of nginx, which handled letsencrypt for me, so that was nice.

[0]: https://www.digitalocean.com/pricing/app-platform

Re: Static site hosting hurdles

#63
post #60

Earlier quoted context omitted.

Is there anything really wrong with a CPanel host with FTP upload? Namecheap, Dreamhost, GoDaddy even (well maybe not them lol). There are a billion shared hosts everywhere and CPanel really isn't hard to use for HTTPS enabling or getting FTP locations to work with. ------ Bonus points: shove a random .php file in there and it probably will work if you need just a little bit of dynamic content.

>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 / pulled-from by literally anyone interested -- why would anyone clone your public blog repo and re-host it? You can use sr.ht, Codeberg or just host your own GIT -- it's not that hard if you're into it (I am not).

Your way of doing it is fine but let's not pretend that everyone else is following fashion or coolness. That's very rarely true. There's a list of very good reasons to use a public GIT repo + Netlify + use a static site generator on your own machine to only produce a directory of HTML+CSS files.

Re: Static site hosting hurdles

#64
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.

I prefer not to use free services because they're not sustainable, and they usually come with strings attached

Remember I've been using this for 13 years, and if it keeps on working the same way, I'll use it for another 13 easily. (I've hosted multiple sites on it over the years)

The current page claims it's $3.95 a month if you pay yearly: https://www.dreamhost.com/hosting/shared/

I thought mine was more like $8 but I honestly don't remember. It's a fair price for steady service IMO

Re: Static site hosting hurdles

#65
Why would you ever host a static site yourself? There is nothing special about it, it's just text. Use any of the dozen different free static site hosters.

If you're just trying to learn web server tech, then do it all yourself, but jump through the hoops too; don't use a tool that does it all for you, that defeats the purpose.

Re: Static site hosting hurdles

#66
post #55
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…

Nothing's wrong, it just gives much more than needed to serve a static site! I like the idea to statically pre-generate entire HTTP responses, with all headers, and just serve a byte stream mindlessly once a URL is mapped. If TLS is handled by a separate proxy (that only does TLS termination), the "web server" becomes as trivial as it gets. Fast, simple, due to the simplicity probably bulletproof.

I don't really follow what you're saying

It serves static sites. I upload my files with rsync, scp, or git, and they are served

Re: Static site hosting hurdles

#67
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…

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 write the damn HTML and CSS yourself, it's static after all.

This isn't to say your way isn't wrong /for you/, of course. Whatever floats your boat. For me, it's all just unnecessary complexity that will invite in all sorts of gremlins to waste my time.

Re: Static site hosting hurdles

#68
post #67

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…

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…

> For a single user environment as is likely the case for most static websites? Yeah, it's just needless complexity.

Hard disagree. As I said above and you ignored it (no clue why): I want to have a history of my static website.

> In fact, you lost me at "static site generator". WTF? Just write the damn HTML and CSS yourself, it's static after all.

I can and I don't want to. Markdown is tons easier, you write out an article, execute one command, push the updated HTML+CSS files to GIT and you're done. If we're talking about simplicity let's not ignore that scenario because it really is quite simple.

I got a backlog of 30 things to work on and 500+ to check out "one day when I have the time". Going back to hand-crafting HTML is likely at spot #1784 in my brain. It's a meaningless paperwork that can and must be outsourced to computers.

Re: Static site hosting hurdles

#69
post #3

It felt odd to see a doc this comprehensive on static site hosting with no mention of AWS S3/Cloudfront, given how easy it is to push content to an S3 bucket (either manually or via the CI pipeline of your choosing) and then serve it up either direct-from-S3 or via Cloudfront. But then it turns out that this is actually pushing folks towards some new paradigm of static cached HTTP responses instead of files. It pitch…

Just using the file system is inadequate for some reasons that TFA mentions. For instance, returning gzip or Brotli compressed versions of resources, or returning HTTP 301/302 redirects for certain requests.

Also if you use CloudFront be aware you'll be paying for bandwidth, so if one of your pieces goes viral (or you're just a popular writer) the cost can be surprisingly high (over $50/mo).

Re: Static site hosting hurdles

#70
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.

Shoutout to Gitlab as well, which is what I use for personal sites.
Post reply on HN