jdx/mise · error
bootstrap service '{name}' sets {}, which only applies to `s
Error message
bootstrap service '{name}' sets {}, which only applies to `scope = "user"` services What it means
mise validates bootstrap (systemd) service declarations at config-load time. Fields returned by `user_only_fields()` (such as restart/WakeSystem-ish options) are only meaningful for `scope = "user"` services, so if a `scope = "system"` service sets them, compose_system_declarations rejects the config with this message listing the offending fields.
Source
Thrown at src/system/services_common.rs:208
.insert(source.clone());
}
}
}
/// The system-scope entries of `[bootstrap.services]`, validated: fields that
/// only apply to user services are rejected here so a typo in `scope` cannot
/// silently turn a user service into a lookup of a system unit.
pub(crate) fn compose_system_declarations(
config: &Config,
) -> Result<IndexMap<String, (ServiceTomlConfig, ResourceOrigin)>> {
let mut out = IndexMap::new();
for (name, (declaration, origin)) in compose_declarations(config)? {
if declaration.scope() != ServiceScope::System {
continue;
}
let user_only = declaration.user_only_fields();
if !user_only.is_empty() {
bail!(
"bootstrap service '{name}' sets {}, which only applies to `scope = \"user\"` services",
user_only.join(", ")
);
}
out.insert(name, (declaration, origin));
}
Ok(out)
}
/// The user-scope entries of `[bootstrap.services]`.
pub(crate) fn compose_user_declarations(
config: &Config,
) -> Result<IndexMap<String, (ServiceTomlConfig, ResourceOrigin)>> {
Ok(compose_declarations(config)?
.into_iter()
.filter(|(_, (declaration, _))| declaration.scope() == ServiceScope::User)
.collect())
}View on GitHub (pinned to afd2eddd3a)
Solutions
- Remove the listed user-only fields from the system-scope service declaration
- Change the service to `scope = "user"` if you actually need those fields
- Consult mise bootstrap service docs for which fields are valid per scope
Example fix
// before [bootstrap_services.myapp] scope = "system" foo_only_for_user = true // after [bootstrap_services.myapp] scope = "system"
Defensive patterns
Strategy: validation
Validate before calling
if decl.scope() == ServiceScope::System && !decl.user_only_fields().is_empty() {
eprintln!("move user-only fields out of system service: {:?}", decl.user_only_fields());
} Prevention
- Keep user-only options only in `scope = "user"` service blocks
- Validate config with mise before committing it (e.g. `mise config ls` / doctor)
- Copy service examples from docs matching the intended scope
When it happens
Trigger: A `[bootstrap_services.<name>]` (or equivalent config) block with `scope = "system"` (or omitted, defaulting to system) that also sets a user-only field; raised from compose_system_declarations during prepare_requests_from_config or reject_configured.
Common situations: Copying a user-scope service example and changing the scope to system without removing user-only fields; typos where a field intended for user services lands in the system service block.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- bootstrap service '{name}' cannot be both masked and running
- bootstrap service '{name}' cannot be both masked and enabled
- managed path '{}' notifies user-scope bootstrap service '{}'
- managed path '{}' notifies unconfigured bootstrap service '{
- user service name '{name}' must contain only letters, number
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/d956527681cb36a8.
Report an issue: GitHub.