<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=8184&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / An unofficial Guide to runit on Debian-derived distros (version 2)]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=8184</link>
		<description><![CDATA[The most recent posts in An unofficial Guide to runit on Debian-derived distros (version 2).]]></description>
		<lastBuildDate>Sat, 12 Sep 2026 00:37:03 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: An unofficial Guide to runit on Debian-derived distros (version 2)]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=65485#p65485</link>
			<description><![CDATA[<p>The description of &quot;Documentation&quot; says &quot;How-tos and Tips &amp; Tricks contributed by Devuan users&quot;.</p><p>I&#039;d say it&#039;s a VERY valuable resource and this runit guide is extremely helpful. Thank you @Mercury.</p>]]></description>
			<author><![CDATA[dummy@example.com (greenjeans)]]></author>
			<pubDate>Sat, 12 Sep 2026 00:37:03 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=65485#p65485</guid>
		</item>
		<item>
			<title><![CDATA[Re: An unofficial Guide to runit on Debian-derived distros (version 2)]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=65484#p65484</link>
			<description><![CDATA[<p>The &quot;Guide&quot; is within the category of &quot;Documentation&quot;. Do we need to eliminate that option?</p>]]></description>
			<author><![CDATA[dummy@example.com (golinux)]]></author>
			<pubDate>Fri, 11 Sep 2026 23:00:21 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=65484#p65484</guid>
		</item>
		<item>
			<title><![CDATA[Re: An unofficial Guide to runit on Debian-derived distros (version 2)]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=65483#p65483</link>
			<description><![CDATA[<p>dev1galaxy.org is a &quot;discussion forum&quot;, not a &quot;blog site&quot; ot &quot;wiki&quot;.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Fri, 11 Sep 2026 22:06:17 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=65483#p65483</guid>
		</item>
		<item>
			<title><![CDATA[Re: An unofficial Guide to runit on Debian-derived distros (version 2)]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=65480#p65480</link>
			<description><![CDATA[<p>Reposted with updates because it&#039;s impossible for me to edit <a href="https://dev1galaxy.org/viewtopic.php?id=7802" rel="nofollow">the previous version of this topic</a>.</p><p>Error reports and contributions are welcome.</p>]]></description>
			<author><![CDATA[dummy@example.com (Mercury)]]></author>
			<pubDate>Fri, 11 Sep 2026 21:27:00 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=65480#p65480</guid>
		</item>
		<item>
			<title><![CDATA[An unofficial Guide to runit on Debian-derived distros (version 2)]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=65478#p65478</link>
			<description><![CDATA[<h5>About this guide</h5><p>This guide is intended to describe the behavior, use, and configuration of the runit init system on Debian-descended Linux distributions, including Devuan and its derivatives. It exists because important parts of the official runit documentation are misleadingly incomplete or outright wrong as applied to the version of runit packaged for Debian and its descendants.</p><p>This guide is a best-effort, based on hobbyist-level analysis. It may, and probably does, contain material errors. This guide is current as of 2026, and applies to runit version 2.2.0 and runit-services version 0.10.1 as available in the Debian package repositories. This guide comes with no warranty whatsoever. Copying of this content, in part or in whole, with or without modification, is permitted and encouraged, and no attribution is required. This guide is licensed under the <a href="http://wtfpl.net/txt/copying/" rel="nofollow">WTFPL version 2 or any later version</a>.</p><h5>Directories</h5><p>Runit service files are stored as follows. ( 🔗︎ indicates a symbolic link)</p><p><span class="bbc">/etc/service/</span> 🔗︎ <span class="bbc">/etc/runit/runsvdir/current/</span> 🔗︎ <span class="bbc">/etc/runit/runsvdir/default/</span><br />Contains the currently active (enabled) services. Runit will react immediately to the creation or removal of items here. In a typical installation, most items in this directory will be symbolic links to <span class="bbc">/usr/share/runit/sv.now/</span> or to <span class="bbc">/etc/sv/</span>, but links to services located elsewhere are also possible and will function as long as the service is properly defined at the target</p><p><span class="bbc">/etc/sv/</span><br />Contains installed (but not necessarily enabled) local services. Services installed and managed by the local admin and/or manually converted from other init systems (systemd, sysVinit) should exist here. Enabled services should be the targets of symbolic links in <span class="bbc">/etc/runit/runsvdir/default/</span> (see above)</p><p><span class="bbc">/usr/share/runit/sv.current/</span> 🔗︎ <span class="bbc">/usr/share/runit/sv.now/</span><br />Contains installed (but not necessarily enabled) stock services, that is, those installed by packages and managed automatically. Services existing here are “runtime copies” pulled from <span class="bbc">/usr/share/runit/sv.src/</span> (see below) when certain conditions are met to make them available for use. Enabled services should be the targets of symbolic links in <span class="bbc">/etc/runit/runsvdir/default/</span> (see above)</p><p><span class="bbc">/usr/share/runit/sv.src/</span> 🔗︎ <span class="bbc">/usr/share/runit/sv/</span><br />Contains stock service definitions provided by packages. This directory is an extensive library of items only some of which apply to the current OS configuration. In general, these will never be the targets of symbolic links in <span class="bbc">/etc/runit/runsvdir/default/</span>. When certain conditions are met, indicating that specific services should be enabled, they will be automatically copied to <span class="bbc">/usr/share/runit/sv.now/</span> and the symbolic links in <span class="bbc">/etc/runit/runsvdir/default/</span> will be created to enable them. (See the section “<strong>Service Sync</strong>” below)</p><h5>Service Sync</h5><p>This important behavior lacks official documentation. At boot time, a service sync occurs. </p><p>Services available in <span class="bbc">/usr/share/runit/sv.src/</span> are checked, and if they are applicable to the currently configured OS, they will be synced via a copy operation to <span class="bbc">/usr/share/runit/sv.now/</span> where they are known as “runtime copies” and are considered properly installed. By default, they will then be automatically enabled by creating symbolic links in <span class="bbc">/etc/runit/runsvdir/default/</span> targeting these runtime copies. (See the section “<strong>Service Auto-enable</strong>” below).</p><p>Services are considered applicable if they include a <span class="bbc">/usr/share/runit/sv.src/${servicename}/.meta/bin</span> file containing the name of an executable program present on the current OS configuration. In general, every service definition in <span class="bbc">⋯/sv.src/</span> <em>should</em> contain this file. If the service definition does not contain this file, or -- more likely -- if the executable program referenced by it does not exist, then the service is presumed to be inapplicable and a runtime copy will not be created.</p><p>The sync operation will apply even to services that are already installed, so an updated service definition in <span class="bbc">⋯/sv.src/</span> will automatically propagate to <span class="bbc">⋯/sv.now/</span>.</p><p>Conceptually, this process checks if any service executables actually present on the system have corresponding runit service definitions available and so can be supervised/controlled by runit. If they do, the service definition is copied from the <span class="bbc">⋯/sv.src/</span> library and installed (or updated, as the case may be) as a proper runit service in <span class="bbc">⋯/sv.now/</span>.</p><p>If the service definition in <span class="bbc">/usr/share/runit/sv.src/</span> is removed, there will be no effect on already-installed services in <span class="bbc">⋯/sv.now/</span>. If the executable program referred to by the service <span class="bbc">⋯/.meta/bin</span> file is removed, the runtime copy in <span class="bbc">⋯/sv.now/</span> will not be affected and will remain installed for potential future use. However, the service will be automatically disabled at next boot by removing its symbolic link in <span class="bbc">⋯/default/</span>.</p><p>This process is triggered by the helper script <span class="bbc">/usr/lib/runit/<strong>trigger_sv</strong></span>, which is called directly from runit level 2 (<span class="bbc">/etc/runit/2</span>) at each boot. <span class="bbc">trigger_sv</span> further calls <strong><span class="bbc"><a href="https://manpages.debian.org/-/runit/cpsv.8.en.html" rel="nofollow">cpsv</a></span></strong> which manages the installation of applicable services (that is the selective copy from <span class="bbc">⋯/sv.src/</span> to <span class="bbc">⋯/sv.now/</span>).</p><p>To disable the service sync entirely, create a symbolic link <span class="bbc">/etc/runit/atomic.upgrade</span> to target <span class="bbc">/usr/bin/true</span>. <span class="bbc">trigger_sv</span> will call <span class="bbc">atomic.upgrade</span> preferentially over <span class="bbc">cpsv</span>. By making this a no-op, the entire syncThis method may also be used to link to a script with custom service sync/copy logic that works with a curated list of services or performs more complex operations. Note that <span class="bbc">atomic.upgrade</span> <em>must</em> target an executable file to be effective.</p><h5>Service Auto-enable</h5><p>This important behavior lacks official documentation.</p><p>At each boot, any services located in <span class="bbc">/etc/sv/</span> or in <span class="bbc">/usr/share/runit/sv.now/</span> are automatically enabled, unless they have been <em>explicitly</em> disabled by the local admin.</p><p>The services in those directories are placed under runit supervision/control by creating symbolic links in <span class="bbc">/etc/runit/runsvdir/default/</span> targeting them. (<span class="bbc">⋯/default/</span> is the directory containing enabled services and is actively and continuously monitored by runit during normal operation).</p><p>If the same service name exists in both <span class="bbc">/etc/sv/</span> and <span class="bbc">⋯/sv.now/</span>, the one in <span class="bbc">/etc/sv/</span> will be preferred as the target. This allows the local admin to override package-provided services with locally customized versions.</p><p>If the executable program referred to by the service <span class="bbc">⋯/.meta/bin</span> file (if one exists) is removed, the service will be automatically disabled at next boot by removing its symbolic link in <span class="bbc">⋯/default/</span>. (Conceptually this is a clean-up operation.)</p><p>This process is controlled by the helper script <span class="bbc">/usr/lib/runit/<strong>trigger_sv</strong></span>, which is called directly from runit level 2 (<span class="bbc">/etc/runit/2</span>) at each boot. (<span class="bbc">trigger_sv</span> also calls <strong><span class="bbc">cpsv</span></strong> or <span class="bbc">atomic.upgrade</span> as described in the section “<strong>Service Sync</strong>” above.)</p><p>To override auto-enable behavior for a specific service, create a symbolic link in <span class="bbc">⋯/default/</span>, matching the name of the service with the addition of a leading dot, and remove the regular service link if it exists. For example, to disable the <em>cron</em> service, create the symbolic link <span class="bbc">/etc/runit/runsvdir/default/.cron</span> 🔗︎ <span class="bbc">/usr/share/runit/sv.now/cron</span> and delete the symbolic link <span class="bbc">/etc/runit/runsvdir/default/cron</span> 🔗︎ . These actions can be performed in one command using the <strong><span class="bbc"><a href="https://manpages.debian.org/-/runit/update-service.8.en.html" rel="nofollow">update-service</a></span></strong> utility. See the section “<strong>Disabling and Enabling Services</strong>” below for more details.</p><p>There is no intended configurable way to override auto-enable behavior globally for all services. </p><h5>SysVinit Emulation</h5><p>This important behavior lacks official documentation. </p><p>Runit will automatically start sysVinit services enabled at runlevel 2 (those in <span class="bbc">/etc/rc2.d/</span>), if a runit service with the same name is <em>not</em> installed. The purpose is to maintain a reasonably functional system by using sysVinit services for which runit variants are not available or installed. The emulation logic checks for installed runit services in <span class="bbc">/usr/share/runit/sv.current</span> and <span class="bbc">/etc/sv/</span> and enabled services in <span class="bbc">/etc/service/</span> to determine if a runit service with a matching name exists.</p><p>If both a sysVinit and runit service with the same name exist, the sysVinit service will not be started, regardless of whether the runit service is currently enabled. This means that if the user installs a runit service and disables it, the logic presumes that the user wants the service disabled altogether, and the sysVinit alternative is not desired. If the runit service is enabled, it will be used preferentially over its sysVinit variant.</p><p>This process is controlled by the helper script <span class="bbc">/lib/runit/run_sysv_scripts</span>, which is called directly from runit level 2 (<span class="bbc">/etc/runit/2</span>) at each boot.</p><p>The following files can be used to override the default behavior described above. The files do not require any content. Only their existence is checked by the script logic.</p><p><span class="bbc">/etc/runit/no.emulate.sysv</span><br />This file will disable sysVinit emulation completely.</p><p><span class="bbc">/etc/runit/override-sysv.d/${servicename}.block</span><br />This file, matching the name of the service with the addition of a .block extension, will disable the emulation of that specific sysVinit service in all cases, even if a matching runit service does not exist.</p><p><span class="bbc">/etc/runit/override-sysv.d/${servicename}.sysv</span><br />This file, matching the name of the service with the addition of a .sysv extension, will enable the emulation of that specific sysVinit service in all cases, even if a matching runit service (whether disabled or enabled) exists.</p><p>Note: A bug in runit-services versions 0.10.0 and earlier may cause a sysVinit service to start even when the matching runit service is installed and enabled, and even when a <span class="bbc">.block</span> file is present for that service, which may cause unpredictable or buggy behavior. This has been observed to occur with login managers such as slim, causing login loops. This is caused by faulty script logic in <em>dbus.dep-fixer</em>, included in the runit-services package. This bug <a href="http://&quot;https://salsa.debian.org/debian/runit-services/-/commit/5fef4818c0259e228a1b432a92f6af90e6c5f575" rel="nofollow">was corrected</a> in runit-services version 0.10.1.</p><h5>Disabling and Enabling Services</h5><p>Official runit documentation states that simply deleting the service&#039;s symbolic link within <span class="bbc">/etc/runit/runsvdir/default/</span> will disable the service. However, because of the auto-enable behavior described in the “<strong>Service&#160; Auto-enable</strong>” section, this change will not persist across reboots for any services located in <span class="bbc">/etc/sv/</span> or in <span class="bbc">/usr/share/runit/sv.now/</span> (which together typically comprise almost all runit services). Deleting the link in <span class="bbc">⋯/default/</span> in that case will disable the service only for the current session, and the service will be automatically re-enabled at next boot. </p><p>This does not apply to services located outside those two standard directories.</p><p>The auto-enable behavior will be inhibited by the presence of a symbolic link in <span class="bbc">⋯/default/</span> matching the name of the service with the addition of a leading dot. For example, <span class="bbc">/etc/runit/runsvdir/default/.cron</span> 🔗︎&#160; will disable the cron service, and this effect will persist across reboots. Note that this file <em>must</em> be a valid symbolic link, and its target <em>must</em> be a directory to have the proper effect. Typically, the link targets the directory of the disabled service, but this is not strictly necessary, and linking to an empty dummy directory may be used to pre-emptively disable (or “blacklist”) a service before it is installed.</p><p>Runit will not start any service only linked by a dotfile in <span class="bbc">⋯/default/</span>, but if (for whatever reason) both a dotfile <em>and</em> regular symbolic link for a particular service exist there, then that service <em>will</em> start. Such a situation is typically the result of an error and may be regarded as a misconfiguration.</p><p>In general, directly adding, removing, or modifying the links in <span class="bbc">/etc/runit/runsvdir/default/</span> is not recommended. Debian-packaged runit provides the <strong><span class="bbc"><a href="https://manpages.debian.org/-/runit/update-service.8.en.html" rel="nofollow">update-service</a></span></strong> command-line utility to manage services. This utility will manage symbolic links in <span class="bbc">⋯/default/</span> and make other changes to persist service status. </p><p><strong>Quick reference:</strong></p><p>To enable/disable a service:<br /><span class="bbc">update-service --add <em>service-directory</em></span><br /><span class="bbc">update-service --remove <em>service-directory</em></span><br />These commands will, respectively, add and remove a service from runit supervision. This is accomplished by the creation and deletion of the appropriate symbolic links in <span class="bbc">/etc/runit/runsvdir/default/</span>, as described above.</p><p>To set default service state:<br /><span class="bbc">update-service --auto <em>service-directory</em></span><br /><span class="bbc">update-service --noauto <em>service-directory</em></span><br />These commands will set the service to, respectively, started (“up”) and stopped (“down”) at system boot. By default any installed services are automatically started at boot time unless they have been marked not to be. This is accomplished by placing a <span class="bbc">down</span> file within the service directory. The existence of this file indicates to runit that the service should not be auto-started at boot.</p><p>In any of the above commands, <span class="bbc"><em>service-directory</em></span> may be the full path to the service or only the basename (final part of the path; typically equal to the name of the service). In the latter case, the directories <span class="bbc">/etc/sv/</span> and <span class="bbc">/usr/share/runit/sv.now/</span> are searched, in that order, for the service, and the command is applied to the first one found.</p><p>See the <a href="https://manpages.debian.org/-/runit/update-service.8.en.html" rel="nofollow">manual page</a> for more information.</p><h5>Tips and Tricks</h5><p>• To increase runit logging verbosity, create the file <span class="bbc">/etc/runit/verbose</span>. This file does not require any content. Only its existence is checked. Runit logs its boot-time output to <span class="bbc">/var/log/boot</span>.</p><p>• To list all enabled runit services <em>and</em> their paths, use this command:<br /><span class="bbc">for svc in $(update-service --list); do update-service --list $svc; done</span><br />There is currently no way to get this output from a single invocation of <span class="bbc">update-service</span>, so the for-loop is necessary.</p><p>[More content to be added]</p>]]></description>
			<author><![CDATA[dummy@example.com (Mercury)]]></author>
			<pubDate>Fri, 11 Sep 2026 21:23:18 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=65478#p65478</guid>
		</item>
	</channel>
</rss>
