Home Explore Blog Models CI



nix

src/nix/unix/daemon.md
5fe10fa2db7290a8ee8e219e9ae97612a8934e10c26b768700000003000003df
R""(

# Examples

* Run the daemon:

  ```console
  # nix daemon
  ```

* Run the daemon and listen on standard I/O instead of binding to a UNIX socket:

  ```console
  # nix daemon --stdio
  ```

* Run the daemon and force all connections to be trusted:

  ```console
  # nix daemon --force-trusted
  ```

* Run the daemon and force all connections to be untrusted:

  ```console
  # nix daemon --force-untrusted
  ```

* Run the daemon, listen on standard I/O, and force all connections to use Nix's default trust:

  ```console
  # nix daemon --stdio --default-trust
  ```

# Description

This command runs the Nix daemon, which is a required component in
multi-user Nix installations. It runs build tasks and other
operations on the Nix store on behalf of non-root users. Usually you
don't run the daemon directly; instead it's managed by a service
management framework such as `systemd` on Linux, or `launchctl` on Darwin.

Note that this daemon does not fork into the background.

)""

Chunks
4956d1bf (1st chunk of `src/nix/unix/daemon.md`)
Title: Nix Daemon Command: Examples and Description
Summary
This chunk describes the `nix daemon` command, which runs the essential Nix daemon for multi-user installations. The daemon performs build tasks and manages operations on the Nix store for non-root users. While typically managed by service frameworks like `systemd` or `launchctl`, examples demonstrate direct execution with options such as `--stdio` (listen on standard I/O) and various trust settings (`--force-trusted`, `--force-untrusted`, `--default-trust`). It's noted that the daemon does not fork into the background.