TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Does a static site need anything more than a simple VM running a server?

36 pointsby swidiabout 3 years ago
I&#x27;m an amateur blogger and programmer, running a custom-made static site on a Linode VM with Caddy [1]. I don&#x27;t use containers or CDNs or anything fancy; my site generator just spits HTML into a folder and I rsync it to the server.<p>Do I need anything more than this? Is there some modern technology that is demonstrably better than my workflow? I worry I&#x27;ve been left behind, but I also find containers and other modern obsessions to be overkill for my needs.<p>Thanks for any and all advice.<p>[1]: https:&#x2F;&#x2F;caddyserver.com&#x2F;

20 comments

ratorxabout 3 years ago
The best “I just want to serve HTML” workflow I’ve found is the Netlify&#x2F;GitHub Pages workflow, as long as you consider version control useful.<p>I can see two downsides to using a VM. 1) You need to update it. 2) Your website goes down if your VM goes down. Do these matter? I’d say 1) is moderately important and 2) depends on your website.<p>Using Netlify fixes these issues (but introduces other potential problems). Does that make it “demonstrably better”? Depends. I’m not you, so I don’t know any pain points or annoyances you have or what you consider important. At the end of the day it doesn’t make a difference to the actual website.<p>That said, it is very quick to try. Why not spend an hour or so and see if it’s worth it for yourself?
评论 #31039427 未加载
kadobanabout 3 years ago
You don&#x27;t need more than that.<p>There are easier ways _depending on the context of what you already know_. There are better ways depending on what you&#x27;re optimizing for. For you I bet this will be hard to beat. For me, I&#x27;d probably throw it in AWS S3, because that&#x27;s what I know without having to think about it or do much work.<p>Containers and other such things are more for when you need different things, like a dynamic site or backend async processing, or not a site at all, and especially when you need some&#x2F;all of that and are tired of sysadmining a VM.
评论 #31036579 未加载
BFLpL0QNekabout 3 years ago
You don’t need a VM for static sites.<p>As others have said, you can just drop it in S3.<p>The other alternative is Cloudflare pages. It’s cheaper than s3 with a generous free tier. I find it less hassle than uploading to s3. Git commit, git push, a few moments later it’s deployed on a global CDN.<p>Both options will be cheaper than running a VM and maintenance free.
themodelplumberabout 3 years ago
Linode VM and Caddy isn&#x27;t too left behind. It&#x27;s likely to continue being well within &quot;just fine&quot; parameters for at least the next decade.<p>At some date after that point you&#x27;ll be seen as a retro computing hobbyist if you&#x27;re willing to change your personal brand, and people will flock to your blog to learn just how you manage to pull it off...
smackeyackyabout 3 years ago
AWS S3 bucket set to serve static pages, use the aws command line to sync it with your source folder.<p>Its easy, cheap and resilient. If you want you can then cloudflare the site or aws have an equivalent service.
评论 #31036198 未加载
评论 #31036712 未加载
评论 #31036130 未加载
PaulHouleabout 3 years ago
That VM is obsolete, the new way is<p><a href="https:&#x2F;&#x2F;jamstack.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jamstack.org&#x2F;</a><p>for instance host with<p><a href="https:&#x2F;&#x2F;www.netlify.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.netlify.com&#x2F;</a><p>Basically you check your files into GitHub and chill, it is as easy as it gets.
评论 #31035862 未加载
coffeefirstabout 3 years ago
Sure. Mind your caching and it’ll be crazy fast and handle more traffic than you’ll ever throw at it.
digianarchistabout 3 years ago
Consider these simpler alternatives:<p>- <a href="https:&#x2F;&#x2F;pages.cloudflare.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pages.cloudflare.com&#x2F;</a><p>- <a href="https:&#x2F;&#x2F;vercel.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;vercel.com&#x2F;</a><p>- <a href="https:&#x2F;&#x2F;www.netlify.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.netlify.com&#x2F;</a><p>- <a href="https:&#x2F;&#x2F;www.digitalocean.com&#x2F;community&#x2F;tutorials&#x2F;how-to-deploy-a-static-website-to-the-cloud-with-digitalocean-app-platform" rel="nofollow">https:&#x2F;&#x2F;www.digitalocean.com&#x2F;community&#x2F;tutorials&#x2F;how-to-depl...</a>
评论 #31036292 未加载
评论 #31036264 未加载
评论 #31036175 未加载
评论 #31035744 未加载
paxysabout 3 years ago
The only concern is that you don&#x27;t have any redundancy. What happens when you push an update? What if the service provider shuts down the VM to patch it?<p>If you are fine with your site being down for short periods of them then this approach is perfectly fine. Otherwise you&#x27;d need to set up multiple instances and some sort of load balancing between then.<p>Others have suggested hosted solutions for static sites (Netlify, Vercel, Github Pages, Cloudflare) and I think those would be a lot easier if you want a no fuss production solution.
gitgudabout 3 years ago
You&#x27;re paying $5-10 per month to host static files on a linode VM, when you could host it for free on netlify, vercel, github pages... etc<p>Vendor lock-in is no where near as bad for static sites too, as the actual static build is the same just slightly different deploy commands for different platforms.<p>A commercial product might not exist in a few years, but you can&#x27;t guarantee someone else will pay for your Caddy server VM, after you&#x27;re gone too.
brundolfabout 3 years ago
You need something better if what you&#x27;ve got isn&#x27;t doing the job. Doesn&#x27;t sound like that&#x27;s the case, so, there you go<p>I serve my blog from Node.js on Heroku, even though it&#x27;s mostly statically rendered, because that&#x27;s my comfort zone. A CDN or even nginx would be more efficient, but I don&#x27;t need it to be. I much prefer having the breezy and familiar workflow
zamubafooabout 3 years ago
One thing to take into account is the flexibility of already having a VM over the touted CDN&#x2F;jamstack workflow.<p>I think of it in terms of marginal cost. What is the cost of spinning up another site in a CDN&#x2F;jamstack workflow? Not too bad if it&#x27;s also static. What about spinning up another service like a database? Or not even leaving the HTTP space, what about a non-static site? I like having the flexibility of say hacking together a RSS aggregator in a weekend and throwing it onto my VPS behind my already running reverse proxy.<p>(Oh and it&#x27;s a &quot;free&quot; VPN if you are already paying for the VPS for another reason.)
xupybdabout 3 years ago
I run static sites on Amazon S3 storage with cloudflair in front.<p>It costs about 6 cents a month.
formerkrogempabout 3 years ago
I think you&#x27;ll be fine unless you suddenly get DDOS or something. But then cloud flare would solve that.
nunezabout 3 years ago
The only thing I&#x27;d add is a CI&#x2F;CD pipeline to make updating the VM easy. Maybe an Ansible playbook to better ensure the files get copied and that Caddy gets updated, if needed. All optional though.
mouzoguabout 3 years ago
a vm running a server is not really &quot;simple&quot;, at least not by my idea for static html. i would think a vm&#x2F;server is only needed if you have specific hosting requirements.<p>maybe i&#x27;m missing something as i didn&#x27;t see anyone else suggest it, but i would just use github pages, or even something like gdrive, dropbox, mega can host html i think.
landaabout 3 years ago
Firebase Hosting is really good for this kind of thing. You can even expand it later to add more dynamic content.
hnarayananabout 3 years ago
You don’t need anything more than this.
egberts1about 3 years ago
Caddy, you say?<p>This is what I would do.<p>Keep the Markdown files on your local PC.<p>- Add&#x2F;modify Markdown files.<p>- run a bash script to<p>- - rsync them all to your VPS<p>- - run Caddy on VPS<p>Done.<p>View on your favorite web browser.
评论 #31036464 未加载
nprateemabout 3 years ago
S3