How do you actually self-host securely?
93 How do you actually self-host securely? ☶ ask devops authored by pralkarz 2026-11-11 06:01:19 | 56 comments
93 如何真正安全地进行自托管?☶ ask devops 作者:pralkarz 2026-11-11 06:01:19 | 56 条评论
I recognize that the title is rather vague, but I’m completely green when it comes to self-hosting, so I figured here would be a good place to ask for some pointers given the discussions I sometimes see happening in the comments. I tried researching first through DDG and Google, but (and I recognize this might be a skill issue) most things I found are either SEO slop or trying to sell/market some service.
我承认这个标题比较模糊,但我对自托管完全是个新手,所以考虑到我有时在评论区看到的讨论,我觉得这里是一个寻求建议的好地方。我尝试先通过 DDG 和 Google 进行研究,但(我承认这可能是技术问题)我找到的大多数内容要么是 SEO 垃圾信息,要么是试图推销/营销某种服务。
For some more context and to give a concrete example as to what I’m interested in, I got my hands on a Raspberry Pi which I’d like to use to start tinkering with self-hosting. My main goal would be to host my (static) website on it, potentially adding more things in the future.
为了提供更多背景信息并给出一个具体的例子来说明我感兴趣的内容,我弄到了一台树莓派,我想用它开始尝试自托管。我的主要目标是在上面托管我的(静态)网站,未来可能会增加更多内容。
Some people I asked this question recommended solutions like Cloudflare Tunnels to make it secure, but using such a provider almost feels like it defeats the point of self-hosting, so I’m curious whether it’s viable to do it using open source tooling, any gotchas one might encounter, and generally any thoughts you might have on the topic.
我问过的一些人推荐使用 Cloudflare Tunnels 之类的解决方案来确保安全,但使用这样的提供商感觉几乎违背了自托管的初衷,所以我很好奇是否可以使用开源工具来实现,过程中可能会遇到什么陷阱,以及你们对这个话题有什么看法。
(Also, feel free to suggest a tag other than devops, I figured security doesn’t quite apply since it’s a question and not a write-up/resource regarding security.)
(另外,欢迎建议除 devops 之外的标签,我觉得 security 标签不太适用,因为这是一个问题,而不是关于安全的文章或资源。)