我的家庭实验室设置
My Homelab Setup

原始链接: https://bryananthonio.com/blog/my-homelab-setup/

受硬盘成本上升和更好数据管理的需求驱动,作者利用一台回收的2018年游戏电脑搭建了一个家庭实验室。该系统的核心是TrueNAS社区版,一种网络附加存储(NAS)操作系统,使用两个8TB硬盘配置RAID 1镜像以实现数据冗余,并使用SSD来加速访问服务。 TrueNAS提供自动快照以方便文件恢复和强大的备份功能。除了存储之外,作者还自托管了几个应用程序:Scrutiny用于硬盘健康状况监控,Backrest用于备份到Backblaze B2,Immich用于照片/视频管理(Google Photos/iCloud的自托管替代方案),Mealie用于食谱整理,以及Ollama用于本地运行AI模型。 远程访问通过Tailscale VPN服务进行保护。未来的计划包括分配自定义域名以简化对各种自托管应用程序的访问。这个家庭实验室提供了一个安全、私密和可定制的长期存储和自托管探索解决方案。

## 家庭实验室搭建总结 这次Hacker News讨论围绕着一位用户搭建的个人家庭实验室,使用了回收利用的硬件和软件,例如TrueNAS、Restic和Tailscale。核心挑战是如何访问自托管服务(如密码管理器),而无需记住端口号,解决方案是通过反向代理和DNS配置。 对话涉及各种管理家庭实验室的方法,包括使用子域名、DNS服务器(如AdGuard Home)和容器化。许多评论者分享了自己的搭建方案,从简单的单机配置到更复杂的服务器集群部署。 一个反复出现的主题是关于“家庭实验室”定义的争论——有些人认为它需要比所展示的设置更高级的基础设施,而另一些人则主张包容性。Tailscale的替代方案(如Headscale和Wireguard)以及基于云的解决方案(如Cloudflare Tunnels)也被讨论,同时还考虑了备份策略和功耗问题。最终,该讨论强调了个人进行自托管的多种方式以及通过实验学习的好处。
相关文章

原文

For the longest time, I’ve procrastinated on finding a good backup and storage solution for my Fujifilm RAW files. My solution up until recently involved manually copying my photos across two external SSD drives. This was quite a hassle and I hadn’t yet figured out a good off-site backup strategy.

After hearing constant news updates of how hard drive prices have been surging due to AI data center buildouts, I finally decided to purchase some hard drives and set up a homelab to meet my storage and backup needs. I also used this opportunity to explore self-hosting some apps I’ve been eager to check out.

Contents#

Hardware#

I repurposed my old gaming PC I built back in 2018 for this use case. This machine has the following specs:

I purchased the Western Digital hard drives over the winter holiday break. The other components were already installed on the machine when I originally built it.

TrueNAS Operating System#

On this machine I installed TrueNAS Community Edition on my NVMe drive. It’s a Linux-based operating system that is well-tailored for network-attached storage (NAS), file storage that is accessible to any device on your network.

The TrueNAS Community Edition dashboard showing system information, CPU usage, and memory stats
My TrueNAS dashboard running version 25.10.1 (Goldeye)

For instance, TrueNAS allows you to create snapshots of your data. This is great for preventing data loss. If, for example, you accidentally deleted a file, you could recover it from a previous snapshot containing that file. In other words, a file is only truly deleted if and only if the system has no snapshots containing that file.

I’ve set up my machine to take hourly, daily, and even weekly snapshots. I’ve also configured it to delete old snapshots after a given period of time to save storage space.

Most of my data is mirrored across the two 8 TB hard disks in a RAID 1 setup. This means that if one drive fails, the other drive will still have all of my data intact. The SSD is used to store data from services that I self-host that benefit from having fast read and write speeds.

Apps I’m Currently Self-hosting#

Not only is TrueNAS good for file storage, you can also host apps on it! TrueNAS offers a catalog of apps, supported by the community, that you can install on your machine.

Scrutiny#

Scrutiny is a web dashboard for monitoring the health of your storage drives. Hard drives and SSDs have built-in firmware called S.M.A.R.T. (Self-Monitoring, Analysis, and Reporting Technology) that continuously tracks health metrics like temperature, power-on hours, and read errors.

Scrutiny reads this data and presents it in a dashboard showing historical trends, making it easy to spot warning signs that a drive may fail soon.

Scrutiny drive health dashboard showing four drives — two 7.3 TiB HDDs, one SSD, and one NVMe — all with a passed status
Scrutiny monitoring all four of my drives

Backrest#

Backrest is a web frontend for restic, a command-line tool used for creating file backups. I’ve set this up to save daily backups of my data to an object storage bucket on Backblaze B2.

The Backrest dashboard summary showing backup stats for a media-backup repository and plan
My Backrest configuration

Immich#

Immich is one of the most popular open-source self-hosted apps for managing photos and videos. I love that it also offers iOS and Android apps that allow you to back up photos and videos from your mobile devices. This is great if you want to rely less on services like Google Photos or iCloud. I’m currently using this to back up photos and videos from my phone.

Immich photo library showing a grid of bird photos.
A sample of my Immich photo library

Mealie#

Mealie is a recipe management tool that has made my meal prepping experience so much better! I’ve found it great for saving recipes I find on sites like NYT Cooking.

When importing recipes, you can provide the URL of the recipe and Mealie will scrape the ingredients and instructions from the page and save it in your recipe library. This makes it easier to keep track of recipes you find online and want to try out later.

Mealie’s recipe library showing six saved recipes in a grid layout
A few of my saved recipes in Mealie

Ollama#

Ollama is a backend for running various AI models. I installed it to try running large language models like qwen3.5:4b and gemma3:4b out of curiosity. I’ve also recently been exploring the world of vector embeddings such as qwen3-embedding:4b. All of these models are small enough to fit in the 8GB of VRAM my GPU provides. I like being able to offload the work of running models on my homelab instead of my laptop.

Remote Access#

When I’m not at home, I use Tailscale, a plug-and-play VPN service, to access my data and self-hosted apps remotely from any device. Tailscale builds on top of another tool called WireGuard to provide a secure tunnel into my home network.

The advantage here is that my homelab PC doesn’t need to be exposed to the public internet for this to work. Any device I want to use to access my homelab remotely needs to install the Tailscale app and be authenticated to my Tailscale network.

Next Steps#

Right now, accessing my apps requires typing in the IP address of my machine (or Tailscale address) together with the app’s port number. Because all of my services share the same IP address, my password manager has trouble distinguishing which login to use for each one.

In the future I’ll look into figuring out how to assign custom domain names to all of my services.

联系我们 contact @ memedata.com