Read this first. This is a small addition on top of someone else’s work, not a project of its own. The amnesic session it runs in is @linuxuser1’s live mode, start there: Qubes OS live mode. dom0 in RAM. Non-persistent Boot. RAM-Wipe. Protection against forensics. Tails mode. Hardening dom0. Root read‑only. Paranoid Security. Ephemeral Encryption
What is mine is only the layer that carries the workload: qubes kept in an encrypted store, loaded into RAM, worked on with the store closed, saved back. Everything below was written before I understood that, and parts of it are corrected later in the thread.
The problem. A normal Qubes session keeps writing your work to the internal disk. An amnesic session fixes that for the system, but the workload goes with it, so nothing you did survives. Neither end gives you qubes that live across sessions without ever touching the disk.
Where this is now. The cycle works and I have run it on real hardware: qubes load into RAM out of an encrypted store, the store is closed and gone from the system while you work, changes are saved back into it. The roadmap at the end of this post says where each piece stands.
Three ways to run a qube, pick by what the qube is.
Whole thing in RAM. The qube is standalone, it goes into memory and the store closes behind it and is gone from the system. This is the only one with a real air gap. Small and secret things go here: the vault with keys, a wallet, a messenger. Gigabytes, not more.
Template in the store, only the qube’s own data in RAM. The store stays open so there is no air gap, but memory costs little and one template is shared by several qubes. Use it when the system is heavy and the data is light: a build environment, a browser qube on a large template.
Whole thing stays in the store. A chain node, an indexer. Hundreds of gigabytes, they will never fit in memory, and that is not a defeat: there are no secrets there, a public chain is public by definition. The strong protection goes to what deserves it instead of to everything.
What I run: keys and wallet the first way, node and indexer the third. The second is for qubes that are a bit large for memory but hold little data.
Hi all,
I’d like to share an experimental project and, mostly, ask for adversarial review of its threat model before I take it any further.
Why I built it
I built this because it was the piece missing for me. The ingredients are all well-documented here already, Qubes compartmentalization, encrypted media, RAM-only tricks, but I couldn’t find a workflow that combined them the way I needed: a normal, updatable base that leaves no trace of my real work on the internal disk, where each sensitive task is its own encrypted, portable qube, loaded into RAM only when needed and living at rest only on media I physically control. This is my attempt at that missing workflow.
The idea in one paragraph
Full-disk encryption protects data at rest once the machine is off, but a normal Qubes session keeps writing to the internal disk: qube images grow, dom0 logs record qube names, swap may page sensitive memory to persistent storage. What this does is boot a clean empty Qubes, make a storage pool backed by RAM, and restore into it only the qubes you need, out of an encrypted store. The store is then closed and gone from the system, and you work entirely from RAM. When you are done you open it again, save the qubes back, tear everything down and power off. The goal is that the internal disk looks the same after the session as before it. It is the Tails amnesic idea, but per qube, and built out of Qubes’ own backup, restore and storage pool machinery.
How this relates to existing forum work
This is not standalone. It sits on work this forum already did, and the list below says what I take from each and where I go differently.
Qubes OS live mode / dom0 in RAM is the base I build on now. It makes dom0 itself amnesic, with a read only root and an ephemeral overlay, and that removes a whole class of leftovers I had been cleaning by hand: logs, panel state, metadata. What it does not do is keep workload state, and messengers whose crypto only moves forward need exactly that (I tested this, see further down the thread). So this sits on top of it rather than next to it: the session is ephemeral as in that guide, and the working qubes come out of an encrypted store and are saved back into it, forward only. Qubes in tmpfs and Qubes 100% in RAM are earlier work in the same direction.
Ephemeral DVMs in fully ephemeral thin pools achieves pure ephemerality, nothing survives. The qubes here are persistent but portable: real AppVM state that survives across sessions, but only inside the encrypted store, never on the internal disk.
Detached LUKS header on USB covers the system disk side, which this composes with rather than replaces.
So the one line difference: prior work makes the system amnesic; this makes the workload live in RAM and persist only in an encrypted store that is closed while you work, and it runs on either kind of base underneath.
Two-layer design
I split the problem deliberately:
Layer A, how the machine boots and opens its system disk. Platform-specific: measured-boot platforms vs. platforms using a detached LUKS header are genuinely different trust models. Handled per-platform.
Layer B, “the ghost”: the RAM pool, the encrypted-vault protocol, and the load/save/teardown lifecycle. Identical everywhere. This is what the project is really about, so the same minimal-template “ghost image” is reusable no matter how a given machine boots.
What is actually implemented
One script, scripts/ghost, does the whole cycle: open the store and bring up the RAM pool, restore qubes into RAM, close the store, work, save back, tear everything down.
I ran all of it on the laptop, not in a VM. Wrote a marker in a qube, closed the store so it was gone from the system, kept writing into the qube with it gone, saved, destroyed the RAM pool completely, brought it back up, restored. Everything was there.
The four older scripts are still in the repo. They used to do things the one script did not, the placement and completeness checks in particular, and those have since moved across.
Threat model, please poke holes
In scope: no session residue on the powered-off internal disk; no sensitive memory paged to persistent swap; no sensitive qube names in dom0 logs; vault air-gapped during work.
Out of scope: cold-boot/DMA against live RAM; a compromised dom0 or malicious template; coercion beyond the outer volume; anything the platform’s boot layer can’t guarantee.
Questions I asked here, and where they stand
-
Other on-disk writes during a restore into a non-default pool. Still open. I have not audited it.
-
Whether repointing the default pool is the right way to force restore placement. Answered by trying. There is no option for the target pool, so switching the default pool for the duration is what works.
-
dom0 logs recording qube names. Gone, and not because I solved it. The amnesic session makes dom0’s root ephemeral, so there is nothing left to scrub. That whole class went away with the design change.
-
Whether
noswaptmpfsis enough against paging. Still open. The swap here is zram and stays in memory, but I have not proven the general case. -
Paranoid-mode restore. Dropped. The default policy refuses the volume import and I am not using it. Allowing it needs a policy for that call, which I have not written.
One clarification on device handling, since it matters for the trust story: the raw USB device is never attached to dom0, it stays behind sys-usb, only the block device is passed to the offline vault, and the volume passphrase is entered inside the vault. The dom0 exposure is limited to the backup archive stream during restore (see question 5).
Prior art
This is glue on top of others’ work: Qubes OS (pools, backup/restore, DispVMs, qrexec, admin-client), Tails (the amnesic model), Whonix/Kicksecure (minimal hardened templates), and qusal by Ben Grande (minimal provisioning, and the sys-usb/grub warning). Thanks to all of them.
Roadmap
The cycle itself, done. Qubes restored into RAM, store closed while working, changes saved back, proven on real hardware.
One script for the whole cycle, done.
Refuse to load anything but the newest archive, and prune old ones on save. Done, with tests. A save seals the archive and only then removes the older ones, so there is never a moment with nothing to load. Going back on purpose is still possible, but the archive name has to be typed out in full and the step is recorded as a new generation. The seal lives in the store, so it catches a mistake and a swapped archive, not someone who restores an old copy of the whole volume.
Check that restored volumes really landed in RAM and fail closed if not. Done. The chain is followed rather than assumed: the pool, its volume group, the one physical volume under it, the loop file behind that, and the filesystem the file sits on, which has to be tmpfs.
Hash the archive and mark it complete only after verifying. Done.
Keep only the crypto state of a messenger instead of a whole qube image. Done. Tested against a stand-in filesystem, not yet against a real messenger.
Sterility checks before power off. Done. The teardown ends with a verdict and names whatever is still holding on.
Matrix: closed, and not the way I first reported it. See the correction further down the thread.
Code + full README (mirror). It’s MIT-licensed, experimental, and not affiliated with the Qubes OS Project.
Grateful for any review, especially the “here’s how your disk still leaks X” kind.
Thanks!