Skip to content
Tech News
← Back to articles

Show HN: I've built a nice home server OS

read original get Raspberry Pi 4 Kit → more articles
Why This Matters

Lightwhale introduces a hybrid filesystem approach that combines immutable system layers with writable, persistent data storage, enhancing system stability and flexibility for home server users. This design allows users to customize and maintain data across reboots while preserving the benefits of an immutable core, making it a compelling solution for reliable home server management.

Key Takeaways

Persistence by Choice

The immutable nature of Lightwhale offers clear advantages, but in order to install, configure, run containers, and write data, a writable filesystem is required. And for the system to be genuinely useful, such changes must persist across reboots.

The Data Filesystem

Lightwhale provides both temporary and persistent writability through an automated subsystem activated early during startup. This mounts the data filesystem at /mnt/lightwhale-data .

All data written by Lightwhale is kept within a single subdirectory: /mnt/lightwhale-data/lightwhale-state . This in turn serves as the writable upper layer in an overlayfs stack, with the immutable root as the lower layer.

By default, Lightwhale mounts a volatile tmpfs as its data filesystem. When persistence is enabled, the data filesystem instead resides on a storage device and is mounted accordingly.

Key Directories

The data filesystem overlay does not cover the entire root filesystem; that would defeat the purpose of immutability and Lightwhale altogether. Instead, the writable overlays apply only to a few strategic directories:

/etc For customizing system configuration, including networking, password, and sshd settings. /var For log and other application data. /home For user account customization, including authorized SSH keys, and cloning Git repositories with Docker and Swarm stacks.

Docker Data

... continue reading