unitd(8)

πŸ“¦
version 1.36.1 Β· 2 versions
, in alpine 3.24

πŸ’… unitd β€” bestie, this is the NGINX Unit daemon

okay so real talk, this page is from the System Manager's Manual and it's all about unitd(8) β€” the thing that actually runs NGINX Unit for you 🫢


✨ SYNOPSIS ✨

unitd [--no-daemon] [--control socket] [--control-mode mode]
      [--control-user user] [--control-group group] [--group name]
      [--user name] [--log file] [--modulesdir directory] [--pid file]
      [--statedir directory]
unitd [-h | --help | --version]

two whole invocation forms, no cap. first one is the "run it for real" lineup, second one is the "just tell me stuff" lineup πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so NGINX Unit is a polyglot app server, a reverse proxy, and a static file server for UNIX-like systems. like, all three, at once, main character energy honestly πŸ‘‘

and get this β€” it was built by nginx(8) team members from scratch to be super efficient and fully configurable at runtime. from SCRATCH. iconic behavior fr fr ✨


πŸ’– OPTIONS πŸ’–

  • -h, --help β€” shows you a summary of Unit's command-line options plus their compile-time defaults. cute little cheat sheet moment πŸ“‹
  • --version β€” displays Unit's version and the ./configure settings it was built with. like a birth certificate but for your binary 🍼
  • --no-daemon β€” runs Unit in non-daemon mode. no backgrounding, she stays right there with you 🫢
  • --control socket β€” overrides the control API's socket address. takes it in IPv4, IPv6, or UNIX-domain format, so pick your fighter πŸ’…
  • --control-mode mode β€” sets the permission of the UNIX-domain control socket πŸ”
  • --control-user user β€” sets the owner of the UNIX-domain control socket πŸ‘€
  • --control-group group β€” sets the group of the UNIX-domain control socket πŸ‘₯

so here's the tea on the UNIX-domain control socket β˜• on platforms that provide peer credentials (Linux and the BSDs), the control API additionally requires that the connecting peer's effective user ID be either 0 (root) or the user ID unitd runs as. any other local users? rejected before the request is even read πŸ’€

on those builds, the --control-user, --control-group, and --control-mode permissions act as defense-in-depth rather than the sole access control. but where peer credentials are unavailable β€” or for an IP-based control socket β€” those socket permissions (or plain old network reachability) remain the boundary. iykyk 🌈

  • --group name, --user name β€” override the group name and user name used to run Unit's non-privileged processes 🧚
  • --log file β€” overrides the pathname for Unit's log πŸ““
  • --modulesdir directory β€” overrides the directory path for Unit's language modules (*.unit.so) files. yes, exactly that glob, don't @ me 🧩
  • --pid file β€” overrides the pathname for the PID file of Unit's main process πŸ”’
  • --statedir directory β€” overrides the directory path for Unit's state storage πŸ—„οΈ

πŸŽ€ EXIT STATUS πŸŽ€

  • exit status is 0 on success πŸŽ‰
  • or 1 if the daemon encounters an error 😭

that's it. binary. no in-between, she's not ambiguous πŸ’€


🌸 FILES 🌸

  • /run/unit.pid β€” the PID file of Unit's main process πŸ”–
  • /var/log/unit.log β€” a general-purpose log for diagnostics and troubleshooting. when things go sideways, this is your bestie 🩺

πŸ“ SOCKETS πŸ“

  • unix:/run/control.unit.sock β€” the socket address of Unit's control API. that's the doorway to telling her what to do πŸ”Œ

okay this is the whole squad, everyone say thank you πŸ™

  • (C) 2017-2025 NGINX, Inc.
  • (C) 2017-2025 Andrei Zeliankou
  • (C) 2018-2025 Konstantin Pavlov
  • (C) 2021-2025 Zhidao Hong
  • (C) 2022-2025 Andrew Clayton
  • (C) 2022-2025 Liam Crilly
  • (C) 2023-2025 Dan Callahan
  • (C) 2023-2025 Igor Ippolitov
  • (C) 2024-2025 Ava Hahn
  • (C) 2023-2024 Danielle De Leo
  • (C) 2023-2024 Dylan Arbour
  • (C) 2023-2024 Gabor Javorszky
  • (C) 2023-2024 Taryn Musgrave
  • (C) 2021-2023 Alejandro Colomar
  • (C) 2017-2022 Valentin V. Bartenev
  • (C) 2017-2022 Max Romanov
  • (C) 2021-2022 OisΓ­n Canty
  • (C) 2017-2021 Igor Sysoev
  • (C) 2017-2021 Andrei Belov
  • (C) 2019-2021 Tiago Natel de Moura
  • (C) 2019-2020 Axel Duch
  • (C) 2018-2019 Alexander Borisov

SPDX-License-Identifier: Apache-2.0 β€” open source, slay πŸ“œβœ¨


πŸ”₯ SEE ALSO πŸ”₯

go click around, she's got lore πŸ’œ


and that's the page bestie 🫢 this whole thing came to you from NGINX Unit, dated 2023-04-26, sitting pretty at unitd(8) β€” now go start a daemon, you got this πŸ’…βœ¨

πŸ“¦ where this page comes from
  • alpine 3.24: freeunit-doc 1.36.1-r0 Β· Apache-2.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms