Ask HN: Cheapest/easiest way to host a static site?
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.
506 comments
[ 2.9 ms ] story [ 382 ms ] thread[1] - https://neocities.org/
Use it to host my blog; free tier is good, but I really like them and have really phenomenal limits, etc, so just pay (even though my blog is not updated nearly as much as I'd like)
If AWS + CloudFront is too difficult and you don't mind spending a few bucks, it's pretty easy to get started with LightSail - about $3.50 a month.
You don't even need to create an account, just upload a zip of your files.
https://cloud.google.com/appengine
Are you referring to specifying the path to your static folder/directory in your app.yaml file? If so, that doesn't seem so difficult to me.
Yes, you're right - the deployment is a single command for something as simple as a static website until the next time you need to make changes (then you'll have to root around your terminal again) or you decide to upgrade from static to something a bit more complex. Shameless plug here - my site, https://nocommandline.com, allows you to just select and click deploy; no routing around in terminal/commandline.
[1] = https://surge.sh/
Though for production I'd probably use S3+Cloudfront.
Make a new blog on Blogger, switch to classic theme, edit the template, delete everything in that box and cut/paste your HTML. Images can be hosted by making a new blog entry, uploading images to it and saving it as a draft. Once you disable the Blogger top navbar, the theme as a single page website is pretty transparent and works well.
[0] https://pages.cloudflare.com/
How did it go?
I like Netlify for most stuff personally.
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.
Damn, I have never been so wrong:
And so much more.[1] - https://layerci.com/
Edit: they call it Review Apps (https://devcenter.heroku.com/articles/github-integration-rev...)
One of their neat features is the ability to spin up "pull request sites" automatically, so you can share versions of your site with stakeholders before it's made live.
"GitHub Pages is not intended for or allowed to be used as a free web hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS)."
So it's great if you want to host a personal site / blog or some other non-revenue-generating website, but for anything more than that you could run into issues.
[0] https://docs.github.com/en/github/working-with-github-pages/...
In my opinion, there are some cases where it is a gray area: professional portfolio, case studies website with an email collection form, blog posts where you mention that you are a freelancer, a site where you link to your YouTube videos, some simple JavaScript app that don't require a backend but might make some money with ads...
So I'm just wondering how often they strike down at people who operate in this gray area.
The SaaS part might have more teeth.
I'm not sure why they're doing it this way, it should be a nominal task to restrict viewers to those with read access to your repo, but I think it underscores the use cases they have in mind here. They want you to use it as a blog and not as a serious web hosting solution.
I don't think it would be quite that trivial. They would have to inject authentication into your HTML, which could cause lots of things to break.
The benefit is that it's just a linux distro of your choice, so you can use whatever you are familiar with, and there is scope to add non-static service if needs be.
You also get a few free static sites as well https://www.digitalocean.com/products/app-platform/
It isn't free -- it is pretty cheap -- but it has a lot going for it. It requires no custom tooling -- I upload via rsync. This makes it trivial to migrate to a new provider if necessary.
I develop my site locally, then rsync it up. I have a custom domain pointed at the site, and also a custom .htaccess, so I have a good amount of control over the site. I do things like serve html without the .html filetype in the url; e.g. https://zck.org/emacsconf2020 is stored on the server as emacsconf2020.html . (I do this so Emacs recognizes the files as html, but keeps the urls clean).
It's a nice tool if you want to get a little involved in your setup, without getting wrapped up in proprietary tooling. It does charge for what you use, so it's not a great site if you are going to host Blu-ray images that get downloaded from everyone on HN.
My site is entirely statically-served; I have one script for rebuilding my local copy and a second for rsyncing to my NFS host.
I add `--delete` to clean up any files I might've created on the box (e.g., to test .htaccess), and then `--filter="protect /.well-known" so that I keep any files related to serving as https.
If you’re actively updating (or just better organized), NFSN is a good choice
But if you’re sure you’ll never forget to top off your account balance, NFS is okay.
https://mashable.com/2007/01/25/myspace-godaddy/
They recently published this blog post: https://blog.nearlyfreespeech.net/2021/01/19/free-speech-in-...
After reading this, I made the decision to move my hosting elsewhere. I have never hosted content that is even remotely political, and have no intention to do so. I had chosen to patron nearlyfreespeech based upon the belief that their conception of 'freedom of speech' matched my own. I believe 'freedom of speech' is not just a convenient vehicle for expressing my own political ideas, it is an important political idea in and of itself. I believe that the freedom for individuals to express their ideas without censorship is integral to a free and intelligent society. This post of theirs demonstrates that I had clearly misunderstood their beliefs.
It's clear that 'freedom of speech' is a controversial notion in today's society. If they market their service based upon their respect for so-called freedom of speech (it's in their name), I don't know what kind of crowd they expect to come. I came not out of a need, but based upon my political views. I imagine I'm a minority. I'm not interested in a host that markets itself in such a way, and then demonstrates that what they _really_ meant was that they want an environment where you're free to agree with their views.
All freedoms have limits, agreed to by reasonable people living in a reasonable society. Freedom of speech,is only 'controversial' to people who think limits on racist speech and the like is unreasonable.
I, as a brown immigrant, get to criticize my home country all I want. I can call my home country corrupt, filthy, polluted, no regards for women rights, gay rights, caste system, rapes etc and be totally okay as long as the other person knows I am brown.
But suddenly if a white person or someone with the wrong "political affilitation" says the same things about my home country - they get labelled racist/xenophobic etc when they are speaking the truth.
If I made a website criticizing the corruption or filth or disregard for women or gay rights in my home country, NFS would take down my site - probably until I dox myself and show that it's a brown person running it - then it might become okay.
Political correctness such as this is exactly why the good people in my home country suffer the most. All so that someone in western world or the elite class in my home country can feel morally superior.
And I hate to bring my skin color in a debate but that's the only way to explain how political correctness is making things worse for good people back home.
I think it might be income inequality that makes the good people in your home country suffer the most - but I don't want to assert this because I'm (probably) not from your home country and don't know it quite like you do.
Countries are not people, so criticism of a country cannot be racist (it's a category error).
Criticism of people of a country could be racist, but that's a different thing.
Criticism of the government/establishment of a country could be racist, but again that's a different thing.
Unfortunately these three separate things often get conflated and mixed up.
Then how do you explain those reactions? [1] "I'm sorry, but there's no other word one can use but racist".
GP is totally right, nowadays any remote criticism -- and I'm speaking of the factual ones, not the injurious kind mentioned before -- of a foreign country (except China, Russia and NK for some reason) by white people is labeled racist. And of course, people of color are allowed to speak anything they want against European countries, and spread hate speech mostly without any issue (granted one rapper is condamned from time to time... for instance Nick Conrad after singing "hang the whites" [2]).
[1] https://edition.cnn.com/2018/01/12/politics/trump-shithole-c...
[2] https://www.leparisien.fr/faits-divers/ces-rappeurs-qui-defr...
> "I'm sorry, but there's no other word one can use but racist," Colville said, responding to reporters at a news conference in Geneva, Switzerland. "You cannot dismiss entire countries and continents as 'shitholes' whose entire populations, who are not white, are therefore not welcome."
You missed that second part.
Looks like they’re talking about dismissing the people of those countries just because they are from, what they consider, a ‘shithole’ country/continent.
Note that if a country itself were a 'shithole', say for example a war-torn region like Yemen or Syria, that would only help the case for immigrants from that country; since the place they're fleeing is so bad.
> GP is totally right, nowadays any remote criticism -- and I'm speaking of the factual ones, not the injurious kind mentioned before -- of a foreign country (except China, Russia and NK for some reason) by white people is labeled racist.
Citations and examples please (also for the China/Russia/NK criticism; I suspect you're also conflating criticism-of-government/people with criticism-of-country)
> And of course, people of color are allowed to speak anything they want against European countries
What complete and utter total bollocks. Have you never encountered the thought-terminating cliche of "if you don't like it then leave", or its more overtly-racist cousin https://en.wikipedia.org/wiki/Go_back_to_where_you_came_from ?
> and spread hate speech mostly without any issue
I find this use of the word "mostly" to be mostly questionable.
Technically true, but practically useless. What is a country other than a group of people? Almost all criticism of a country will inevitably be about people in it or their actions - with very few exceptions (ex. complaints about the geography, weather, etc).
For example, I grew up in California and heard a lot about Mexico’s problems — some people would repeat racist claims about Mexicans being lazy (despite them universally hiring undocumented workers for cheap labor) or dishonest, but others would correctly identify problems like corruption being due to things like the huge amounts of money from the U.S. drug trade ensuring that cartels regularly killed off non-corrupt officials, where the system didn’t work well for most people who didn’t have a choice and everyone involved having acting on the options available to them rather than some innate determinism or moral weakness.
Which group of people? The population? The government? These can be very different (just ask Myanmar)
I don't think you're entirely wrong, but I don't believe you're entirely "correct" either :)
Some brown people can be racist, including towards other brown people, and including those of the same heritage. (I'm not saying that you are.)
Some subset of comments by racists may be categorically true. For example, a racist might decry the appalling rapes and murders that have been reported from India, saying violence towards women in India is a serious and pressing issue.
Isolated statements don't necessarily reveal motivations or underpinning beliefs. A blog post might report "truth", but that might be selective, framed and phrased in certain ways, and so on. So a hosting service necessarily needs to make a judgement call regarding acceptable content, and sometimes this will require looking beyond the content itself to discern motivations.
The motivations of a writer or broadcaster are key. If someone is writing about corruption and endemic violence in a foreign land, why are they doing this? Is it to call attention to the issue so it might be addressed and fixed? Or is it to build a wall?
For what it's worth, I doubt NFS would ban you from writing about the issues you've raised, provided they were constructive. Yes, that's a judgement call, and I think that's inevitable.
The issue of white allies (or cis-gendered, or whatever other area is concerned) is tricky, and frankly I think society is going through adolescence with this. Lots of outrage, lots of polarisation, and this is a shame and unhelpful. I agree that rejection of your allies by authorities that haven't attempted to understand the details is actively undermining, even if it's done with apparently good intentions. Personally, I think this sort of thing happens through fear of attracting outrage, misunderstanding the problem, wanting a simple answer to complex problems, pressure to act quickly and show decisiveness, and so on. Unfortunately this stuff is complicated and complex, and requires care and attention.
Personally I feel that the underpinning issues here are driven by polarisation, and this is what needs to addressed. Anyone who's writing to encourage collaborative solutions to grievous problems is unlikely to be banned by any hosting provider worth its salt. The sort of provider banning such content isn't contributing to a happier world, so should be avoided.
If your idea of criticism is something like using a slur or stereotypes to make an argument then it is not politically correct.
What's the criticism you want to give but feel like you can't?
Free speech means freedom to express “illegitimate” views, “the fullest liberty of professing and discussing, as a matter of ethical conviction, any doctrine, however immoral it may be considered”. No one has reached a universal agreement on what “legitimate” criticism is. Of course there are often prevailing societal opinions, but those change with the society. Eg. the Federalist Papers were largely written by someone who was literally labeled “illegitimate” by society at his time (and were full of slurs, stereotypes, etc.¹). Someone who got killed in a duel — the meaning of civility changes with the civilization. IMO ours is at a fairly high point at the moment (in part because of the value placed on tolerance for differing values), but it’s only a matter of time before it inevitably collapses much like the Greek and Roman ones before it (likely in part because of intolerance for free expression).
¹Eg. stereotyping the Republics of Greece and Italy as “petty” and slurring opponents as “advocates of despotism”. https://en.wikisource.org/wiki/The_Federalist_(Dawson)/9
Freedom of speech includes all those things.
That's a deeply flawed stance. The meaning of "reasonable person" changes so often as to be able to mean anything.
The former should be protected, the latter should be reported to the police.
A lot of the people who say they want free speech actually have some kind of anarchist fantasy where they can do whatever they want without consequences.
It seems like you care about free speech, not anarchism, so I'm not sure why the blog post offends you so much?
As I understood it, the blog post just makes it clear that "free speech" to them does not mean "lawless place where you can hide from the police".
Nowhere in the blog post does it say that they will only allow content or opinions that they agree with.
Yes, it's muddy water, but so is everything. There's nuance in threatening to kill someone. However i think we're in a new age, and we need to analyze where free speech changes into coordinated/group-think hysteria.
Which isn't to say that we should tightly control coordinated communication. Rather it's just that i think the two are different, and i think the modern age requires us to recognize that and discuss it.
We're in the age of misinformation. And a nutter yelling on a street corner is one thing, but giving him a TV Show in Prime Time is another. The damage he can do on a street corner? Minimal. The damage when broadcast to the world? That is the concern to me.
> "and we have no interest in living in a sea of mayonnaise."
What is that even supposed to mean?? Who refers to people as "mayonnaise"?? While claiming to be against racism??
Racist people I'd guess
IMAX-level projection. All you can do is neurotically "think of the white people" all day.
Remember, soyboy self-loathing is a real, measurable phenomenon, and they're the only group who do it: https://www.tabletmag.com/jewish-news-and-politics/284875/am...
Not to be confused with the antiracist belief that people shouldn't date outside their race bacause... it's colonialism?
Self-hating white liberals.
As the saying goes there's a difference between hate speech and speech that you hate. It seems like the line between the two is getting murkier everyday with people labeling things that hurt their feelings as micro-aggressions which are a form of "violence" to some people.
I prefer not to support businesses that anoint themselves arbiters of morality.
Thanks.
I hope you can step back and evaluate the mistake in your perspective. Number one, you are demonstrating that you care more for politics than for free speech (let alone the fact that your viewpoint literally leads to people being harmed in preventable ways where the prevention methods don’t threaten free speech). Number two, you are trying to define the conversation in a way where you are neutral politically and merely hold up an ideal principle, but that’s very clearly false to huge degree and you’re not admitting the political bias and blinders you are yourself bringing into it.
Frei ... Free Meinung ... Opinion Äußerung ... Utterance
It's the freedom of voicing opinions, not any speech even if it incentivises hate crime.
Just thought I'd chime in to add my 2 cents, on the off chance that it helps someone here make an informed decision.
NFS is also great for small MySQL backed sites - for example your Wordpress blog or something similar.
Their pricing model is so transparent and predictable, and the support from Jeff and co is great (their documentation and FAQ is simply brilliant).
Also their domain registration and setup is a breeze - and they have great Whois privacy support.
These guys were doing pay-as-you-use pricing long before AWS came along. We still use (and love) AWS for our extensive production systems, but for simple hosting of smaller projects and / or personal websites, NFS is unbeatable.
Its combination of affordability and ease of use is simply the best.
https://blog.nearlyfreespeech.net/2021/01/19/free-speech-in-...
Imo, answer is no. Any site which uses terms like "sea of mayonnaise" to describe people while claiming to be against racism is giving lip service and lacks self awareness.
How do you handle it?
It does seem like it might be more magic than I prefer in programming, though.
> Currently we are not tracking (and hence not billing for) extra bandwidth usage. This is subject to change at any time.
What do you do if your small static site gets suddenly HN audience? Do you then pay thousands for the bandwidth?
For simple static sites, I always look at the egress rates and bandwidth caps. For example if you have Wasabi+Cloudflare, then you know the pricing before hand. Wasabi doesn't have egress fees even if Cloudflare were to redirect all traffic for a while to your files.
The pay as you go model they use can mislead you into assuming they cost pennies because you pay small amounts each time, but with a half a dozen sites hosted you can expect to get hit by top up warnings a few times a year.
I've just double checked my email receipts, and I had to top up $60 in 2020 just to keep those static zero-traffic sites up and running.
Standard, bare bones, shared Linux/MySQL hosting anywhere else will rarely set you back more than $40-$50 a year. There's really no commercial reason to choose NFSN.
Disclaimer: I'm a co-founder