Registry key reference

This page is the reference catalog for everything peinit reads from or writes to the registry: the full service-definition schema with types and defaults, and every key peinit touches outside the service definitions. For the meaning of each item, follow the link in its row; this page is for looking up a type, a default, or a path.

Registry value types #

Service definition fields map onto registry value types as follows:

Schema typeRegistry typeIs
stringREG_SZA UTF-8 string.
multi_stringREG_MULTI_SZAn ordered list of strings.
dwordREG_DWORDA 32-bit unsigned integer.
binaryREG_BINARYA raw byte sequence.
(timestamp)REG_QWORDA 64-bit value — used for timer last-run timestamps.

The service definition schema #

Every service is a key under Machine\System\Services\<name>; these are the values inside it. Only ImagePath is required. Fields are grouped by purpose; for full semantics see Defining a service and the linked pages.

Execution — see The execution environment

FieldTypeDefaultMeaning
ImagePathstring(required)Absolute path to the service binary.
Argumentsmulti_stringCommand-line arguments.
WorkingDirectorystring/Working directory (non-empty absolute path).
TTYPathstringAbsolute path to a terminal to attach as the service's stdio and controlling terminal, e.g. /dev/console or /dev/tty1. Absent or empty means the daemon default (/dev/null stdin, captured output). Attaching a terminal suppresses log capture.
Environmentmulti_stringKEY=VALUE pairs added to the environment.
RuntimeDirectoriesmulti_stringDirectories created directly under /run just before the main process starts, each secured for SYSTEM, Administrators, and the service's own SID.
LimitNOFILEdwordRLIMIT_NOFILE.
LimitCOREdwordRLIMIT_CORE, in bytes.

Type and readiness — see Simple and Oneshot services

FieldTypeDefaultMeaning
Typedword0 (Simple)0 = Simple, 1 = Oneshot.
Readinessdword0 (Notify)0 = Notify (READY=1), 1 = Alive. Ignored for Oneshot.
RemainAfterExitdword0Oneshot only — stay Completed after a successful exit.
SuccessExitCodesmulti_stringNon-zero exit codes treated as success (each 0–255).

Activation — see Triggers and timers

FieldTypeDefaultMeaning
Triggersmulti_stringboot and/or timer:<schedule>. Absent = demand-only.
Disableddword0If 1, triggers must not activate the service.
SafeModedword0If 1, attempt to start in Safe mode. Critical implies SafeMode.
Conditionsmulti_stringStart-time checks; a failure skips the service.
Assertsmulti_stringStart-time checks; a failure fails the service.
PreStartCheckTimeoutdword5Seconds allowed for the helper that evaluates filesystem Conditions/Asserts; if it overruns, it is killed and the check counts as not satisfied (a Condition skips, an Assert fails).
TimerPersistentdword1Catch up a missed timer run after a reboot.
TimerJitterdword0Maximum random delay (seconds) added to each firing.

Identity — see Service identity and privileges

FieldTypeDefaultMeaning
IdentitystringLocalServicePrincipal name or SID for the service token.
RequiredPrivilegesmulti_stringPrivilege allow-list; all others are removed from the token.
HookIdentitystring(service's Identity)Identity for ExecStartPre/ExecStartPost.

Dependencies — see Dependencies and ordering

FieldTypeDefaultMeaning
Requiresmulti_stringHard dependencies.
Wantsmulti_stringSoft dependencies.
BindsTomulti_stringRuntime coupling.
Conflictsmulti_stringMutual exclusion.
OnFailurestringService to start when this one enters Failed.

Supervision and health — see Keeping services running

FieldTypeDefaultMeaning
ErrorControldword0 (Normal)0 = Normal, 1 = Critical (sync + reboot on irrecoverable failure).
RestartPolicydword1 (OnFailure)0 = Never, 1 = OnFailure, 2 = Always.
RestartMaxRetriesdword5Consecutive restarts before Failed.
RestartWindowdword120Seconds of Active health that resets the restart counter.
RestartDelaydword1Backoff base (doubles per failure, capped at 60).
HealthCheckstringPeriodic health-check command.
HealthCheckIntervaldword30Seconds between health checks.
HealthCheckTimeoutdword5Seconds before a check is killed and failed.
HealthCheckRetriesdword3Consecutive failures before unhealthy.
WatchdogTimeoutdword0Seconds between expected WATCHDOG=1 pings; 0 disables.

Transition phases — see The service lifecycle and Controlling services

FieldTypeDefaultMeaning
ExecStartPremulti_stringCommands run before the binary (sequential; any failure aborts start).
ExecStartPostmulti_stringCommands run after readiness / successful exit (failure logged, not fatal).
ExecReloadstring— (SIGHUP)Reload command, or signal:<NAME>.
StartTimeoutdword30Seconds for the whole start sequence.
StopTimeoutdword10Seconds between SIGTERM and SIGKILL.

Notify, fds, security, metadata

FieldTypeDefaultMeaning
NotifyAccessdword0 (Main)Who may send sd_notify (only Main is supported).
FdStoreMaxdword0Max fds in the fd store; 0 disables it.
ServiceSecuritybinaryinherit parentDescriptor controlling who may manage the service.
DisplayNamestringHuman-readable name for status display.
DescriptionstringDescription of the service.

Service definition keys #

KeyTypePurposeSee
Machine\System\Services\(parent key)Parent of all service definitions; each child key is a service.Defining a service
Machine\System\Services\SchemaVersiondwordSchema version guard (currently 1).Defining a service
Machine\System\Services\<name>\LastTimerRunREG_QWORDLast-run timestamp for a single-trigger persistent timer. Written by peinit.Triggers and timers
Machine\System\Services\<name>\TimerState\(subkey)Per-trigger last-run timestamps for multi-trigger services. Each value is named by the percent-encoded schedule string and holds a REG_QWORD.Triggers and timers

Boot configuration #

Under Machine\System\Boot\:

KeyTypeDefaultPurposeSee
MaxParallelStartsdword (> 0)10Maximum services starting concurrently. Missing → default; zero/invalid → Recovery.Boot and boot modes
BootSuccessGracedword30Seconds a Critical service must hold a satisfying state before boot is successful.Boot and boot modes
ShutdownTimeoutdword90Maximum seconds for the whole graceful shutdown.Shutdown
SettleTimeoutdword5Seconds to wait for the boot set to settle before starting boot:settled services anyway.Triggers and timers
PostKillTimeoutdword5Seconds peinit waits for a service cgroup to drain after SIGKILL before treating it as stuck. ShutdownTimeout bounds the shutdown as a whole; this bounds one service's last stage of it.Shutdown

Operational parameters #

Under Machine\System\Init\:

KeyTypeDefaultPurposeSee
ControlSecuritybinarySYSTEM full; Administrators shutdown + reload-configDescriptor for system-level control operations.Who can manage a service
MaxControlConnectionsdword32Maximum concurrent control-socket connections.Controlling services
MaxRequestSizedword65536Maximum control-socket request size (bytes).Controlling services
ConnectionTimeoutdword30Seconds before an idle control connection is closed.Controlling services
MaxLogLineLengthdword8192Maximum bytes per service output line before truncation.Service output and logging
MaxLogBufferPerServicedword65536Maximum bytes buffered per service pipe before back-pressure.Service output and logging
LogReadBytesPerEventdword16384Bytes drained from a service's output pipe per readable event. Larger favours throughput on chatty services, smaller favours fairness between them.Service output and logging
PreEventdBufferdword1048576Total bytes of service output held in memory before eventd is up to receive it. Overflow drops the oldest output; it never blocks a service.Service output and logging
EnvVars\(parent key)emptyDefault environment variables injected into Phase 2 services (value name = variable, REG_SZ data = value). The descriptor here is security-critical.The execution environment
ProvisionedPaths\(parent key)emptyBoot-time path provisioning: each child key names one directory or file that peinit creates and secures after registryd starts and before Phase 2 — the registry-backed equivalent of tmpfiles.d.Boot and boot modes
ProvisionedPaths\<name>\Kindstring(required)directory or file — what to create at Path.Boot and boot modes
ProvisionedPaths\<name>\Pathstring(required)Absolute path to create or verify.Boot and boot modes
ProvisionedPaths\<name>\SecuritybinarySYSTEM + Administrators full, users read/traversePeios file security descriptor to apply to the object.Boot and boot modes
ProvisionedPaths\<name>\Requireddword0If 1, a failure to provision this entry sends boot to Recovery mode before Phase 2 starts.Boot and boot modes

Keys peinit reads from other subsystems #

KeyTypePurposeSee
Machine\System\eventd\LogSocketPathstringPath of eventd's log datagram socket, where peinit forwards service output.Service output and logging

Where to start #

For how these fields combine into a working definition and when changes take effect, read Defining a service.

To look up the meaning, valid range, and effect-timing of any key on a live system, use regman.

Edit this page