TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Self-hosting a blog for cheap and lazy devs

95 点作者 sphuff将近 5 年前

22 条评论

stevekemp将近 5 年前
The guide exposes the back-end webserver to the public, by accident.<p>Instead of:<p><pre><code> ports: - &quot;2368:2368&quot; expose: - &quot;2368&quot; </code></pre> The author probably just needs:<p><pre><code> ports: - 127.0.0.1:2368:2368 </code></pre> That way &quot;localhost:2368&quot; will be routed to 2368 inside the container, such that caddy can access it, but not accessible externally, as it is right now:<p><pre><code> $ curl -v https:&#x2F;&#x2F;sphuff.com:2368 </code></pre> Though of course the ideal solution would be to run caddy as another container, and link them together.
评论 #23276651 未加载
评论 #23276066 未加载
badatcomputer将近 5 年前
Anything that starts with &quot;Install Docker&quot; will not be cheap or easy
评论 #23276388 未加载
评论 #23276520 未加载
评论 #23279109 未加载
评论 #23277191 未加载
评论 #23276169 未加载
chrisseaton将近 5 年前
This seems both more work and more expensive than GitHub Pages. Hardly the cheap or lazy option.<p>And if the author is reading - your Author link is broken.
评论 #23275341 未加载
评论 #23275530 未加载
评论 #23276023 未加载
评论 #23276573 未加载
评论 #23277875 未加载
dwheeler将近 5 年前
The key part about having your own personal blog site is owning your own domain. As long as you own the domain, you can change your mind. As long as you own your domain name, you can self-host today, host elsewhere, or whatever you want.<p>If the domain name is owned by somebody else, then they own and control the site, not you.
评论 #23277200 未加载
staysaasy将近 5 年前
We host our blog using solely off-the-shelf tools, and I love the stack that we use. I highly recommend it if you&#x27;re looking for a stack with 100% control and are ok with some light technical wrangling (eg using Git):<p>- Jekyll for static site generation <a href="https:&#x2F;&#x2F;jekyllrb.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jekyllrb.com&#x2F;</a><p>- We use the Hydeout Jekyll theme, you can see how it looks on our blog: <a href="http:&#x2F;&#x2F;staysaasy.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;staysaasy.com&#x2F;</a>. What you see is out-of-the-box plus ~30 lines of custom CSS.<p>- Git for storing our content<p>- Gitlab for CI&#x2F;CD and hosting<p>- GoDaddy for domain management<p>We manage all of the content in Git, and push it when it&#x27;s ready. It&#x27;s really easy. You can even run &quot;code reviews&quot; on posts if you like.
评论 #23275819 未加载
评论 #23276100 未加载
lowlevel将近 5 年前
Lost me at step 1. There isn&#x27;t an explanation as to why docker is a good idea... I feel it isn&#x27;t, and I&#x27;m kind of too lazy to go figure if I&#x27;m wrong.
thamer将近 5 年前
I use Hugo (<a href="https:&#x2F;&#x2F;gohugo.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gohugo.io&#x2F;</a>) 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.<p>I couldn&#x27;t be happier with the setup: it&#x27;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.<p>If folks want to see how fast static pages can be on a CDN, the site is at <a href="https:&#x2F;&#x2F;re.kv.io" rel="nofollow">https:&#x2F;&#x2F;re.kv.io</a><p>P.S. I didn&#x27;t have to install Docker or MySQL.
评论 #23277398 未加载
评论 #23277535 未加载
gourneau将近 5 年前
Also if y&#x27;all are looking for incredibly cheap servers <a href="https:&#x2F;&#x2F;www.serverhunter.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.serverhunter.com&#x2F;</a> has many listed that are less than $5 a year. Most of them are OpenVZ based, and very low performance but good for hobby projects. The other compromise is many don&#x27;t have entire IPv4 addresses, just a few forwarded ports.
waffle_ss将近 5 年前
This doesn&#x27;t cover IPv6 - you&#x27;ll also need to create an AAAA record and (presumably, not familiar w&#x2F; Caddy) bind to an IPv6 address (e.g. ::1) in the reverse proxy config
评论 #23275637 未加载
update将近 5 年前
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&#x27;ve edited maybe a handful of lines of code.<p>Perhaps I&#x27;m missing something, but I don&#x27;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&#x2F;css, no CMS required, based on articles like these, at least.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;sfttw&#x2F;avanti" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sfttw&#x2F;avanti</a> [1] <a href="https:&#x2F;&#x2F;blog.sailingfasterthanthewind.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.sailingfasterthanthewind.com&#x2F;</a>
butz将近 5 年前
Netlify has a free plan and you don&#x27;t have to tinker with containers.
评论 #23277097 未加载
评论 #23282007 未加载
randtrain34将近 5 年前
Or make your blog static and use Netlify.
评论 #23277238 未加载
627467将近 5 年前
Not directly related but:<p>How readable are these mobile layouts for everybody else?<p><a href="https:&#x2F;&#x2F;postimg.cc&#x2F;4HbvS38q" rel="nofollow">https:&#x2F;&#x2F;postimg.cc&#x2F;4HbvS38q</a><p><a href="https:&#x2F;&#x2F;postimg.cc&#x2F;SjWGsZyd" rel="nofollow">https:&#x2F;&#x2F;postimg.cc&#x2F;SjWGsZyd</a>
jpswade将近 5 年前
I migrated away from Wordpress to github pages and Jekyll...<p><a href="https:&#x2F;&#x2F;wade.be&#x2F;2016&#x2F;01&#x2F;30&#x2F;welcome-to-jekyll.html" rel="nofollow">https:&#x2F;&#x2F;wade.be&#x2F;2016&#x2F;01&#x2F;30&#x2F;welcome-to-jekyll.html</a><p>Can’t get any easier, cheaper or lazier than that.
评论 #23276188 未加载
decompiled_dev将近 5 年前
Having a static site and pushing to github pages is working pretty well for me.
Insanity将近 5 年前
I use github pages. Can&#x27;t get more cheap or lazy than that I guess?
评论 #23275940 未加载
评论 #23276046 未加载
hawski将近 5 年前
If you don&#x27;t use SaaS blog platform and host it on a VPS it counts as self-hosting?<p>In this case shared hosting will be even cheaper and maintenance free. System, server, Let&#x27;s encrypt cert, database and language updates will be taken care of. Many of those PHP CMS-es or blogging systems have a one click updates in place. Some shared hosting providers can also take care of this for you. You can get something with ssh access and rsync so you can be lazy and edit HTML with Word and just sync it or an SSG if that strikes your fancy.
ro2nie将近 5 年前
VuePress (which generates static pages) with netlify is completely free. I can push to a branch and automatically have it deploy new posts.
nopit将近 5 年前
Why isn&#x27;t caddy in a container?
评论 #23275741 未加载
Alir3z4将近 5 年前
Good stuff, but I never liked self hosting a blog when I can just pop it up on a hosted solution. I want to write and forget and not maintain. By the time that I setup a blog, I&#x27;d have lost my interest in writing.<p>Probably, I&#x27;ll just write about my pain about how did I deal with docker, exposing the port, nginx reverse, some vps provider and DNS stuff.
paxys将近 5 年前
Local storage on a VM instance should never be treated as a permanent data source.
herostratus101将近 5 年前
This seems more complicated and significantly more expensive than hosting a static site from S3 and using a Cloudfront distribution to enforce SSL.