Live data from Hacker News

Self-hosting a blog for cheap and lazy devs

sphuff.com

51–60 of 74 posts

Re: Self-hosting a blog for cheap and lazy devs

#51
I use Hugo (https://gohugo.io/) to generate static pages and host them on Amazon S3, with CloudFront on top of it for fast delivery. AWS also provides a free SSL certificate, and DNS with Route53.

I couldn't be happier with the setup: it's cheap, fast, requires zero maintenance and pretty much never goes down. Cost is close to nil: the most expensive part is for Route53 at $0.50 per Hosted Zone, and then S3+CloudFront add a few cents more.

If folks want to see how fast static pages can be on a CDN, the site is at https://re.kv.io

P.S. I didn't have to install Docker or MySQL.

Re: Self-hosting a blog for cheap and lazy devs

#52
post #51

I use Hugo ( https://gohugo.io/ ) to generate static pages and host them on Amazon S3, with CloudFront on top of it for fast delivery. AWS also provides a free SSL certificate, and DNS with Route53. I couldn't be happier with the setup: it's cheap, fast, requires zero maintenance and pretty much never goes down. Cost is close to nil: the most expensive part is for Route53 at $0.50 per Hosted Zone, and then S3+CloudFr…

The only problem with that setup is if a post goes viral CloudFront will cost you a pretty penny. I had one post with ~1MB of assets that was read (IIRC) 70k times in a month and got an ~$80 bill. I’ve since switched to Cloudflare.

Re: Self-hosting a blog for cheap and lazy devs

#53

Earlier quoted context omitted.

All sounds good apart from GoDaddy. Why not use a more reputable registrar? https://news.ycombinator.com/item?id=4362478

Just because it's what we already used. It's the most dispensable part of the stack (and arguably shouldn't even be considered part of our stack at all).

> arguably shouldn't even be considered part of our stack at all

Why not? If your registrar screws you over, it's game over. It's a critical dependency.

Re: Self-hosting a blog for cheap and lazy devs

#54
I coded[0] a very simple CMS for my blog around 8 years ago. I wanted something fast and I wanted to use python instead of PHP. so I went with nginx + uwsgi. The website[1] runs on an old laptop. 8 years later I've edited maybe a handful of lines of code.

Perhaps I'm missing something, but I don't get why these articles pop up so frequently as if making a blog was some super complicated thing that required the latest CMS, etc. Most people here (including me) would suffice with a nginx and plain html/css, no CMS required, based on articles like these, at least.

[0] https://github.com/sfttw/avanti [1] https://blog.sailingfasterthanthewind.com/

Re: Self-hosting a blog for cheap and lazy devs

#55
post #51

I use Hugo ( https://gohugo.io/ ) to generate static pages and host them on Amazon S3, with CloudFront on top of it for fast delivery. AWS also provides a free SSL certificate, and DNS with Route53. I couldn't be happier with the setup: it's cheap, fast, requires zero maintenance and pretty much never goes down. Cost is close to nil: the most expensive part is for Route53 at $0.50 per Hosted Zone, and then S3+CloudFr…

If you're just hosting purely static assets why not use a free hosting with GitHub pages and a custom domain? It comes with free SSL (now) and I assume it could handle all sorts of traffic spikes. I might not be aware of any major downsides so I'm curious why people decide to use a paid (even if it's super cheap) option. I believe also Gitlab offers similar options.

Re: Self-hosting a blog for cheap and lazy devs

#56

Earlier quoted context omitted.

This is exactly how far I got in before my "No fucking way" alarm went off. If you want to be truly cheap and lazy use github pages (free), static html (maybe with a markdown converter), and Disqus iframes for comments.

Ding ding ding, we have a winner! This is exactly the process I landed on this week when I decided to start a blog. There's literally nothing cheaper or more convenient (or resume-appropriate, since I already share my github) than github pages. Generating a static site is almost trivial (I landed on using Hugo, but a bunch of solutions are just as easy). To take the laziness a step further I use emacs and org-mode an…

Fair warning: keep up to date with your Hugo version locally, or use a set version in GitHub Pages.

I'm using Gitlab Pages with latest version of Hugo pulled by default. I don't post as much as I did, and have twice had to spend over an hour getting a theme updated for the latest version of Hugo since I didn't update my version and there's been breaking changes.

Outside of that, Hugo is fantastic. Good luck with your blog!

Re: Self-hosting a blog for cheap and lazy devs

#57
post #39

The guide exposes the back-end webserver to the public, by accident. Instead of: ports: - "2368:2368" expose: - "2368" The author probably just needs: ports: - 127.0.0.1:2368:2368 That way "localhost:2368" will be routed to 2368 inside the container, such that caddy can access it, but not accessible externally, as it is right now: $ curl -v https://sphuff.com:2368 Though of course the ideal solution would be to run c…

I see this a lot with redis in docker compose as well. I've even done it by mistake. Also why the heck doesn't redis have auth by default. It's so ridiculously easy to get "hacked" and inadvertently run a crypto miner.

Can you run a crypto miner as a lua script in Redis? That is actually kinda cool tbh. You'd notice pretty quickly since Redis won't respond anymore.

Re: Self-hosting a blog for cheap and lazy devs

#60

This seems both more work and more expensive than GitHub Pages. Hardly the cheap or lazy option. And if the author is reading - your Author link is broken.

+1 Github Pages if you are comfortable on the command line and with markdown

I have some notes on how I played with it a couple years ago. https://www.growthalytics.com/programming/2015/07/19/setting...

Post reply on HN