[HN Gopher] Ask HN: Cheapest/easiest way to host a static site?
___________________________________________________________________
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.
Author : offtop5
Score : 126 points
Date : 2021-03-26 16:49 UTC (6 hours ago)
| namirez wrote:
| GitHub pages! It's free so I don't think it can get any cheaper.
| dave_sid wrote:
| Have you tried yahoo geocities?
| patwolf wrote:
| Firebase hosting work well.
| lucb1e wrote:
| Firebase as in Google's Firebase? I guess the SEO is already
| done for you, but I'm still not sure I'd make everyone talk to
| Google to visit my site, even if the hosting is free.
| alimoeeny wrote:
| Google Cloud run although not free is great for many situations,
| like if your website is not static and is low traffic.
| Strom wrote:
| Google App Engine has a very generous free quota. The setup isn't
| as easy as good old FTP, because you need to define your static
| files in a configuration file. Once the config is written the
| deployment is a single command though.
|
| https://cloud.google.com/appengine
| modeless wrote:
| The free bandwidth quota isn't enormous, but if you put
| Cloudflare in front then you're good for practically unlimited
| free traffic. App Engine is overkill for a completely static
| site but it's great for something that is mostly static with
| one or two things that change.
| ZephyrBlu wrote:
| I think you're better off using bucket storage rather than App
| Engine for a static site.
| nocommandline wrote:
| >>> The setup isn't as easy as good old FTP, because you need
| to define your static files in a configuration file.<<<
|
| 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.
| tomduncalf wrote:
| surge.sh is quite nice, mainly because you just run the command
| from your "dist" directory, press enter a couple of times, and
| it's uploaded.
|
| If you want a more CI type service (i.e. you push your code and
| it builds on the cloud, rather than you build it locally - or it
| requires no build), I've found Netlify pretty good.
|
| Was using Vercel for a Next.js project recently, quite nice
| experience but it randomly started timing out about 50% of builds
| and their support were unwilling to help without a minimal repro
| - fair enough, but I was on a deadline so switched to Netlify,
| which built the site with no issues.
|
| Will try out Cloudflare Pages next based on the positive comments
| in here!
| ptk921 wrote:
| I continue to be a big fan of surge [1]. A number of toy
| projects/demos of mine have been developed using create-react-
| app, rendered to static files, then deployed via surge.
|
| [1] = https://surge.sh/
| subpixel wrote:
| Git project? Netlify. Not a git project? Surge!
| cube2222 wrote:
| GitHub Pages are probably the easiest to work with, with node
| modules built for easy one-command publishing.
|
| Though for production I'd probably use S3+Cloudfront.
| TranquilMarmot wrote:
| Also auto-publishing on pushes to a specific branch with GitHub
| actions is really awesome.
| _wldu wrote:
| Hugo, nearly free speech and a Makefile.
| greg5green wrote:
| I'd say Digital Ocean's newish Apps platform. Static sites are
| free and they can run a build step for you (still free).
| mobilio wrote:
| I'm using an AwardSpace [0] because they offer free hosting with
| PHP/MySQL and other features for free. Best is that they are over
| 15 years on market. For alternatives there is Firebase Hosting
| [1] that is also great since it's running on Google
| infrastructure.
|
| [0] https://www.awardspace.com [1]
| https://firebase.google.com/docs/hosting
| [deleted]
| johnklos wrote:
| Just start bozohttpd.
| jboynyc wrote:
| Take a look at sourcehut pages (srht.site) too.
| PaywallBuster wrote:
| Cloudflare Pages
| taleodor wrote:
| Cheapest would be Google App Engine - see more detailed
| comparison here - https://worklifenotes.com/2020/05/24/google-
| app-engine-githu...
| lcfcjs wrote:
| Github pages is pretty straightforward and free.
| pgroves wrote:
| I have my site in an S3 bucket with the static-site flag
| activated. It would not win for 'easiest'. However, it's the only
| thing in my personal AWS account right now and my monthly bill is
| $0.83
| crazypython wrote:
| An S3 bucket is intended as storage, not retrieval. Downloading
| from S3 means grabbing shards. You should put a proper CDN,
| like CloudFront or Cloudflare, in front.
| blacha wrote:
| You can generally query any object off s3 in a few
| milliseconds..
|
| I have a system doing 10s-100's of millions of reads a day
| from s3 with very consistent and fast read times.
| Diederich wrote:
| > You should put a proper CDN, like CloudFront or Cloudflare,
| in front.
|
| I understand what you're saying, but why? I assume the site
| in question is pretty low volume. What's wrong with serving
| directly from S3?
| viraptor wrote:
| You can't get https on S3. Also many interesting headers
| are only available via cloudfront.
|
| Also you get a little bit of protection from someone
| sending lots of traffic to make you spend $$$
| erikmolin wrote:
| Why, if his monthly bill is 83 cents, and he values his time?
| Does not using a CDN impact performance in a crippling way
| that neither me nor the poster you're replying to
| understands?
| crazypython wrote:
| > Does not using a CDN impact performance in a crippling
| way that neither me nor the poster you're replying to
| understands?
|
| It adds up to 600ms of latency for each roundtrip. A modern
| website without link rel=preload is several roundtrips-
| download HTML page, then do JS requests and CSS, so that's
| ~1.2s of additional latency.
|
| Because he succumbed to AWS' marketing. Surge, mentioned
| downthread, lets you deploy a folder for free on a
| worldwide CDN with virtually no setup.
| pgroves wrote:
| I don't think it matters much b/c of the super low volume
| but I do have it behind Cloudflare free-tier.
| philistine wrote:
| The big gain with putting Cloudfront in front of it is you
| can have HTTPS.
| crazypython wrote:
| HTTPS gets you better SEO and the ability to be iframe'd
| from HTTPS sites.
| speedgoose wrote:
| And some security.
| dave_sid wrote:
| And loose 30 mins of your life you'll never get back.
| It's just a person site.
| foobar33333 wrote:
| Browsers will light up like a christmas tree if your site
| doesn't have https.
| nrmitchi wrote:
| Performance maybe a little bit, but IIRC you, as the owner
| of the bucket, pay for bandwidth out.
|
| Putting it being a CDN protects you (at least a little bit)
| from the possibility of a huge bandwidth bill at the end of
| the month if someone realizes they can attack your wallet
| directly by trying to ddos your site.
| crazypython wrote:
| I agree- AWS bandwidth out is literally 100 times more
| expensive than CDN and VPN bandwidth out.
| sitzkrieg wrote:
| indeed, not to mention generous bandwidth rates on vps
| providers too
| dave_sid wrote:
| Pfffffft. It's probably a personal site with 10 visitors a
| week. Let's step back a little here.
| pgroves wrote:
| This is correct. Why would I put any more effort into it?
| cphajduk wrote:
| And 9 of them are just bots.
| gabeio wrote:
| Cloudflare at minimum it's free as well and will protect
| you from bad actors which will save you $ if someone starts
| an infinite loop requesting your site.
| erichurkman wrote:
| Let's be real here.
|
| He clearly needs kubernetes.
| dave_sid wrote:
| Hahahaha
| banana_giraffe wrote:
| Cheapest however, is out the window.
|
| I mean, if there's a chance, however remote, that you might end
| up as the #1 of reddit or whatever, stay away from S3. Your
| site won't go down, but oh god, you pay for that.
| crazypython wrote:
| https://surge.sh
|
| Free. npx surge folder
| calderarrow wrote:
| Vercel. Sign in with Github, push and it's deployed. Probably the
| best Developer Experience I've ever had.
| high_byte wrote:
| glitch.com
| quickthrower2 wrote:
| When I did this I used netlify.
|
| However for my use case I now use cheap shared hosting and
| Wordpress, because the sheer amount of plugins to solve all kinds
| of problems is amazing.
|
| One of the built in themes I think 2019 is a nice starter for a
| modern site and with Gutenberg you can create a fairly modern
| responsive site out of the box.
|
| There is a plug-in for free that'll backup the entire
| installation to your Google cloud and other clouds.
|
| There are cache and SEO plugins for free to sort that side of
| things out.
|
| Ive not used it but there is woo commerce for shopping although I
| wouldn't blame someone for skipping it and using shopify for ease
| of use.
|
| I also love not battling with Hugo etc. at the technical level. I
| do not miss reading Hugo docs thinking wtf!
|
| Hosting for unlimited sites is costing me about $50 a year so
| pretty much zero.
| F117-DK wrote:
| Cloudflare Pages, or Firebase Hosting. Both can be spiced up with
| cloud functions.
| kissgyorgy wrote:
| For free, anywhere? GitHub, GitLab, Vercel, AWS S3... Even you
| watch can serve a decent amount of static pages/sec nowadays.
| trcarney wrote:
| Speaking of AWS, I recently deployed a gatsby web site with AWS
| Amplify. It links to your git repo and will automatically deploy
| when you merge to master/main. You can also deploy branches you
| want to test out. As this was my second website I have ever
| deployed, I was amazed at how easy it was to setup.
| cpach wrote:
| This. I can warmly recommend AWS Amplify for hosting static
| sites. Very convenient and easy to set up.
| asdev wrote:
| Firebase hosting + Gatsby has been real easy for me
| jppope wrote:
| My Favs: - Cloudflare - AWS s3 - Github pages - Google
| techrat wrote:
| For the occasional single static page website I sometimes need
| to have hosted for a domain, even Blogger does a pretty good
| job.
|
| 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.
| stanislavb wrote:
| There's a list on SaaSHub tracking all the recommended/mentioned
| products here https://www.saashub.com/alternatives/post-news-
| ycombinator-2... however, I'm wondering why
| https://www.netlify.com/ isn't listed...
|
| Please don't upvote or downvote this one. It's more like a
| "debugging" comment.
| totaldude87 wrote:
| I host a Wordpress site on hostinger, shared hosting costs under
| a buck per month for long term commitment .
|
| No free or cheap , doesn't have much controls but can't complain
| a lot either
| mgarfias wrote:
| I use S3's static site hosting. works great.
| singhrac wrote:
| 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.
| ignoramous wrote:
| 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
| singhrac wrote:
| I should warn that bike shedding about this distinction is
| absolutely not worth your time if you're reading this and have
| less than like 100 blog posts written or are running a business
| on these sites (in which case I think you should pick Netlify).
| Go write something.
| ipaddr wrote:
| Now you have something to write about.
| florigator123 wrote:
| 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.
| pydry wrote:
| The feature that made me change from github pages to netlify
| was 302s. Cloudflare pages doesn't seem to have that.
| jacobp100 wrote:
| 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.
| foobar33333 wrote:
| gitlab pages is better imo. You can use the CI to run any code
| you want to build the static files.
| gala8y wrote:
| 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."
| lostmsu wrote:
| GitHub allows business websites, AFAIK. Where did you get
| the notion, that it does not?
| bombcar wrote:
| https://docs.github.com/en/github/working-with-github-
| pages/...
|
| "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)."
|
| Now one could read that as "don't build a SaaS on top of
| GitHub Pages", but you could also read that as "don't
| have business websites on GitHub Pages".
| iosjunkie wrote:
| My weekend project is to move a small personal site to Cloudflare
| Pages[0]. Can't vouch for it yet, but it might be worth a look.
|
| [0] https://pages.cloudflare.com/
| gkbrk wrote:
| Seconding the https://nearlyfreespeech.net suggestion. I used to
| be their customer and had absolutely no complaints.
|
| I have switched to BunnyCDN [1] a while back, also very happy
| with it. Pricing is extremely cheap, and has the added benefit of
| being able to cache anything dynamic you might add in the future.
|
| [1]: https://bunny.net/
| pov wrote:
| Seconding BunnyCDN. I use it with https://lftp.yar.ru/ in
| reverse mirror mode to upload/update my generated public/
| folder. Easy and cheap!
| peanut_worm wrote:
| Surge.sh is probably the easiest and fastest. Host a static site
| in one command.
|
| I like Netlify for most stuff personally.
| every wrote:
| I use https://sdf.org, but then my needs are very modest...
| ilaksh wrote:
| Check out https://gemlog.blue/
| tyingq wrote:
| Cloudflare pages. The only real limit on the free plan is "500
| builds / month". Simple is relative, of course, but if you're a
| developer, you'll likely find it simple, and it does fit your
| "deploy with a single command" requirement.
| https://pages.cloudflare.com/
|
| You can also tie it with the free plan for Cloudflare Workers if
| you have some need beyond static pages.
| indigodaddy wrote:
| Cloudflare Pages will reload/redeploy on any git push right
| (just like Netlify?) ? Just want to be sure before I try it
| out..
| leerob wrote:
| 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/
| davidwparker wrote:
| I've been a happy user of Netlify, Github Pages and now Vercel.
| I'm really enjoying Vercel lately! It's been really great.
| Recently also tested out Cloudflare Pages, but I think they
| have a bit of work to do before they can match Vercel.
| wishinghand wrote:
| Not to bring down the mood on how easy it is for static sites
| on Vercel, but I still get sad about it moving away from server
| side or Docker based deploys. I really miss that workflow.
| mkl wrote:
| Your pricing page is confusing to me. There is a free tier, and
| it says "Pay as you grow", but I can't see what the limits on
| the free tier are or how growth is measured. How does it work?
| adamhearn wrote:
| Vercel free tier is awesome!!
| adriancooney wrote:
| Very happy Vercel user here. My default choice now -- supremely
| simple and fast deployments with great UX.
| m00dy wrote:
| I also use Vercel. It is a good product.
|
| Disclaimer: I don't work at Vercel and I'm just a regular guy
| romellem wrote:
| I will second this recommendation. I use Vercel for all my
| static sites and have found it wonderful to work with and well
| documented.
| jokethrowaway wrote:
| For free non commercial projects, definitely netlify (they seem
| to imply the will remove commercial projects if they so like).
|
| If it's a commercial project I don't see the point of paying a
| premium for the nice UX, hosting static files is easy enough and
| I don't have investors' money to waste. I would spend my money on
| a CDN like BunnyCDN and throw a file server behind it.
| trey-jones wrote:
| If you're looking for ease of deployment I think something like
| org-publish. But that would require some setup - anything would
| really.
| tomcam wrote:
| How is org-publish a hosting solution? AFAIK it's a deployment
| command
| benbristow wrote:
| Azure Static Web Apps is free at the minute, and I've heard the
| pricing will be very reasonable once it comes out of preview (in
| the cents/pennies probably unless you're really popular!)
|
| https://azure.microsoft.com/en-gb/services/app-service/stati...
|
| Would recommend giving it a bash, or you could deploy it manually
| with Azure Blob Storage Websites and a simple deployment CI
| pipeline.
| ducharmdev wrote:
| 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.
| anm89 wrote:
| I've been very happy with this setup for my simple personal
| marketing site.
| linkdd wrote:
| I discovered Netlify through Netlify CMS. I had a pretty bad
| opinion about Netlify CMS, so I was pretty sure Netlify was
| going to be at least as bad.
|
| Damn, I have never been so wrong: - the
| interface is so intuitive I never opened the documentation
| - this is FAST (the bottleneck to see my website live is now my
| browser cache) - no need to create a Github Actions
| pipeline to deploy, just say "hey, my repo is here" -
| automatically integrated with Let's Encrypt for custom domains
| - deploy previews!!!
|
| And so much more.
| Kaze404 wrote:
| My favorite feature is automatic deployment of pull requests.
| I love it, and I wish there was something as cheap and easy
| for backend services as well. Though I guess it's not too
| necessary if you implement testing properly :p
| villasv wrote:
| Heroku has offered branch previews for a while now
|
| Edit: they call it Review Apps
| (https://devcenter.heroku.com/articles/github-integration-
| rev...)
| linkdd wrote:
| LayerCI[1] maybe?
|
| [1] - https://layerci.com/
| Kaze404 wrote:
| This looks almost too good to be true from the docs.
| Thank you, I'll check it out.
| bovermyer wrote:
| I swear by Netlify. It's fantastic, and I use it for several
| sites, not least of which is my own personal site.
|
| 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.
| gabriel897 wrote:
| +1 I have been using Netlify to host 3 static sites for many
| months now. Have had 0 issues. Set up took <15 minutes. Making
| changes is a breeze.
| Sodman wrote:
| I see the "GitHub Pages" suggested a lot whenever this question
| comes up, but it's worth noting that it's against their ToS[0]
| to use it for commercial purposes:
|
| "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/...
| serial_dev wrote:
| Anyone got issues with this?
|
| 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.
| SwiftyBug wrote:
| Also you can deploy your `public` folder to Netlify simply by
| drag-and-drop. I love this.
| nonamenoslogan wrote:
| I host my .org on Github Pages.
| pmlnr wrote:
| FTP-it to a friends' server.
| lucb1e wrote:
| Seconded. I offered a container to many friends but very few
| actually take me up on the offer. Server communities are fun,
| why pay a stranger when you can build something with a friend?
| maxk42 wrote:
| The most popular currently is probably https://www.netlify.com/ -
| 100% free.
|
| 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.
| enhdless wrote:
| Specifically Netlify Drop: https://app.netlify.com/drop
|
| You don't even need to create an account, just upload a zip of
| your files.
| mcintyre1994 wrote:
| You don't even have to zip it!
| BenoitP wrote:
| > jumping through AWS hoops
|
| I found S3 static hosting to be fairly straightforward. Once set
| up, a single `aws s3 sync . s3://my-bucket/path` updates the
| content.
| tobilg wrote:
| You might have a look at https://github.com/tobilg/serverless-
| aws-static-websites to get a single command deploy including
| CDN and a domain
| framecowbird wrote:
| Agreed! It's super easy
| PradeetPatel wrote:
| It was observed that setting up let's encrypt certs on s3
| static sites can be a unique challenge
| starbugs wrote:
| I suggest putting Cloudflare in front of it. I have virtually
| no AWS costs with S3 that way. If you don't mind that
| Cloudflare + S3 means it's not fully end to end encrypted.
| second--shift wrote:
| For the extra $1-2/mo, I think a $5 DigitalOcean ubuntu/similar
| droplet provides a ton of value, above and beyond just hosting a
| "static" site at the cheapest place for less. Want email too? ez.
| Virtual Hosts? ez. SOCKs proxy in the cloud? literally built in.
| alexjplant wrote:
| I got away from self-hosted mail a few years ago and haven't
| looked back. There are a few flexible privacy-forward options
| on the market now (FastMail, Proton) and I don't have to worry
| about configuring DMARC/DKIM/SPF, Postfix milters,
| Horde/Roundcube, Courier, secure connection negotiation, X.509
| certificates, or any of the other headaches associated with a
| quasi-legacy technology like e-mail.
| sitzkrieg wrote:
| while i agree, self hosting email is fraught with traps
| aequitas wrote:
| Check with your ISP, they often offer some 10 or sometimes 50! MB
| of free space to host your homepage and images under an account
| url, eg: http://example.com/~you. Uploading is easy, just FTP
| your files to their server and your done!
|
| I miss the old days :(
| Symbiote wrote:
| The in-between days (after dial-up ISPs, but before "cloud"
| meant people forgot they could do things themselves) was to
| host the website on your own computer. For example, an old
| laptop, a Raspberry Pi, or an always-on-anyway desktop.
|
| I host my personal site this way.
|
| I also host about 100 mostly-static mostly-low-use websites at
| work similarly: with Apache on a couple of VMs. They are more
| reliable than the free versions of Netlify etc, and the systems
| work to maintain 100 static websites is little different to
| maintaining 5 static websites.
| warent wrote:
| I'm not sure how you do this unless you have a static IP
| somehow? In my experience ISPs don't offer that to
| residential clients
| tenebrisalietum wrote:
| There are "Dynamic DNS" services (a good free one used to
| be DynDNS in the 00's) that will take an API call from your
| home system and update a DNS with it.
|
| Many routers have support for this and if your router runs
| dhcpcd you can tell it to issue the call when it renews the
| DHCP lease from your ISP, or simply cron job it.
| derefr wrote:
| Note that you don't need a marketed-as-"dynamic DNS"
| provider to have dynamic DNS. You just need a DNS
| provider with an API.
|
| Cloudflare has a DNS API. So if you search "Cloudflare
| DDNS" you'll find five or six different Github projects
| (some binaries, some scripts) you can run on any box in
| your house (maybe a Pi?) that'll do your DDNS through
| them.
|
| (You don't need your router to run a DDNS client, even
| though routers make it seem like a router-exclusive
| feature. The only thing your router knows that your LAN
| doesn't is your network's external IP address. But a DDNS
| client can just hit an external reflector endpoint for
| that.)
| garaetjjte wrote:
| From my experience most ISPs don't give publicly routable
| addresses anymore, just throwing everybody behind CGNAT
| (currently I pay extra 3$ monthly fee for static routable
| IP, but not all providers offer it). And IPv6 is usually
| _still_ not deployed.
| greg5green wrote:
| In the US, it's pretty rare to be behind CGNAT or not
| have IPv6. We're lucky in that regard.
| ForHackernews wrote:
| Some ISPs do offer static IPs to residentials users (many
| of the top 10 here
| https://www.ispreview.co.uk/review/top10.php)
|
| As IPv6 becomes more widely adopted, there will be no need
| to conserve IP addresses and everyone can be allocated a
| block of them.
| 29083011397778 wrote:
| They don't, but my ISP-provided modem/router combo has
| built-in integration with a dynamcic DNS service. If your
| domain name follows whatever your IP is, it's close enough
| to static (at least for my uses)
| foobar33333 wrote:
| Alternatively, you can use cron/systemd timers to update
| the domain minutely.
| tgiba wrote:
| OVH offers 10MB hosting when you get a domain with them. With
| FTP access.
| [deleted]
| AlchemistCamp wrote:
| https://render.com (lead by early Stripe infra employee!)
| nknealk wrote:
| Seconding render. I host a Hugo site with them. Their free tier
| is pretty feature-rich and I love the automated builds. My site
| is set up so that any push to the main branch on a private
| github repo gets automatically checked out, compiled to HTML,
| and updated on their CDN.
| gibbonsd1 wrote:
| https://twitter.com/daringdanz/status/1214618864643764224
| NicoJuicy wrote:
| Has anyone tested out netlify vs cloudflare pages?
| m-app wrote:
| Depends on what you may already have! I was looking for something
| similar the other day, and remembered that I already had some
| redirects setup under my custom Fastmail domain; turns out they
| also allow you to host static HTML. You can even generate a
| dedicated FTP login to automate uploading. This specific case
| might not apply to you, but perhaps you're already paying for
| another service that also offers something like this?
| ForHackernews wrote:
| My ISP gives me 10MB of free hosting with FTP access.
|
| Doesn't get much simpler than:
|
| ftp-upload -h myisp.net index.html
| _nhh wrote:
| Simple Webhosting. Cheap, reliable and unbreakable.
|
| Single command deployment with rsync.
|
| Plus you get serverless functionality for free with php scripts.
| Just place it in a folder and access it via browser.
|
| Magic.
| jdmg94 wrote:
| Vercel is the way to go
| jpxw wrote:
| S3 bucket with cloudfront in front. Route 53 for DNS.
|
| Not sure if it's the cheapest way to do it, but it seems
| extremely cheap. Likewise not sure if it's the easiest way to do
| it, but it seems easy now it's set up - everything is in one
| place.
|
| IIRC Cloudfront <-> S3 data transfer has quite a generous free
| tier.
|
| The only thing I worry about is whether uploading objects is
| expensive, and invalidation. But it's not been (noticeably) an
| issue so far.
| [deleted]
| jetpackjoe wrote:
| I user https://render.com for my dynamic ($7/month) and static
| (free) sites.
|
| You specify a build command (ex. `npm run build`), and a
| directory (ex. `_site/`) and it will build and host it for you.
| It can automatically deploy on git events, or via web hook, or
| manually (button push). SSL/custom domains are also free and very
| easy to setup.
|
| I stan render.
| zokier wrote:
| Is render like heroku for the dynamic stuff? Seems very similar
| offering
| zck wrote:
| I use https://nearlyfreespeech.net for my static site.
|
| 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.
| zaphod4prez wrote:
| I'm a huge fan of NearlyFreeSpeech as well! Its super cheap,
| has a great user-forum, and just... feels like something I can
| wrap my head around easily. Love it
| RodgerTheGreat wrote:
| I have also used nearlyfreespeech for years, and I'm very
| satisfied with the price model and clear, easy-to-use account
| management pages.
|
| My site is entirely statically-served; I have one script for
| rebuilding my local copy and a second for rsyncing to my NFS
| host.
| yojo wrote:
| I also used/loved NFSN, but I have a habit of neglecting pages
| for years. I have had more than one site go dark for months
| before I realized they'd run out of budget. Now I use GH pages
| so I don't have to think about it.
|
| If you're actively updating (or just better organized), NFSN is
| a good choice
| RodgerTheGreat wrote:
| For the record, they do have support for email warnings when
| your balance drops below various thresholds- it's right on
| the account dashboard.
| dwohnitmok wrote:
| Yep NFSN is great. If you have a bunch of static files it's
| really just `rsync myfiles
| mywebsite@ssh.phx.nearlyfreespeech.net:` and you're done. No
| set up, no nothing.
| zck wrote:
| Yeah! The command I use is: `rsync --recursive -vv --delete
| --filter="protect /.well-known" /path/to/site/on/local/box
| user_site@ssh.phx.nearlyfreespeech.net:/home/public/`
|
| 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.
| tebbers wrote:
| Netlify! I use it for holding pages for client websites. Quick
| upload of a folder containing an index.html and a stylesheet and
| off you go.
| kevincox wrote:
| Netlify also provides an endpoint to deploy a new version with
| a single HTTP POST of a zip file if you ever want to start
| scripting deploys.
| Chris2048 wrote:
| I guess cheap and easy are opposite directions in a way, but if
| you are totally static, I guess a Digital-Ocean instance isn't
| too difficult, with some leeway to improve the response-time over
| time; Just slap a Nginx or something on it, serve up the statics,
| and maybe establish a way to upload stuff (scp?), Just keep hold
| of backups (docker images, configs/dotfiles, and actual content),
| put good protection on the droplets (they are targets for
| hacking).
|
| 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.
| armonraphiel wrote:
| They have a managed service for folks with docker instances.
|
| You also get a few free static sites as well
| https://www.digitalocean.com/products/app-platform/
| hparadise wrote:
| I really like Render
| yannikyeo wrote:
| Digital Ocean App Platform gives 3 free static sites.
| j-rom wrote:
| I used to use Heroku for side projects and I recently discovered
| Netlify and it is definitely super easy to get set up and deploy.
| openfuture wrote:
| I use pinata to pin an ipfs hash and then a public gateway
| (currently using cloudflare). It's free and a fun programming
| assignment to script the pinata and DNS APIs so that I can update
| my site.
| talawahtech wrote:
| Check out Cloudflare Pages: https://pages.cloudflare.com/
| hokumguru wrote:
| Vercel is so great
| felipemesquita wrote:
| Cloudflare pages offers unlimited sites, requests and bandwidth
| for free (limited to 500 bilds per month)
| https://pages.cloudflare.com/
| Aperocky wrote:
| I wouldn't say jumping through AWS hoop is loads of setup.. but I
| have 2 static sites with domain setup on AWS with S3 buckets and
| route53 and they cost about $3 per month in total.
|
| Domain costs are separate but I don't think that belong here.
| johnmurch wrote:
| https://workers.cloudflare.com/
| stephenmcirl77 wrote:
| Plus Cloudflare Pages is in beta too, CloudFlares JAMStack
| offering to compete with the Netlify and Vercels of the world.
| https://pages.cloudflare.com/
| bluishgreen wrote:
| Gatsby with Netlify
| lawwantsin17 wrote:
| Just a reminder you can host a static site or any other kind of
| site on your home computer. That's the internet folks.
| ijustwanttovote wrote:
| I'm trying out Cloudflare Pages, it's pretty good so far.
| kpats wrote:
| If you want a pre-configured way to publish your notes or digital
| garden, Dendron's got an easy to use 1-click publish:
| https://wiki.dendron.so/notes/53de5c1e-b20c-4adc-ae48-e1659e...
| polyterative wrote:
| firebase hosting
| treeface9000 wrote:
| Netlify is really easy. Just drag and drop your static site's
| folder.
| rabbitsfoot8 wrote:
| I created https://tiiny.host - might be exactly what you're
| looking for. Command line tool coming soon!
| jsilence wrote:
| Regarding some cost free solutions mentioned here: how does the
| saying 'if it is free, then you are the product' hold up?
| snicker7 wrote:
| Likely a loss leader, since "free static site hosting" is
| usually not the main product.
| dalmo3 wrote:
| I suppose Netlify free users pay it back in free advertisement.
| crazypython wrote:
| surge.sh was born out of a Mozilla-sponsored project to make
| web hosting cheaper. They are doing it for charity.
| LinuxBender wrote:
| If you mean pure html/css, then the least friction would be
| NeoCities [1] It is free and not owned by Microsoft or Google.
|
| [1] - https://neocities.org/
| pwdisswordfish6 wrote:
| You are limited to one *.neocities.org site, otherwise it's $60
| per year.
| john-doe wrote:
| Seconded. Their CLI has all you need, even git hooks.
| Personally I just use `neocities push .`
| LolWolf wrote:
| Thirded.
|
| 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)
| amasad wrote:
| Replit (free):
|
| - Go to repl.new/html
|
| - Write code
|
| - Hit run, deployed!
|
| - (optional) link domain
|
| Docs: https://docs.replit.com/repls/web-hosting
| ianopolous wrote:
| You could host it P2P in Peergos -
| https://peergos.org/posts/p2p-web-hosting
|
| Disclaimer: I'm a co-founder
| emptysongglass wrote:
| I tried but you have a waiting list.
| ianopolous wrote:
| If you added yourself we'll onboard you soon.
| purec wrote:
| I personally use Firebase for all my static sites. Completely
| free and fast. If you need to run some backend function they have
| Firebase functions which is free to a certain degree too.
|
| Example site: https://jeremyshaw.co.nz
|
| Other than that I'm sure Github Pages and Netlify are fine, both
| very popular options.
|
| Worst case you put it on Amazon S3 and get charged a fraction of
| a dollar every month .
| BrandoElFollito wrote:
| Except if you get hit by a DDoS.
|
| The fact that you cannot put a cap on your spending is
| infuriating (the official AWS answer is "we do not want to
| break your business" (even if I want to)).
|
| To be fair, some complaining or crying in such cases usually
| gets your bill reversed.
| villasv wrote:
| You can, it's just very convoluted.
|
| You can set up billing alarms and use alarms as triggers for
| actions.
| codebolt wrote:
| If you have an MSDN subscription (e.g. through work), using your
| free Azure credits to host a site is a pretty good option.
| jMyles wrote:
| NearlyFreeSpeech is an incredible service. It has honed its focus
| on simplicity even as virtually every one of its competitors have
| attempted to commodity complexity.
|
| Don't get me wrong: I enjoy complex services as well. But for
| simple web hosting, NearlyFreeSpeech is the best I've found, and
| whatever is second isn't close.
| fishtoaster wrote:
| A while back I wrote a tool* to make this as easy as possible for
| my use case: a single command to register the domain, jump
| through all the AWS hoops, and have a live static site with ssl
| at the end. I was pretty happy with it.
|
| These days, though, I just use netlify. It's not quite one
| command, but it's about heroku-level easy, and it gives you a lot
| of little niceties (autodeploy whenever you push a specific git
| branch to github, ssl, etc).
|
| * https://github.com/kkuchta/scarr
| datacruncher01 wrote:
| I've played with a free .tk domain and use their framed redirect
| (http only) to point to a itty.bitty.site page. Works
| transparently as far as a user goes.
| kioleanu wrote:
| If you use Fastmail, it comes with static website hosting
| included
| [deleted]
| skrtskrt wrote:
| Digital Ocean Apps, you get free hosting for a couple static
| site, you just push to the selected branch.
|
| I use Hugo but they support a bunch of different types.
|
| Digital Ocean is also just super easy to use in general.
| bronlund wrote:
| Check out https://render.com/
___________________________________________________________________
(page generated 2021-03-26 23:00 UTC)