Minimal, container‑first, optimized for reliability and happiness.
Lightwhale makes Linux servers fun again.
No maintenance headaches.
Just boot and focus on what matters!
Lightwhale makes Linux servers fun again.
No maintenance headaches.
Just boot and focus on what matters!
is a purpose-built operating system designed to run Docker containers effortlessly. It live-boots from an ISO straight into a fully functional Docker Engine, eliminating the need for installation or configuration.
The core system is immutable, making it inherently maintenance-free while enhancing security. Data and customisations are stored entirely segregated on a dedicated device, ensuring they never become entangled with core system files. This gives transparency and makes backup easier.
Streamlined yet versatile enough for home labs or enterprise, bare‑metal or virtualized, edge nodes or clusters.
Driven by a minimalistic design philosophy and an emphasis on ease of use, Lightwhale lowers the entry barrier, removes tedious administration tasks, and opens a friction-free path to productivity, and makes you feel awesome!
Let's get Lightwhale running on a bare‑metal x86 machine, in just a few easy steps.
Download the latest Lightwhale ISO file from the download section or copy, paste, and run this in your terminal:
curl -JOL http://lightwhale.asklandd.dk/download/lightwhale-3.0.2-x86.iso
Write the Lightwhale ISO file to a USB flash device,
either using your favorite
ISO burner tool,
or simply
use dd.:
sudo dd bs=4M conv=fsync if=lightwhale-3.0.2-x86.iso of=/dev/sdx
Boot your machine on the newly prepared Lightwhale boot media. It may be necessary to disable safe boot in the BIOS first.
Note that it is perfectly safe to boot Lightwhale, as it will not install or write anything to any disks unless you explicitly enable persistence, which is optional (see step 5).
Username: op
Password: opsecret
Write the magic header to the desired storage device,
typically an SSD or HDD.
Write it to the block device (not a partition);
for HDD use e.g. /dev/sda (not /dev/sda1);
for NVME use e.g. /dev/nvme0n1 (not /dev/nvme0n1p1).
Note this will in turn erase all existing data on the device.
On some systems it's necessary to wipe an existing partition table first
before writing the magic header:
sudo dd if=/dev/zero bs=512 count=1 conv=notrunc of=/dev/nvmeØn1
echo "lightwhale-please-format-me" | sudo dd conv=notrunc of=/dev/nvmeØn1
Reboot to let Lightwhale detect the magic header and automatically create and mount the data filesystem.
sudo setup-wifi --ssid="my wifi name" --password="my wifi secret"
At this point it's business as usual:
docker run -it --rm busybox ps
Always take adequate security measures before exposing a server to the internet. Since everyone knows the default login and password of your new server, at the very least change that:
passwd op
You can also run Lightwhale in a VM, and even virtualize persistence.
The Lightwhale ISO can boot on bare‑metal or in a virtual machine, supporting both UEFI and classic BIOS. It uses a classic sysv‑like init system that keeps the startup process simple and transparent.
First, the boot loader loads the Linux kernel
and the root filesystem into memory.
The kernel initializes the hardware
and then hands control to /init.
The init process reads
/etc/inittab,
mounts a standard writable
tmpfs
for
/tmp and
/run,
and then executes the init scripts in
/etc/init.d.
Early during init, the writable data filesystem is mounted.
It provides direct storage for Docker data
and upper overlays for
/etc,
/var,
and /home.
This effectively enables you to configure Lightwhale, and install
and run containers, all on top of the immutable root filesystem.
By default, the data filesystem is a volatile tmpfs,
but when persistence is enabled,
a storage device is used instead.
After all filesystems and overlays are in place, the remaining services start, and Lightwhale is ready to serve containers.
This is what truly sets Lightwhale apart from conventional server operating systems!
The root filesystem is a static
squashfs image,
compressed to save memory, and inherently immutable.
An immutable kernel and root filesystem instantly brings a number of advantages
in terms of simplicity, security, and reliability.
/bin/sh,
/lib/libc.so.6,
of course /usr/bin/[.
The immutable nature of Lightwhale offers clear advantages, but in order to install, configure, run containers, and write data, a writable filesystem is required. Furthermore, for the system to be genuinely useful, such modifications must persist across reboots.
Lightwhale activates an automated subsystem early during startup
that enables writability on a data filesystem.
This can either be temporary or persistent
but always mounted at /mnt/lightwhale-data.
All data written by Lightwhale is kept within a single subdirectory:
/mnt/lightwhale-data/lightwhale-state on the data filesystem.
This in turn serves as the writable upper layer in an
overlayfs
stack,
with the immutable root as the lower layer,
and togehter enable writability on top of a read-only filesystem.
By default, Lightwhale mounts a volatile tmpfs
as its data filesystem.
When persistence is enabled,
the data filesystem instead resides on a storage device.
Multiple storage devices are automatically managed in a Btrfs RAID1 data filesystem.
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:
/etcsshd settings.
/var/homeDocker bypasses the overlays and store all its data including images, containers, volumes, and network state directly on the data filesystem:
/mnt/lightwhale-data/lightwhale-state/dockerPersistence must be enabled explictly, or else Lightwhale will never write anything to disk and stay completely volatile.
To enable persistence, write the magic header
to the storage device to be used,
e.g. /dev/sdx:
echo "lightwhale-please-format-me" | sudo dd conv=notrunc of=/dev/sdx
The next time Lightwhale boots up, it will detect the magic disk, format it, and make it the data filesystem.
Multiple magic disks will be made into a single Btrfs RAID1 data filesystem.
The
persistence subsystem
is initiated from /etc/init.d/S11persistence,
and proceeds through a sequence of detailed steps, executed fully automatically:
Scan all disks for a partition with the filesystem label lightwhale-data.
If found, use it as the data filesystem and jump to step 6; otherwise proceed to step 2.
Scan all disks for the magic header,
specifically this exact byte sequence at the very start of the device:
lightwhale-please-format-me.
If found, treat each as a magic disk and proceed to step 3; otherwise jump to step 6.
For each magic disk, create a swap partition labeled
lightwhale-swap,
then create a Linux partition that uses the remaining space and label it
lightwhale-data.
Then proceed to step 4.
Scan all disks for swap partitions labeled
lightwhale-swap
and Linux partitions labeled
lightwhale-data.
Treat each as a
magic swap partition
or
magic data partition
and proceed to step 5.
All magic swap partitions are formatted
and labeled lightwhale-swap.
If only a single magic data partition exists,
format it with
btrfs --data single --metadata dup.
In case of multiple,
join them into a RAID1 and format with
btrfs --data raid1 --metadata raid1cn.
Subvolumes are created for
@lightwhale-data,
@lightwhale-state,
and @lightwhale-state-snapshots.
Label the data filesystem lightwhale-data,
so it can be detected in step 1 at next startup.
If a data filesystem was created or found,
mount its subvolume @lightwhale-data
at /mnt/lightwhale-data;
otherwise mount a tmpfs instead.
Prepare the immutable lower layer:
Bind mount /etc
on /run/lightwhale/overlay/lower/etc,
and mirror the entire directory tree of the immutable root filesystem.
Prepare the writable upper layer:
If not present, create a directory on the writable data filesystem at
/mnt/lightwhale-data/lightwhale-state/overlay/upper/etc.
Finally use overlayfs to virtually merge
the two layers and mount the overlay filesystem at /etc.
This effectively replaces the immutable directory
with a writable version!
Repeat for remaining key directories /var and /home.
Frequently asked questions, or future question that someone might be asking at some point.
You are right not to try to type all the commands by hand. Triple-click to select an entire line in guide and have it copied to your clipboard. Triple-click and drag to select a multi-line command. Then middle-click to paste it into the terminal.
Do review and edit commands as required before executing,
particularly when dealing with sudo and device names on the host.
Use the default login with console getty or ssh.
Yes.
Yes, here and here. Lightwhale is text mode only. You can install any management web UI container you like.
Yes.
Only x86‑64, both BIOS and EFI.
No, not bare‑metal. You can of course virtualize it.
Yes, Lightwhale includes guest agents for QEMU/KVM (used by Proxmox) and VMware ESXi hypervisors.
Here's a quick and dirty way to boot the Lightwhale ISO in QEMU with a virtual disk image to test persistence:
dd if=/dev/zero of=persistence.img bs=1M count=512
echo "lightwhale-please-format-me" | dd conv=notrunc of=persistence.img
qemu-system-x86_64 -m 2G -hda persistence.img -cdrom lightwhale-3.0.2-x86.iso -boot d
Only Docker containers can be installed. Installing software directly onto the file system is not possible and would defeat the very purpose of Lightwhale.
It's not particurly important, as the boot device is only used when the kernel and rootfs is loaded into memory first thing during boot.
It depends. But this isn't what Lightwhale does.
Lightwhale boots from the boot media and then loads both the kernel and the root filesystem into memory. By the time the system begins to initialize, it is already running entirely from RAM, and the boot device is no longer accessed during runtime. You can even unplug it if you want.
The core system is immutable and cannot be modified. Configuration, customization, containers, etc. are writte to the entirely separate data filesystem. By default this resides in volatile RAM, and optionally you can enable persistence.
Not really. Lightwhale is designed to be effortless and predictable, and persistence is implemented through a simple strategy that is identical on every system.
The default hostname includes the machine ID to prevent hostname conflicts on the network. Changing the hostname takes effect immediately, except for the current shell environment, so either log out and back in, or replace the shell. e.g:
sudo setup-hostname lightwhale
exec "$SHELL" -l
There is no warranty. Think, take responsibility of your own actions, and use at your own risk.
wget, nano, $my_fav_app_omg_i_love_it to the root filesystem?No, not likely.
I understand that can be disappointing
not to have all the tools at your disposal,
that you are accustomed to on a mainstream Linux system.
Maybe you're used to nano, and now feel forced to
learn vi.
But remember,
this is a minimalistic purpose-specific server OS,
and with that comes some compromises and limitations;
you get one editor, one http client, and other preselected essentials.
Everything needed is there,
but perhaps not in the shapes and sizes you prefer.
The Lightwhale Project doesn't care about your private data. That's entirely your business. We don't want any of it, so we go to great lengths not to collect it.
Storing and processing personally identifiable information comes with serious responsibility: it must be protected with strong security, handled with care and respect, and is subject to legal obligations under regulations like GDPR.
Taking on that burden for critical data we don't even need makes no sense. So we simply don't collect it.
If you opt-in on telemetry, we collect anonymous data only, and you can always review it, and opt-out again.
Lightwhale is an operating system, not an online service. It does not serve age-restricted content, and it does not identify or track its users.