r/systemd • • 4d ago

Does "OnCalendar" work with user space timers?

3 Upvotes

Hi! I've set up a user space timer. OnUnitActiveSec and OnBootSec work great, and systemctl --user list-timers shows the next timer activation and that it takes "x secs" or whatever.

OnCalendar does not work. It should work, according to the manual, and the internet. But it doesn't work for my user timer. The timer has no "next" date. I tried both *-*-* 00:00:00 and daily (I want it to run daily).

Is this because of some permissions issue with the real time timer? Could I add myself to a group or something? This needs to be a user space process because it's related to the window manager, and there's env configuration that's not on root (of course I could procedurally try to get the vars / sockets, but that's very jank).

If anyone knows anything about this, I would appreciate it!


r/systemd • • 6d ago

Using TPM to decrypt a key file

2 Upvotes

systemd-cryptsetup's man page includes the following section regarding how the key is obtained:

1.If a key file is explicitly configured (via the third column in /etc/crypttab), a key read from it is used. If a PKCS#11 token, FIDO2 token or TPM2 device is configured (using the pkcs11-uri=, fido2-device=, tpm2-device= options) the key is decrypted before use.

So it seems like you can specify both a key file and a TPM and the TPM is then used to decrypt the key file before using it to decrypt the device. This could be the most elegant solution to my question here: https://www.reddit.com/r/systemd/s/JLsoGt93LH

However, I was not able to find any other reference to such a feature or a way to prepare that setup, including in systemd-cryptenroll's man page.

Is my understanding correct? If so, how can I make use of that feature?


r/systemd • • 13d ago

Is there a safe and elegant way to enable and disable systemd-networkd without root privileges?

7 Upvotes

I'd like to have an on/off switch for the network connection on my Waybar.

networkctl requires root permissions to work: is there an secure and elegant way to use it (or something else) without root permissions? I've seen something involving Polkit, is that the right approach?

I know I could use NetworkManager, but I want to save that as a last resort.

If it makes a difference, I use run0; sudo is not even installed on my system.


r/systemd • • 13d ago

systemd developers explain how Rust will be used: standalone components only, core libraries stay in C

Thumbnail
amutable.com
10 Upvotes

r/systemd • • 25d ago

Enroll TPM together with a removable device

4 Upvotes

I want to make my disk's decryption depend on a removable device as an extra defense in case someone sees my password. But I also want it to depend on the TPM to protect me from evil maid attacks.

Is there a way to do it with systemd-cryptenroll or other standard tools?


r/systemd • • 26d ago

Don't Understand Why

2 Upvotes

Hi guys. Why do I not see for example shutdown.target or reboot.target in the svg from system-analyze plot > system.svg? How are these targets different to the targets that are in that svg?


r/systemd • • Oct 20 '26

Run XDG Desktop Entry Applications as a fully customized Systemd unit

5 Upvotes

In a previous post I presented the Tomloader project which helps generating and managing several systemd units that share fields collected in groups. In the last release the subcommand sd-xdg-v0.3 has been introduced in order to execute XDG Desktop Entry Applications and Actions or using them to open files. For example:

tomloader sd-xdg-v0.3 --open-file Document.doc /usr/share/applications/libreoffice-writer.desktop

uses the default application in libreoffice-writer.desktop to open Document.doc as a systemd user unit. The full syntax of the subcommand is available at https://loara.codeberg.page/tomloader/tomloader_html/tomloader-sdxdg03-invocation.html while various examples at https://loara.codeberg.page/tomloader/tomloader_html/Quick-reference.html.

However, the main feature of sd-xdg-v0.3 is that the generated systemd user unit can be fully customized by providing a configuration file named xdg-apps.kdl in the Tomloader configuration directory. For example, if you want to limit filesystem access of each XDG Application to the directory $HOME/Boxes/{XDG-APP-ID}/ then your xdg-apps.kdl file will probably look like as follows:

default {
  sd {
    section Unit {
      set Description "${1}"
      add PartOf "graphical-session.target"
      add After "graphical-session.target"
      add Requisite "graphical-session.target"
    }
    section Service {
      set Type exec
      set ExecStart "${0}"
      set Slice "app.slice"
      set RootDirectory "${DIR|HOME}/Boxes/${2}"
      add BindReadOnlyPaths "/bin" "/usr/bin" "/usr/lib"
    }
  }
}

You can found additional information about the syntax of xdg-apps.kdl at https://loara.codeberg.page/tomloader/tomloader_html/XDG-app-configuration.html. For general information about Tomloader see https://loara.codeberg.page/tomloader.


r/systemd • • Oct 20 '26

fork wpa_supplicant

0 Upvotes

How long before systemd forks wpa_supplicant ? 😄

Would make networking more integrated.


r/systemd • • Oct 19 '26

Build systemd with libressl, ended up disable openssl option.

4 Upvotes

I'm rebuilding my LFS systemd (Linux From Scratch) and I swap openssl with libressl along with libre kernel. I just found that systemd seems incompatible with libressl (there is a github issue I saw) and I fail to build it. I ended up disable openssl build option in systemd. What could go wrong with that ? Thanks.


r/systemd • • Oct 15 '26

Mastodon Stories for systemd v262

Thumbnail 0pointer.net
15 Upvotes

r/systemd • • Sep 27 '26

Nspawn comeback: an OCI hub, new images and nspawn 1.0.0

Thumbnail
blog.nspawn.org
15 Upvotes

r/systemd • • Sep 24 '26

systemd-report!!

Thumbnail
amutable.com
13 Upvotes

r/systemd • • Sep 22 '26

Release systemd v262 · systemd/systemd

Thumbnail
github.com
22 Upvotes

r/systemd • • Sep 13 '26

AstrOS; mkosi built, particleOS like hermetic OS

Thumbnail astros-linux.org
13 Upvotes

If you're active on this subreddit, you've probably heard of GNOME, KDE-Linux, and ParticleOS.

In my opinion, the three most modern desktop environments for Linux are GNOME, KDE, and COSMIC. The first two desktops have their OSes built using systemd tools, as described in https://0pointer.net/blog/fitting-everything-together.html, called "particles."

I was always interested in both projects, but then I moved to the beautiful COSMIC desktop, which didn't have a "particle" like GNOME OS and KDE Linux yet.

So, I did it myself; AstrOS

AstrOS has a partitioning layout similar to ParticleOS, with an ESP, two A/B sets of verity-sig verity and /usr, and a LUKS-encrypted root partition. This allows rollbacks and a secure boot chain.

/etc is populated using a mutable systemd-confext, meaning the factory /etc is the base, and user changes are layered on top. This makes it easy for updates to change files in /etc while keeping user changes intact.

A particle should be minimal. At the same time, users want to install software that isn't easily installed in a container / sandbox. That's why there are five extensions that use systemd-sysext: virtualization (libvirt, virt-manager, etc.), Nvidia drivers, Waydroid, gaming (steam, gamescope session), and firewalld.

We use our own custom Secure Boot keys, which can be enrolled either standalone or with Microsoft keys for broader firmware compatibility.

The source code is available at https://code.astros-linux.org/AstrOS, and images are publicly built at https://ci.astros-linux.org/repos/1


r/systemd • • Sep 08 '26

It Starts Upstream: The Kernel

Thumbnail
amutable.com
5 Upvotes

r/systemd • • Sep 03 '26

Building New Secure Foundations

Thumbnail
amutable.com
14 Upvotes

r/systemd • • Sep 02 '26

Marking a one-shot unit as stopped without triggering execstop

5 Upvotes

I've a firewall related systemd unit on many boxes which I need to stop. Unfortunately, the unit has an ExecStop (and reload) action that causes the firewall tables to be flushed. This is undesirable and unfortunately these actions are triggers when the OS updates the firewall package - we're not using the software and would like to disable and remove the service. While I could mark the service as disable and wait for a reboot for it to be marked as inactive so I can remove it, is there a way to mark the service as 'stopped' which doesn't trigger the ExecStop action since once stopped it's safe for our patching system to update the package?


r/systemd • • Jul 29 '26

Getting access to the /tmp of a systemd service with PrivateTmp=yes

Thumbnail utcc.utoronto.ca
17 Upvotes

r/systemd • • Jul 28 '26

Size formats?

1 Upvotes

Is there a man page that explains all the formats I can use for sizes like K, M and G?

Is K the same as 1000 or 1024 B? Is the space in between the number and unit optional?


r/systemd • • Jul 27 '26

Random time every day

1 Upvotes

How can I create a timer that runs every day but randomize the time? It's fine if 2 days run a few minutes apart like 11:59pm on day 1 and 12:01am on day 2. But it always needs to run at least once every calendar day from start midnight to end midnight.

I don't think RandomizedDelaySec works because that can randomize to another day and there can be one calendar day with no run.


r/systemd • • Jul 25 '26

Why I Don't Like systemd (From My Perspective)

0 Upvotes

Before someone replies with "you're just a systemd hater" or "you don't understand Linux," hear me out.

I've used systemd. I've installed distributions that use it. I've debugged it, configured it, written unit files,

and I understand why it exists. I'm not pretending it has no advantages. It clearly solved real problems for

enterprise Linux, desktop integration, dependency management, and service supervision.

But understanding why something exists doesn't automatically mean I have to like its design.

My biggest issue isn't that systemd is "modern."

My biggest issue is that it stopped being an init system a long time ago.

It became an entire operating system framework.

Unix Philosophy

Unix became successful because of one simple idea:

Do one thing. Do it well. Keep components independent.

That philosophy gave us things like:

grep

sed

awk

find

cat

cron

syslog

rc

Every program has a job.

Need another implementation?

Replace it.

Need another logger?

Replace it.

Need another cron daemon?

Replace it.

Need another init?

Replace it.

Everything talks through simple interfaces.

Everything stays modular.

That's literally one of Unix's strongest ideas.

What systemd became

People still say

"systemd is just an init."

No.

That stopped being true years ago.

Look at what systemd now includes.

PID 1

systemctl

journald

logind

networkd

resolved

homed

importd

machined

portable services

timers

automount

socket activation

cgroup management

boot analysis

user sessions

tmpfiles

hostname management

timedate management

•

random seed management

credential management

nspawn containers

That's not "just init."

That's half of userspace.

Every release seems to absorb another responsibility that used to belong to an independent project.

That is exactly what people mean when they call it feature creep.

"But those are separate binaries"

Yes.

People love bringing this up.

"They're separate daemons."

Technically true.

But they're still developed as one project.

Released together.

Designed together.

Documented together.

Versioned together.

Expected to work together.

The ecosystem is tightly coupled.

That's the issue.

If tomorrow I decide

"I don't want journald."

Fine.

•

•

•

Now I need to think about compatibility.

What depends on it?

What assumes logind exists?

What desktop software expects systemd APIs?

Can I replace everything cleanly?

Sometimes yes.

Sometimes no.

That's the problem.

The more software assumes systemd, the less optional it becomes.

PID 1 shouldn't become an operating system

PID 1 is special.

It's literally the first userspace process.

If PID 1 dies...

the system dies.

Because of that, I think PID 1 should stay as small as possible.

It should:

start services

reap zombies

shutdown

reboot

Done.

Nothing else.

The smaller PID 1 is,

the easier it is to audit,

understand,

reason about,

and trust.

The more code,

the more interactions.

The more interactions,

the more edge cases.

The more edge cases,

the more bugs.

Simple.

I'm not saying systemd PID 1 itself contains the entirety of the project's code. It doesn't. But the overall

design philosophy keeps extending the systemd ecosystem into more areas of userspace, and that

complexity matters.

Complexity

People act like complexity doesn't matter.

It absolutely does.

Every new feature means

more code.

Every new daemon means

more maintenance.

Every new dependency means

more interactions.

Every abstraction introduces another layer between you and what's actually happening.

Modern software loves abstraction.

Sometimes that's useful.

Sometimes it's just hiding simple things behind five commands.

Example.

Traditional init:

service sshd start

or

rcctl start sshd

Done.

Simple.

Readable.

Now compare debugging some broken service under a modern systemd setup.

You may end up checking

systemctl status

journalctl

systemd-analyze

list-dependencies

targets

slices

scopes

drop-ins

environment generators

socket activation

Can you learn all of that?

Absolutely.

But should you need all of that just because nginx didn't start?

That's where I disagree.

systemd feels like enterprise software

This is honestly the biggest vibe I get.

It feels designed around

large infrastructure

large deployments

corporate environments

enterprise desktops

huge dependency graphs

lots of automation

lots of abstraction

lots of APIs

If you're Red Hat,

that's amazing.

If you're Google,

great.

If you're managing 20,000 servers,

awesome.

I'm not.

I'm sitting in front of a ThinkPad running OpenBSD because I actually enjoy understanding my system.

I don't want software constantly trying to abstract everything away.

I want to know what's happening.

Journald

Binary logs.

People either love them or hate them.

I understand why structured logging exists.

Metadata.

Searching.

Indexing.

Filtering.

Cool.

But plain text has survived for decades for a reason.

grep

tail

awk

sed

less

Everything already works.

No special tools.

No special APIs.

If my logger writes plain text,

I can inspect it with literally every Unix tool ever created.

That's beautiful.

Lock-in

This is probably my biggest criticism.

People always say

"Just replace systemd."

Okay.

Replace logind.

Now make GNOME happy.

Replace journald.

Now make software expecting journal integration happy.

Replace systemd units.

Now make packages assuming systemd work.

The more Linux software depends on systemd APIs,

the less optional it becomes.

That's classic ecosystem lock-in.

Not because someone forced it.

Because everyone slowly started depending on it.

That's much harder to reverse.

"But it works"

Sure.

Windows works too.

That doesn't automatically mean I like Windows' architecture.

Something can be technically successful

and still not align with my design preferences.

Those aren't contradictory ideas.

My preference

I like systems where I can mentally model the whole boot process.

Kernel starts.

Init starts.

Init starts services.

Services run.

Done.

I don't need my init system to also manage DNS, session tracking, hostname configuration, network

configuration, machine management, portable services, credentials, timers, automounts and half the rest

of userspace.

That's not what I personally want from PID 1 or its surrounding ecosystem.

If you like systemd, that's fine.

It clearly solved problems for many distributions and organizations.

But when people ask why I prefer OpenRC, BSD rc, runit or s6, this is why.

I prefer systems made of small pieces.

Small pieces are easier to understand.

Easier to debug.

Easier to replace.

Easier to audit.

And that's the Unix philosophy that originally made me fall in love with Unix-like operating systems in the

first place.


r/systemd • • Jun 26 '26

Unexpected ordering around remote-cryptsetup.target

3 Upvotes

I have VMs that depend on encrypted volumes to be available when started. So I've added /etc/systemd/system/virtqemud.service.d/override.conf:

[Unit]
After=remote-cryptsetup.target

And when I look at the deps of one of the luks volumes it depends on remote-cryptsetup.target:

# systemctl list-dependencies --reverse 'systemd-cryptsetup@luks\x2dbackup.service'
systemd-cryptsetup@luks\x2dbackup.service
● ├─dev-mapper-luks\x2dbackup.device
● └─remote-cryptsetup.target
○   ├─initrd-root-device.target
○   │ └─initrd.target
●   └─multi-user.target
○     └─graphical.target

But when I look at the boot messages, it seems that remote-cryptsetup.target is reached before luks-backup is available:

Jun 26 05:07:55 systemd[1]: Reached target Local Encrypted Volumes (Pre).
Jun 26 05:07:55 systemd[1]: Reached target Local Encrypted Volumes.
Jun 26 05:08:00 systemd[1]: Reached target Remote Encrypted Volumes.
Jun 26 05:08:00 systemd[1]: Starting Cryptography Setup for luks-backup...
Jun 26 05:08:00 systemd[1]: Starting Cryptography Setup for luks-data1...
Jun 26 05:08:00 systemd[1]: Starting Cryptography Setup for luks-vms_enc...
Jun 26 05:08:39 systemd[1]: Finished Cryptography Setup for luks-vms_enc.
Jun 26 05:08:45 systemd[1]: Finished Cryptography Setup for luks-data1.
Jun 26 05:08:48 systemd[1]: Finished Cryptography Setup for luks-backup.

And so virtqemud is started too early:

Jun 26 05:08:39 systemd[1]: Starting libvirt QEMU daemon...
Jun 26 05:08:39 systemd[1]: Started libvirt QEMU daemon.
Jun 26 05:08:44 virtqemud[3860]: internal error: Failed to autostart VM 'srv-mry01': Cannot access storage file '/dev/mapper/
luks-backup': No such file or directory

Any idea what's going on? systemd-252-67.el9_8.2.alma.1.x86_64


r/systemd • • Jun 26 '26

Lennarts Mastodon Stories for systemd v261

Thumbnail 0pointer.net
9 Upvotes

r/systemd • • Jun 24 '26

Socket-Activation for a Go HTTP service on Linux with systemd

Thumbnail poweruser.blog
3 Upvotes