Live data from Hacker News

Ask HN: Cheapest/easiest way to host a static site?

news.ycombinator.com

131–140 of 507 posts

Re: Ask HN: Cheapest/easiest way to host a static site?

#131

Earlier quoted context omitted.

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.

I agree– AWS bandwidth out is literally 100 times more expensive than CDN and VPN bandwidth out.

indeed, not to mention generous bandwidth rates on vps providers too

Re: Ask HN: Cheapest/easiest way to host a static site?

#133

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.

while i agree, self hosting email is fraught with traps

Re: Ask HN: Cheapest/easiest way to host a static site?

#135

Earlier quoted context omitted.

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.

Pfffffft. It’s probably a personal site with 10 visitors a week. Let’s step back a little here.

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.

Re: Ask HN: Cheapest/easiest way to host a static site?

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

Re: Ask HN: Cheapest/easiest way to host a static site?

#138
post #117

Earlier quoted context omitted.

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

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.

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.)

Re: Ask HN: Cheapest/easiest way to host a static site?

#139
post #36

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/

I also use Vercel. It is a good product.

Disclaimer: I don't work at Vercel and I'm just a regular guy

Re: Ask HN: Cheapest/easiest way to host a static site?

#140
post #28

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 thin…

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.
Post reply on HN