This is the web page for the Dinit service manager.
Version 0.18.0 now available.
What is it?
Dinit is a service manager / supervision system, which can (on Linux) also function as a system manager and init. It is:
- Portable — written in portable C++ code; compiles and runs on a variety of Unix-likes (Linux, various BSDs).
- Compact — with a reasonable feature set, but a sufficiently limited scope; designed to work with other system components, rather than replace them.
- Robust — written with a focus on being secure and correct.
- Usable — with simple configuration syntax and control commands.
- Well documented — check the extensive manual pages!
- Free and Open Source — distributed under the Apache License version 2.0
Dinit fits in the middle ground between extremely simple supervision suites and the more complex service managers. It aims to be functional and configurable, convenient to use, and easy to understand. You can perhaps get a feel for how it compares to similar software packages by reading the COMPARISON file from the source tree. If you want a more in-depth exploration, check this blog entry.
Dinit works fully (as both a service manager and system manager) on Linux, and as a functional service manager on at least OpenBSD, FreeBSD and MacOS. It should be easily portable to other POSIX(-ish) operating systems. It is available under the Apache License, version 2.0.
The best way to use Dinit is in a distribution which supports it, out-of-the-box:
- Chimera Linux — a Linux distribution based on FreeBSD userland and LLVM
- Artix Linux — a rolling-release distribution based on Arch Linux, offering a choice of init systems including Dinit.
Another option for trying Dinit out quickly is the Alpine Linux Dinit Demo VM image which you can run in QEMU. In this image, Dinit has been retrofitted into a regular Alpine Linux installation.
Otherwise, the best way to get Dinit is currently to compile it from source code. The build requirements are very minimal. Use the Download link to the left (or in this paragraph...). The README.md file in the source tarball is a good starting point for information, and build instructions can be found in BUILD.
Dinit is also available as an OpenBSD package, maintained by E. Barrett. It can be installed using pkg_add dinit. Again, the package may not correspond to the latest version of Dinit.
As a service manager / supervision suite
Start by reading the README.md file, or if that is a bit much, have a look at the Getting Started guide. You should install Dinit first (see the build instructions) so that you can try it out as you read.
The "real" documentation is the man pages. Start with man dinit and then man dinit-service for more details on how to configure services. You can use the dinitcheck utility to check your service configurations.
Use the dinitctl utility to control services; it also has a man page:
Finally, the dinit-monitor utility can be used to run commands (including scripts) when status of a particular service changes:
As a system manager / init
Note: This is currently supported only on Linux.
First, read the above information on how service management works in Dinit. Using it as a system manager involves writing service descriptions for all the various system services.
Check the documentation in the source tree. Be prepared to spend some time on manual configuration and creation of service descriptions, if not using a distribution that supports Dinit out-of-the-box.
As with any open source project, a number of contributors have helped along the way. They have my gratitude.
Artix Linux, and several individual sponsors, have provided a small financial contribution for development of Dinit. They also have my gratitude.