<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://rkd.zgib.net/</id>
  <title>Blog - Posts in linux</title>
  <updated>2026-09-15T06:53:50.178498+00:00</updated>
  <link href="https://rkd.zgib.net/"/>
  <link href="https://rkd.zgib.net/blog/category/linux/atom.xml" rel="self"/>
  <generator uri="https://ablog.readthedocs.io/" version="0.11.13">ABlog</generator>
  <entry>
    <id>https://rkd.zgib.net/blog/2026/debian-with-unionfs-root/</id>
    <title>Debian with unionfs root</title>
    <updated>2026-07-13T00:00:00+00:00</updated>
    <author>
      <name>Richard Darst</name>
    </author>
    <content type="html">&lt;section id="debian-with-unionfs-root"&gt;

&lt;p&gt;I wanted to make a virtual machine that has a root that is immutable -
when booted, it would have a tmpfs for all files, and then when
reboots, everything goes back to normal.  I set this up before the
&lt;a class="reference internal" href="../../2026/debian-read-only-root/"&gt;&lt;span class="doc"&gt;read-only root filesystem&lt;/span&gt;&lt;/a&gt;,
but the use case is slightly different here.  I want a way to test
things on the internet, without going through my home network, more
lightweight than making/snapshotting and deleting a VM every time.  It
might also be useful when you want a system that is mostly normal but
home directories are in memory.&lt;/p&gt;
&lt;p&gt;This post is mostly internal notes but may be helpful to others.&lt;/p&gt;
&lt;section id="the-idea"&gt;
&lt;h2&gt;The idea&lt;/h2&gt;
&lt;p&gt;I make a VM and give it an overlayfs for &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/home&lt;/span&gt;&lt;/code&gt;.  This has the base
(the real &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/home&lt;/span&gt;&lt;/code&gt; and the upper directory &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/tmp/home&lt;/span&gt;&lt;/code&gt; where any
modifications are stored.  &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/tmp&lt;/span&gt;&lt;/code&gt; is an automatic tmpfs, and then
there is no permanent changes made to one’s home directory.&lt;/p&gt;
&lt;p&gt;First, install the VM and I have found it is good to &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;touch&lt;/span&gt;
&lt;span class="pre"&gt;~/.Xauthority&lt;/span&gt;&lt;/code&gt; before doing the overlay, so that &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;ssh&lt;/span&gt; &lt;span class="pre"&gt;-X&lt;/span&gt;&lt;/code&gt; works.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="filesystem-mounts"&gt;
&lt;h2&gt;Filesystem mounts&lt;/h2&gt;
&lt;p&gt;This is implemented via an overlayfs.&lt;/p&gt;
&lt;p&gt;On the Debian version I have, &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/tmp&lt;/span&gt;&lt;/code&gt; is already a &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;tmpfs&lt;/span&gt;&lt;/code&gt;.  If
not, you should set up that first.&lt;/p&gt;
&lt;p&gt;I add the following into &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/etc/fstab&lt;/span&gt;&lt;/code&gt;.  It seems to automatically
make the directories within /tmp, which of course are never saved
since it is a tmpfs.:&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;homeoverlay&lt;/span&gt;   &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;          &lt;span class="n"&gt;overlay&lt;/span&gt;  &lt;span class="n"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;nofail&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;unbindable&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;lowerdir&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;upperdir&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;tmp&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;workdir&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;tmp&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;work&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following line makes a bind-mount of root which I hoped to use to
access the underlay of &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/home&lt;/span&gt;&lt;/code&gt; without having to reboot, but this
line did &lt;em&gt;not&lt;/em&gt; work that way (the binds were passed through, even
though it is &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;bind&lt;/span&gt;&lt;/code&gt; and not &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;rbind&lt;/span&gt;&lt;/code&gt; which should be recursive).
Any other bind-mounts I tried to do did not work as expected:&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;             &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;bind&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;none&lt;/span&gt;     &lt;span class="n"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;bind&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To bind-mount (via qemu or whatever it was) from outside, I have this
fstab line:&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;          &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;           &lt;span class="n"&gt;virtiofs&lt;/span&gt; &lt;span class="n"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;auto&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/section&gt;
&lt;section id="network-bridge-to-vpn"&gt;
&lt;h2&gt;Network bridge to VPN&lt;/h2&gt;
&lt;p&gt;The network is bridged to a separate vlan to further isolate it (this
vlan is managed by my home router outside the host, so there is no way
this system could possibly send traffic without the vpn).  In
virt-manager, I set it to a bridge device I have configured on the
host to be bridged to the VPN.  I’m recording this here since it’s
relevant.&lt;/p&gt;
&lt;p&gt;First, you need to make a bridge device.  I add the following to
&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/etc/network/interfaces&lt;/span&gt;&lt;/code&gt;.  I don’t make this automatically
activate, since on the host I don’t want long-term effects unless I do
something.  The VM fails to start if it isn’t activated:&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;iface&lt;/span&gt; &lt;span class="n"&gt;br&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;vpn2&lt;/span&gt; &lt;span class="n"&gt;inet&lt;/span&gt; &lt;span class="n"&gt;dhcp&lt;/span&gt;
  &lt;span class="n"&gt;bridge_ports&lt;/span&gt; &lt;span class="n"&gt;enp4s0&lt;/span&gt;&lt;span class="mf"&gt;.22&lt;/span&gt;
  &lt;span class="n"&gt;metric&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Activate the bridge with &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;ifup&lt;/span&gt; &lt;span class="pre"&gt;br-vpn22&lt;/span&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Modern Linux send bridge traffic through netfiter (iptables).  You can
either allow it in the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;FORWARD&lt;/span&gt;&lt;/code&gt; chain if it’s not set by default,
or for my case it was easiest to make it not use netfilter:&lt;/p&gt;
&lt;div class="highlight-console notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gp"&gt;# &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;tee&lt;span class="w"&gt; &lt;/span&gt;/proc/sys/net/bridge/bridge-nf-call-iptables
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you don’t do the above, remember to &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;sysctl&lt;/span&gt; &lt;span class="pre"&gt;net.ipv4.ip_forward=1&lt;/span&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
</content>
    <link href="https://rkd.zgib.net/blog/2026/debian-with-unionfs-root/"/>
    <summary>I wanted to make a virtual machine that has a root that is immutable -
when booted, it would have a tmpfs for all files, and then when
reboots, everything goes back to normal.  I set this up before the
read-only root filesystem,
but the use case is slightly different here.  I want a way to test
things on the internet, without going through my home network, more
lightweight than making/snapshotting and deleting a VM every time.  It
might also be useful when you want a system that is mostly normal but
home directories are in memory.</summary>
    <published>2026-07-13T00:00:00+00:00</published>
  </entry>
  <entry>
    <id>https://rkd.zgib.net/blog/2026/digital-sovereignty-actions/</id>
    <title>My digital sovereignty actions</title>
    <updated>2026-06-17T00:00:00+00:00</updated>
    <author>
      <name>Richard Darst</name>
    </author>
    <content type="html">&lt;section id="my-digital-sovereignty-actions"&gt;

&lt;p&gt;Digital sovereignty refers to owning or having control over your data
and digital services.  This post talks about what I do.&lt;/p&gt;
&lt;p&gt;I’m interested in this not just to get away from US-based companies,
but for preparing for the internet to get more locked down and closed
with things like age verification, forced identification, etc.&lt;/p&gt;
&lt;p&gt;A basic goal is I’d like to do things that I can recommend to others.
I used to self-host many things (like my own email, web servers, etc.)
and still could, but I am much busier now.  Furthermore, not everyone
can or has time to self-host things.  I would rather learn and use
things that I can recommend to, for example, my parents and friends,
rather than the theoretical perfect thing for a person with plenty of
time.  As you’ll see, I have various things at different levels of
from “self-hosted” to “cloud”.&lt;/p&gt;
&lt;section id="proton-services"&gt;
&lt;h2&gt;Proton services&lt;/h2&gt;
&lt;p&gt;I use &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Proton_AG"&gt;Proton&lt;/a&gt; for my email,
with my own domain.  I pay for this.  The custom domain setup was
extremely easy (though of course I’m an expert here, but still… it’s
almost doable by anyone).&lt;/p&gt;
&lt;p&gt;With plans above the minimum, you get an incredible amount of stuff:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;mail (works well)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;calendar (I don’t really use)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;drive (works well, but I don’t sync my computer to it)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;docs (working, including spreadsheets), but not good enough for my
primary use yet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;password manager (this has been an unexpectedly useful for me)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;VPN&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The basic benefits of Proton are client side encryption, being
exclusively funded by users, mostly controlled by a foundation, and
having a critical mass to continue developing services and expanding.
Their goal is to make good services which are intended for wide
adoption (not theoretical perfection), which is a trade-off I support.
Other basics, like clear backups and recovery (which is difficult with
client side encryption) are taken seriously and made usable, so that
(for example) my parents would not lose all their data if they do the
backup/recovery steps suggested.&lt;/p&gt;
&lt;details class="admonition-is-proton-bad admonition"&gt;
&lt;summary class="admonition-title"&gt;Is Proton bad?&lt;/summary&gt;
&lt;p&gt;I often see complaints about Proton in the news, but in my analysis
most are unfounded.  They are a serious company making the hard
trade-offs needed to provide a service to as many people as possible,
which I think is good.  I think most complaints (while having a
factual basis) are either general negativity, or perhaps targeted
attacks.&lt;/p&gt;
&lt;/details&gt;
&lt;/section&gt;
&lt;section id="cryptpad"&gt;
&lt;h2&gt;Cryptpad&lt;/h2&gt;
&lt;p&gt;&lt;a class="reference external" href="https://cryptpad.fr/"&gt;Cryptpad&lt;/a&gt; is a web-based client-side encrypted
drive service.  It has OnlyOffice as a document suite, providing very
high quality documents, spreadsheets, presentations, etc.  It also has
forms and markdown document support.  I know crypto researchers what
have colleagues who develop on CryptPad and recommend it, so that’s a
good review to me.  It’s run by a French company.&lt;/p&gt;
&lt;p&gt;I don’t pay for this and get 1 GiB free.  I used this when I needed
competent office suites or documents I can share via a link, but I
don’t use it for much else.  Sign-up was completely anonymous (and you
can even do basics without registering).&lt;/p&gt;
&lt;/section&gt;
&lt;section id="home-servers"&gt;
&lt;h2&gt;Home servers&lt;/h2&gt;
&lt;figure class="align-right"&gt;
&lt;img alt="https://rkd.zgib.net/_images/digital-sovereignty-actions-pis.png" src="https://rkd.zgib.net/_images/digital-sovereignty-actions-pis.png" /&gt;
&lt;/figure&gt;
&lt;p&gt;I have two &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Raspberry_Pi"&gt;Raspberry Pis&lt;/a&gt;
running stock Raspberry Pi OS. (There are other Raspberry Pi images
that are designed to host home services more easily, but I could
manage them myself.  Also, someday I may switch to raw Debian.)&lt;/p&gt;
&lt;p&gt;A Raspberry Pi 4 serves as an internal file server, though the files
are just stored on USB flash drives so it’s not a fully developed,
backed-up NAS yet.  Sometime I’d want to make it a full RAID array.
One USB drive holds basic shared files, one USB drive is backups.  (I
need to set up better off-site backups.)  This one basically runs Samba
with world-rw permissions, but is inside our internal network so guests
don’t have access.&lt;/p&gt;
&lt;p&gt;A second Raspberry Pi 5 serves as a web server.  It has a dual M2 NVMe
hat with (currently) one 500 GiB NVMe.  Nginx serves as a reverse
proxy and various servers run in Docker.  This is accessible to the
world and is in the guest network.&lt;/p&gt;
&lt;p&gt;I got Raspberry Pis since it’s a Europan company and I wanted new things
that would have a long lifetime.  To increase reliability, I made the
root filesystem on the SSD cards to read only
(&lt;span class="xref std std-doc"&gt;debian-read-only-root&lt;/span&gt;).  The idea is I want to treat these like
an appliance with a long lifetime, not so getting I mess with all the
time.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="self-hosted-nextcloud"&gt;
&lt;h2&gt;Self-hosted Nextcloud&lt;/h2&gt;
&lt;p&gt;On the Raspberry Pi, I installed
&lt;a class="reference external" href="https://en.wikipedia.org/wiki/Nextcloud"&gt;Nextcloud&lt;/a&gt; via the &lt;a class="reference external" href="https://github.com/nextcloud/all-in-one"&gt;“all in
one” distribution&lt;/a&gt;.  With
this, you pull one docker image and it controls the swarm of other
docker images.  The interface seems quite well developed and while
this self-hosting is still advanced, the barrier to using it was much
less than I expected.  There have been some problems I have had to
solve with my Linux experience (partly caused by my particular
setups), which makes it hard to recommend this for everyone.&lt;/p&gt;
&lt;p&gt;This is all self-hosted at home.  I could use a VM somewhere, but I
haven’t wanted to go that far and pay for that yet.&lt;/p&gt;
&lt;p&gt;I learned that Nextcloud isn’t just a drive thing, but has a huge
variety of apps built in.  It has user management and file storage,
but also things like a teleconference solution (what I use to talk to
my parents now), chat, documents, calendar, etc. It’s basically a full
replacement for Google Workspace / Microsoft stuff, and really could
be used by an organization to replace those US services.&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Drive: store files via the web, Android sync, etc.  It can even
use SMB as a storage backend, so in theory the NAS could be the file
storage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deck (task management / kanban)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Talk (chat and video chat.  I use this to talk to my parents now)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Notes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And much more.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The office suite is either Collabora (which I think is LibreOffice
based), or OnlyOffice like Cryptpad.  I found OnlyOffice to be better,
but the EuroOffice project was started and is forking OnlyOffice to
improve it some.  EuroOffice is actually a collaboration among many
companies that includes Proton, Nextcloud and Xwiki (the company
behind CryptPad)&lt;/p&gt;
&lt;p&gt;NextCloud had good apps for Android, and is taking over some of the
basic note taking and task management I need to do (for example I am
drafting this post in the Notes app).  The office suite isn’t good
enough for me to fully replace Google Docs yet.&lt;/p&gt;
&lt;p&gt;So, while this self hosting is still not in the reach of everyone,
this is on the easy side of self-hosting.  Still, self hosting has a
lot of things that can go wrong (I’ve already had to fix various
things), so it’s hard to recommend this to everyone.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="desktop-computers"&gt;
&lt;h2&gt;Desktop computers&lt;/h2&gt;
&lt;p&gt;My desktop runs &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Debian"&gt;Debian&lt;/a&gt;
(“Linux”).  It’s been stable for ages and is nice and boring.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="networking-and-routers"&gt;
&lt;h2&gt;Networking and routers&lt;/h2&gt;
&lt;p&gt;I have two &lt;a class="reference external" href="https://en.wikipedia.org/wiki/MikroTik"&gt;Mikrotik&lt;/a&gt; network
devices in my home, one router and one PoE ceiling mounted access
point.  Mikrotik is a Latvian company, and their device are known to
be very powerful but hard to use, which is the trade off I don’t mind
making.  The easy setup was easy enough for anyone, and the powerful
interface wasn’t that hard, if you know Linux networking (there is
always the difficulty that if you can do anything, you want to and it
gets complicated.  The basics are easy enough to do) - and really, a
huge amount of Linux networking capabilities are exposed. They can be
used fully without any cloud services.&lt;/p&gt;
&lt;p&gt;My home cable modem/router (provided by the ISP) is in bridge mode
(routing/firewall by own router), so that it has no access to the rest
of the internal networks.  Internally, I have a networks:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;primary (own devices)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;guest (guests and insecure)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IoT (no access to the internet, I can access from the primary
network) (not that I have IoT devices yet anyway)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;VPN (this is routed so that in can only access the internet through
Proton VPN, which runs on the router.  It’s also exported to the
wired network with a tagged vlan, that I can access from a vpn-only
virtual machine on my desktop.  I don’t use it for much but
it was a fun diversion / good proof of concept.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ipv6-only (with native ipv6 connectivity, and only that.  I don’t
use it for anything but it was educational setting it up.)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I invested in these to prepare for a future when routers might get
more locked down and I need to be more self-sufficient.&lt;/p&gt;
&lt;p&gt;One future goal is to give my home two public IP addresses: one for my
home’s outgoing traffic, one for incoming web traffic.&lt;/p&gt;
&lt;p&gt;I have a &lt;a class="reference external" href="https://mikrotik.com/product/rb5009upr_s_in"&gt;RB5009&lt;/a&gt; and
&lt;a class="reference external" href="https://mikrotik.com/product/cap_ax"&gt;cAP ax&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="phone"&gt;
&lt;h2&gt;Phone&lt;/h2&gt;
&lt;p&gt;I have a &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Fairphone_5"&gt;Fairphone 5&lt;/a&gt;
running the stock OS.  This is at least a European company and doesn’t
forcibly install much extra stuff.  Updates come a bit slow, but the
hardware seems perfectly suitable for my uses.&lt;/p&gt;
&lt;p&gt;For a travel phone I installed e/OS on an old Pixel 3a.  e/OS seems
like it worked well and is an option for my main phone if I ever
needed to get away from Google.&lt;/p&gt;
&lt;p&gt;To talk to people I only use
&lt;a class="reference external" href="https://en.wikipedia.org/wiki/Signal_(software)"&gt;Signal&lt;/a&gt;.  Yes, it is
US-based but it is run by a nonprofit and has the right balance of
usability and security.  If this ever goes down, I will have Nextcloud
Talk (self-hosted) (the chat function) that I can use for the people
closest to me, even from phones.&lt;/p&gt;
&lt;p&gt;I’d want to improve phone stuff later, but it hasn’t been a focus so
far.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="todo"&gt;
&lt;h2&gt;ToDo&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;I need a better backup solution.  The best I am thinking is some
client-side encrypted backup to a public cloud cold storage object
storage.  Backups and disaster recovery (or lack thereof) is a major
risk when people try to self-host things.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
</content>
    <link href="https://rkd.zgib.net/blog/2026/digital-sovereignty-actions/"/>
    <summary>Digital sovereignty refers to owning or having control over your data
and digital services.  This post talks about what I do.</summary>
    <published>2026-06-17T00:00:00+00:00</published>
  </entry>
  <entry>
    <id>https://rkd.zgib.net/blog/2026/debian-read-only-root/</id>
    <title>Notes on Debian with a read-only root</title>
    <updated>2026-04-12T00:00:00+00:00</updated>
    <author>
      <name>Richard Darst</name>
    </author>
    <content type="html">&lt;section id="notes-on-debian-with-a-read-only-root"&gt;

&lt;p&gt;I run several Raspberry Pis for home servers.  They currently use SD
cards for their root filesystems (the actual data is stored either on
USB disks on NVMe disks), and I wanted a way to preserve the life of
the SD cards.  Can I make them more like an appliance, that just works
and only rarely gets updates, rather than a normal server that’s
always writing to disk.&lt;/p&gt;
&lt;p&gt;This was tested with Debian 13.4 but probably works even for much
older.&lt;/p&gt;
&lt;section id="the-basics"&gt;
&lt;h2&gt;The basics&lt;/h2&gt;
&lt;p&gt;Basically, add &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;ro&lt;/span&gt;&lt;/code&gt; to the mount options for &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/&lt;/span&gt;&lt;/code&gt; in &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/etc/fstab&lt;/span&gt;&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;PARTUUID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="n"&gt;ad6db44&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;02&lt;/span&gt;  &lt;span class="o"&gt;/&lt;/span&gt;   &lt;span class="n"&gt;ext4&lt;/span&gt;    &lt;span class="n"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;discard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;noatime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;ro&lt;/span&gt;    &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This worked enough for the computer to boot and me to ssh to it, and
my feeling is it’s hard to get locked out enough that you can’t ssh to it.&lt;/p&gt;
&lt;p&gt;When you need to go to read-write mode, you can &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;mount&lt;/span&gt; &lt;span class="pre"&gt;-o&lt;/span&gt; &lt;span class="pre"&gt;remount,rw&lt;/span&gt;
&lt;span class="pre"&gt;/&lt;/span&gt;&lt;/code&gt;, do what you need (package upgrades, etc.), and then reboot (or
you can try to remount to ro, but it might not work if some files are
open rw).&lt;/p&gt;
&lt;/section&gt;
&lt;section id="stuff-that-automatically-works"&gt;
&lt;h2&gt;Stuff that automatically works&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;The following are automatically mounted as tmpfs by default (among
other things)
* &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/tmp&lt;/span&gt;&lt;/code&gt;
* &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/run&lt;/span&gt;&lt;/code&gt;
* &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/run/lock&lt;/span&gt;&lt;/code&gt;
* &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/var/run&lt;/span&gt;&lt;/code&gt;
* &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/dev/shm&lt;/span&gt;&lt;/code&gt;
* &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/run/user/0&lt;/span&gt;&lt;/code&gt; (per-user tmp)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What is also already set up on a Debian system:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/etc/mtab&lt;/span&gt;&lt;/code&gt; (a symlink to &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/proc/self/mounts&lt;/span&gt;&lt;/code&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;Systemd / journalctl seem to track recent logs in memory, so it just
works as expected (you get logs from the last boot, plus logs that
were written to disk before the logs dir weth read-only).&lt;/p&gt;
&lt;/section&gt;
&lt;section id="things-to-do"&gt;
&lt;h2&gt;Things to do&lt;/h2&gt;
&lt;p&gt;Install &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;resolvconf&lt;/span&gt;&lt;/code&gt; and it will move &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/etc/resolv.conf&lt;/span&gt;&lt;/code&gt; to
&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/run/resolvconf/resolv.conf&lt;/span&gt;&lt;/code&gt;.  For certain network tools you need
to configure them, but it seems that for all the default stuff, it
just works.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="samba"&gt;
&lt;h2&gt;Samba&lt;/h2&gt;
&lt;p&gt;A samba server will fail if it can’t open certain directories
read-write.  For some, you can mount a tmpfs there via
&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/etc/fstab&lt;/span&gt;&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;tmpfs&lt;/span&gt;    &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;samba&lt;/span&gt;         &lt;span class="n"&gt;tmpfs&lt;/span&gt;   &lt;span class="n"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="n"&gt;M&lt;/span&gt;   &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="n"&gt;tmpfs&lt;/span&gt;    &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;cache&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;samba&lt;/span&gt;       &lt;span class="n"&gt;tmpfs&lt;/span&gt;   &lt;span class="n"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="n"&gt;M&lt;/span&gt;   &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="n"&gt;tmpfs&lt;/span&gt;    &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lib&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;samba&lt;/span&gt;         &lt;span class="n"&gt;tmpfs&lt;/span&gt;   &lt;span class="n"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="n"&gt;M&lt;/span&gt;   &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="n"&gt;tmpfs&lt;/span&gt;    &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lib&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;samba&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;private&lt;/span&gt; &lt;span class="n"&gt;tmpfs&lt;/span&gt;   &lt;span class="n"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="n"&gt;M&lt;/span&gt;   &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I don’t know if mounting /var/lib/samba will cause problems long-term,
but in my case, where there is no client state needed, it seems to
work.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="nginx"&gt;
&lt;h2&gt;Nginx&lt;/h2&gt;
&lt;p&gt;We need to make it able to open logs.  In &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/etc/fstab&lt;/span&gt;&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;tmpfs&lt;/span&gt;    &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;nginx&lt;/span&gt;          &lt;span class="n"&gt;tmpfs&lt;/span&gt;   &lt;span class="n"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="n"&gt;M&lt;/span&gt;   &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This would need checking to see if we run out of space for the logs,
but hopefully logrotate works frequently enough.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="docker"&gt;
&lt;h2&gt;Docker&lt;/h2&gt;
&lt;p&gt;I have already moved &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/var/lib/docker/&lt;/span&gt;&lt;/code&gt; away from the SD card to a
NVMe disk on the system.  Docker didn’t need anything else, but
containerd needed something mounted to be able to start.  In
&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;/etc/fstab&lt;/span&gt;&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;tmpfs&lt;/span&gt;    &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lib&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;containerd&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;    &lt;span class="n"&gt;tmpfs&lt;/span&gt;   &lt;span class="n"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="n"&gt;M&lt;/span&gt;   &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/section&gt;
&lt;/section&gt;
</content>
    <link href="https://rkd.zgib.net/blog/2026/debian-read-only-root/"/>
    <summary>I run several Raspberry Pis for home servers.  They currently use SD
cards for their root filesystems (the actual data is stored either on
USB disks on NVMe disks), and I wanted a way to preserve the life of
the SD cards.  Can I make them more like an appliance, that just works
and only rarely gets updates, rather than a normal server that’s
always writing to disk.</summary>
    <published>2026-04-12T00:00:00+00:00</published>
  </entry>
</feed>
