Lurker News
This is more of a thought experiment, I know a multitude of ways to do this which require loads of setup, jumping through AWS hoops, etc. I'd like ideally way to deploy to a hosted service with a single command. Imagine Heroku but even easier.

Comments (487) 172 threads

singhrac16 replies#
I've tried Github pages, Netlify, and Cloudflare Pages. Moved last night to the latter.

Github pages is fine, but the extra gh-pages branch is kind of annoying. It's fairly clear (for obvious reasons) that they mainly think about Jekyll users, though I had a Hugo blog there for a while.
Netlify sounds great, but in practice I ran into an annoying issue that I couldn't resolve where I had to rerun every automatic build. This probably isn't really their fault but the forums didn't work.
Cloudflare Pages kind of just worked out of the box, and since I was already using it for my DNS, changing where the domain pointed took a few seconds.
I'd suspect, if you corrected for how many issues were particular to me, I'd say Cloudflare Pages ~ Netlify > Github Pages. I'm kind of surprised the latter charges you for custom domains; I do have to say there's more documentation for Github than any of the others.

foobar333333 replies#
gitlab pages is better imo. You can use the CI to run any code you want to build the static files.
gala8y1 reply#
Also, GitLab allows business websites in GitLab pages in free tier, as opposed to Netlify and Github.

"With GitLab Pages, you can publish static websites directly from a repository in GitLab. Use for any personal or business website."

lostmsu2 replies#
GitHub allows business websites, AFAIK. Where did you get the notion, that it does not?

Continue this thread — 2 replies

lights0123#
> You can use the CI to run any code you want to build the static files.

That is Netlify and Cloudflare Pages' defining feature, and GitHub has had that for a few years now.

jedbrown#
Notably, it's easy to make a review site that integrates with a merge request so you can see it before deploying and get visual reviews any time you have multiple stakeholders. https://docs.gitlab.com/ee/ci/review_apps/
ignoramous3 replies#
I use both pages.dev and netlify.com: pages.dev, even in open beta, is a fantastic product if it suits all your needs, but the limitations [0], if you hit them, are a dead-end and there are no ETAs as to when some of those limitations would be addressed.

That is not the case with netlify.com which boasts a myriad of features, is equally as fast, production-ready, and competitively priced.
With pages.dev, I believe, you pay per every domain you host, whilst with netlify.com, there's no cap on number of domains per account, though they do charge for bandwidth (unlike pages.dev).
Workers Sites [1] is a viable alternative and I quite prefer it over pages.dev.
[0] https://developers.cloudflare.com/pages/platform/limits
[1] https://developers.cloudflare.com/workers/platform/sites

benatkin1 reply#
How do you know that Netlify is production ready? I found Netlify Identity to not be production ready* and now I'm not so sure about the rest of the platform.

* Three reasons. 1) The identity widget has people setting it up in such a way that tokens aren't refreshed and logins last only an hour. https://github.com/netlify/netlify-identity-widget/issues/11... 2) Netlify Identity keeps bumping me out despite having gone out of my way to get it configured properly. I don't know why but the issue has lasted for weeks. 3) In development mode, the token can't be verified without making a request to Netlify Functions, and the suggested path (in Redwood.js at least) is to just parse the JWT without verifying it.

ignoramous#
> How do you know that Netlify is production ready?

I meant in a way that pages.dev is in "open beta" and netlify.com don't market themselves as such.
Besides, in my personal experience, I never hit any issue with netlify that didn't have a solution.

kmf#
hey, kristian from the workers team here - i wrote these docs, so this is good feedback :)

we don't have any plans to get rid of workers sites! but we do think that for most people deploying static sites, pages is a better fit than workers sites.
when we do talk about the future of pages versus workers sites, we're generally talking about making it easier to deploy serverless functions /with/ your pages sites - providing better tooling and DX around that is a super high priority for us.
the interplay between workers serverless functions and static asset serving via workers sites is still a really strong use case (and IMO a thing that workers is uniquely capable of doing) that we don't have any plans to shelf. again, i wrote the docs here so this is on me if it came across as "we're getting rid of workers sites" - i'll take a shot at improving these docs and helping clarify that next week!

kmf2 replies#
> With pages.dev, I believe, you pay per every domain you host

nope, we do unlimited sites on pages! here's the free plan [1]:
> 1 build at a time
> 500 builds per month
> Unlimited sites
> Unlimited requests
> Unlimited bandwidth
you can upgrade to the pro ($20/mo) or business ($200/mo) plans for more concurrent builds and builds per month. still not priced per domain or site!
[1]: https://pages.cloudflare.com/#pricing

StavrosK1 reply#
Hey, do you plan to support Gitlab repos? I'd love to use pages but I can't because my repos are on Gitlab.

Continue this thread — 1 reply

ignoramous#
Thanks.

> ...still not priced per domain or site!
It was my understanding that I had to upgrade each domain to "pro" with $20/month (say, if I wanted pro features like web-analytics on each). Is that not the case?
On netlify.com, "pro" is $19/month per account (not per domain).

florigator123#
Haven't tried Netlify or Cloudfare pages, but I use GH pages for my personal blog (running Jekyll) and I've never seen any reason to switch. You need to know how to use Git and Github, but since you're reading HN you probably know these things. It's really convenient to be able to just push to GH and have it auto-deploy - and it's free.

Granted, my blog is an insignifcant site with a tiny readership and I rarely update it, so if you need something more heavy duty than I have no idea if GH pages is up to the task.

pydry3 replies#
The feature that made me change from github pages to netlify was 302s. Cloudflare pages doesn't seem to have that.
avianlyric#
You need to use Cloudflare page rules, which has some limits, but works fine for www. redirects etc.

For everything else it expects your SPA to handle it.

eastdakota#
Stay tuned. Lots of these Cloudflare Page niddles getting fixed in a few weeks.
TurkishPoptart1 reply#
What is 302s?
jacobp1004 replies#
I actually just went the other way. I found CF is a bit too aggressive with anti-DDOS measures, and the page would not work sometimes in Safari with default settings.

The default setup for GH Pages is not great. Jekyll is very dated. But if you use GH Actions, you can build yourself a pretty great setup. My site is open source at https://github.com/jacobp100/jacob-does-code - there's also a blog post about how the build system works.

londons_explore#
Usually when I need static site hosting, I don't want to build myself a great setup - I want to click a few buttons and have a great setup.

Third party free hosting excels at the ability to do a start to finish page in inside an hour. I want to spend 55 minutes of that hour writing the text, not fiddling with oddities of how to make GitHub actions show me the parse errors of my markdown...

bombcar#
Safari + IPv6 = find out a lot about crosswalks and stoplights.
sedachv2 replies#
> I found CF is a bit too aggressive with anti-DDOS measures

As someone who does a lot of browsing with unpopular web browsers, Cloudflare is basically a way to ensure that it is a coin toss as to whether or not I will see your site; it is not the worst CDN/DoS protection racket service out there though. I would like to see how much legitimate traffic Cloudflare or the others block, and how much website operators are spending on that "service."

Jamie99121 reply#
This is something that is configurable though. If you leave your Firewall security mode to default, then yes it will block IPs with bad rep.

If I don't care about anti-ddos, I just set the Firewall security to Low, and create a Firewall rule to allow everything from 0.0.0.0/0, simple as that.

Continue this thread — 1 reply

Continue this thread — 1 more reply

Continue this thread — 1 more reply

Continue this thread — 11 more replies

messo12 replies#
Hosting a personal blog on old / cheap hardware at home and accepting some downtime now and then should be a trade-of worth making for most. An interconnected web of documents served from personal computers residing under a desk or in a basement – it is a beautiful thing.

We nerds often seem to fall into the trap of over-engineering things, like, spending a lot of time building personal stuff that can scale into the infinity – only to end up never having more than 10 concurrent visitors at any given time.
By accepting and embracing the intermittent and slightly unstable nature of serving websites from our homes, we can take back much of the in(ter)dependence and hacky, quirky fun that many of us fondly remember from the 90's and 2000's.
Setting up a webserver on a Pi and serving it from home can be a fun project, not necessarily trivial for everyone, but definitely within reach for most technically inclined people.
Might be among the cheapest, easiest AND fun ways to host a static site :)

tdhttt1 reply#
I am doing this and it's fun! The only hassles I had are a. setting up DDNS (since I don't have a static IP) and b. getting a certificate from Let's encrypt with only port 443 open (80 is blocked by my ISP). But other than that, it has been great! Hopefully my ISP won't have a problem with that ;)
jjacobson931 reply#
I just use a script on a cron that runs every 15 minutes and updates my DNS provider. And for let’s encrypt, I use the DNS verification method so you don’t have to even expose HTTP(S) ports if you don’t need to
dominikstr1 reply#
I wrote a small go app[0] which is invoked every 15 minutes and updates the DNS through the cloudflare API. Its very specific for my use case and ISP but works well.

[0] https://gitlab.com/dominikstraessle/homelab-dns

Continue this thread — 1 reply

don-code1 reply#
I'll go one step further: were it not for self-hosting since the early 2000s, I probably wouldn't have a career. My first "server" was a Pentium laptop with no screen. Now I run thousands of servers for a company you've probably heard of.
bombcar#
I’m going to believe those thousands of sites are still on the Pentium laptop.

https://xkcd.com/908/

bostonvaulter21 reply#
Don't a bunch of residential ISP's not allow HTTP?
orthecreedence2 replies#
Yes but just in the land of the Free.
vinay4271 reply#
Source? I've never heard of this in the US or in other countries I've been in, although I wouldn't doubt it's the case somewhere.

Continue this thread — 1 reply

dn35002 replies#
It's been getting more difficult to host any kind of services at home. My current home internet service is behind triple NAT.
NickNameNick#
I can 'upgrade' to a fixed, routable IP for ~$5/month.

If I switched to a different ISP, I used to be able to get a fixed IP for a one-time $40 fee. I think that offer is no longer available though.

0x426577617265#
I host at home but put a VPS in front of it. Then I use wireguard to route all the connections to my home server. Which goes right thru all that NAT.

Continue this thread — 8 more replies

ducharmdev17 replies#
GitHub Pages or Netlify for sure. With either of these options, your static site can be set up to deploy whenever there's new commits to the specified branch.

Me and a friend mentor for Code Louisville, and we're able to get the beginner frontend students up and running very quickly using these options - they're free and much easier to use.

Continue this thread — 17 replies

leerob12 replies#
Check out Vercel! [1] You can deploy for free, with a single command, in a few minutes.

Disclaimer: I work at Vercel, happy to answer any questions.
[1]: http://vercel.com/

Continue this thread — 12 replies

Load more comments