Unfortunately, Apple’s official hard drive solution is a bit pricey at $300.
Raymii shows how to build one with a Raspberry Pi.
This means you might encrypt your backups, run backups on a schedule, and more.
Head over to Raymii for the full guide.
Build a $35 Time Capsule - Raspberry Pi Time Machine Backup Server| Raymii viaTUAW