Nitro: A tiny but flexible init system and process supervisor

59 todsacerdoti 18 8/22/2025, 7:06:29 PM git.vuxu.org ↗

Comments (18)

nine_k · 23m ago
I would like a comparison with runit, which is a very minimal but almost full-fledged init system. I see many similarities: control directories, no declarative dependencies, a similar set of scripts, the same approach to logging. The page mentions runit in passing, and even suggests using the chpst utility from it.

One contrasting feature is parametrized services: several similar processes (like agetty) can be controlled by one service directory; I find it neat.

Another difference is the ability to initiate reboot or shutdown as an action of the same binary (nitroctl).

Also, it's a single binary; runit has several.

imiric · 4m ago
I've gotten used to runit via Void Linux, and while it does the job of an init system, its UI and documentation leave something to be desired. The way logging is configured in particular was an exercise in frustration the last time I tried to set it up for a service.

I wouldn't mind trying something else that is as simple, but has sane defaults, better documentation, and a more intuitive UI.

nine_k · 1m ago
Logging in runit seems simple (I don't remember running into problems), but indeed, the documentation leaves much to be desired. Could be a good thing to contribute to Void Handbook.
stock_toaster · 21m ago
It will be interesting to compare this to dinit[1], which is used by chimera-linux.

Giving the readme a brief scan, it doesn't look like it currently handles service dependencies?

[1]: https://github.com/davmac314/dinit

nine_k · 11m ago
Nitro does not declaratively handle service dependencies, you cannot get a neat graph of them in one command.

You can still request other services to start in your setup script, and expect nitro to wait and retry starting your service when the dependent service is running. To get a nice graph, you can write a simple script using grep. OTOH it's easy to forget to require the shutdown of the dependent services when your service goes down, and there's no way to discover it using a nitro utility.

andrewstuart2 · 25m ago
I'm always torn when I see anything mentioning running an init system in a container. On one hand, I guess it's good that it's designed with that use case in mind. Mainly, though, I've just seen too many overly complicated things attempted (on greenfield even) inside a single container when they should have instead been designed for kubernetes/cloud/whatever-they-run-on directly and more properly decoupled.

It's probably just one of those "people are going to do it anyway" things. But I'm not sure if it's better to "do it better" and risk spreading the problem, or leave people with older solutions that fail harder.

Flux159 · 28m ago
How does this compare to s6? I recently used it to setup an init system in docker containers & was wondering if nitro would be a good alternative (there's a lot of files I had to setup via s6-overlay that wasn't as intuitive as I would've hoped).
nine_k · 17m ago
S6 is way more complex and rich. Nitro or runit would be simpler alternatives; maybe even https://github.com/krallin/tini.
Ericson2314 · 23m ago
If I my plug my friend and colleague's work, https://nixos.org/manual/nixos/unstable/#modular-services has just landed in Nixpkgs.

This will be a game changer for porting to NixOS to new init systems, and even new kernels.

So, it's good time to be experimenting with things like Nitro here!

runako · 22m ago
The name & function overlap with AWS Nitro is severe:

https://docs.aws.amazon.com/whitepapers/latest/security-desi...

lrvick · 24m ago
At Distrust, we wrote a dead simple init system in rust that is used by a few clients in production with security critical enclave use cases.

<500 lines and uses only the rust standard library to make auditing easy.

https://git.distrust.co/public/nit

nine_k · 4m ago
Likely neat (33% larger than nit), but the readme only explains how to build it, not its interface or functioning.
axlee · 24m ago
I'd recommend changing names, nitro is already a semi-popular server engine for node.js https://nitro.build/
nine_k · 20m ago
Any well-known generic word is very likely to already have been used by a bunch of projects, some of them already prominent. By now, the best project name is a pronounceable but unique string, for ease of search engine use. Ironically, "systemd" is a good name in this regard, as are "runit" or even "s6".
lrvick · 15m ago
I use tiny init systems regularly in AWS Nitro Enclaves. Having the enclave and init system both named nitro is not ideal.
nine_k · 8m ago
Dinit, runit, tini -- all avoid the name clash :)
GuinansEyebrows · 29m ago
love to see new init projects. how does it stack up against runit (the last one i really familiarized myself with on void linux)?
kragen · 27m ago
She credits runit and daemontools as inspiration, and it looks extremely similar. I hope that at some point she writes a comparison explaining what Nitro does differently from runit and why.