Setting up daemontools to run services for an ordinary user
Wed 30 Apr 2025 21:27 CEST
I always forget how to do this, so I’m writing it here in part as a reminder for myself next time I need to do this.
These instructions are for using daemontools
and daemontools-run
packages on Debian.
- Create a directory
/etc/service/tonyg-services
-
Create a file
/etc/service/tonyg-services/run
containing#!/bin/sh exec setuidgid tonyg svscan /home/tonyg/services
Replace
setuidgid
withsudo -u
if you want to preserve supplemental groups. - Run
chmod a+x /etc/service/tonyg-services/run
- Create
/home/tonyg/services
- Create services ad libitum therein.