Partoska Laboratory
$ dpalv1.3.2

Daemon Pal

A tiny process supervisor for macOS and Linux. Keep your servers, workers, and scripts running, and restart them when they exit. No root, no dependencies, one binary.

Process SupervisorUser-SpaceOpen Source (MIT)Runs on Raspberry Pi
dpal — terminal

# Install with npm (or Homebrew, .deb, .rpm).

$ npm install -g @partoska/dpal

# Start the control process.

$ dpal -C &

# Add a process to supervise.

$ dpal -c /usr/bin/python3 -m http.server 8080

# Start it and check its state.

$ dpal -s python3
$ dpal -l -a

Why Daemon Pal?

Small and Dependency-Free

One C99 binary that needs nothing but the standard C library. It fits just as well on a Raspberry Pi Zero as on a build server.

Runs in User Space

No root and no system service files. Daemon Pal works next to systemd or launchd without touching them.

Restarts on Exit

When a supervised process exits, Daemon Pal starts it again. Set a restart delay per process so a failing service does not loop.

Plain INI Configuration

Define processes with arguments, environment variables, restart delays, and log rotation in a readable INI file. Import, export, and persist the list at any time.

Isolated Working Directories

Each control process owns its own working directory. Run one per project and control each one separately with -D.

Ready for AI Agents

Daemon Pal ships with an agent skill, so AI coding assistants can install it and manage your processes for you.

Get the Daemon Pal skill

One Binary, Two Modes

The same dpal binary runs as a long-lived control process or as a short-lived command executor. You start the control process once, then send it commands.

Control Process

The daemon that owns your processes. It starts them, watches them, restarts them when they exit, and writes their logs.

$ dpal -C -a &

Command Executor

A short-lived client that sends one command to the running control process: list, start, stop, restart, add, delete, import, or export.

$ dpal -r web

Quick Start

Go from install to a supervised process in five steps. The example serves the current directory over HTTP with Python.

  1. Install dpal

    Install the CLI and check the version. Prefer Homebrew or a native package? See the install options.

    $ npm install -g @partoska/dpal
    $ dpal -v
  2. Start the control process

    Run the daemon in the background. It stores its state in $DPAL_HOME, or ~/.dpal when the variable is not set.

    $ dpal -C &
  3. Add a process

    Give the executable path and its arguments. The process is named after the executable, here python3.

    $ dpal -c /usr/bin/python3 -m http.server 8080
  4. Start it and check

    Start the process by name or ID, then list all processes with their IDs and states.

    $ dpal -s python3
    $ dpal -l -a
  5. Keep or shut down

    Persist the list so it loads again on the next start, or stop the control process and every process it supervises.

    $ dpal -p
    $ dpal -k

Examples

Describe your processes in an INI file, then load it and start everything in one command. Put comments on their own lines.

ecosystem.ini
; Each [section] is one process, named after the section.[web]Id=1App=/usr/bin/nodeDir=/srv/web; First Arg is argv[0], then one Arg per argument.Arg=nodeArg=server.jsEnv=(Name=PORT,Value=8080)Env=(Name=NODE_ENV,Value=production); Wait 5 seconds before restarting after an exit.RestartSec=5; Rotate the log at 10 MB and keep 3 old files.LogMaxSize=10485760LogRotation=3 [worker]Id=2App=/usr/bin/python3Dir=/srv/workerArg=python3Arg=worker.pyRestartSec=10
$ dpal -C -i ecosystem.ini -a &
$ dpal -l -a

More options are in the documentation.

Install

Pick the method that fits your system. Every option installs the same dpal binary.

$ brew install partoska/tap/dpal

For macOS and Linux on x64 and ARM64.

Commands use the latest version, 1.3.2. See the release page for all files and SHA256 checksums.

Command Reference

Run one command per call. You can target processes by name or ID, or use -a for all of them. Run dpal -h for the built-in help.

Control process

-C, --control
Start the control process.
-D, --dir
Use this working directory.
-i, --ini
Load processes from an INI file.
-a, --auto-start
Start every loaded process.
-f, --force
Start or run even if the working directory is locked.

Command executor

-l, --list
List processes.
-s, --start
Start processes.
-t, --stop
Stop processes with SIGTERM.
-r, --restart
Stop and start processes again.
-c, --create
Add a process from an executable and its arguments.
-d, --delete
Remove processes from the list.
-i, --import
Import processes from an INI file.
-e, --export
Export processes to an INI file.
-p, --persist
Save the list so it loads on the next start.
-k, --kill
Stop the control process and all its processes.
-a, --all
Apply the command to all processes.

Use Cases

Servers and Devices

  • →Keep services running on a Raspberry Pi or other small device.
  • →Supervise web apps and workers on a server without root access.
  • →A lightweight alternative to systemd units for user-owned processes.

Development and Automation

  • →Start your whole local stack (API, workers, watchers) with one command.
  • →Separate process groups per project with their own working directories.
  • →Let an AI coding assistant start, stop, and restart your dev servers.

Technical Specifications

LanguageC99
LicenseMIT
Version1.3.2
PlatformmacOS 11+, Linux (x64, ARM64, ARMv6+)
DependenciesStandard C library
Build SystemCMake 3.13+

Keep your processes running.

Install Daemon Pal in one command and supervise your first process in under a minute.

View the source on GitHub, get the package on npm, read the documentation, or add the AI agent skill.