unitd(8)
π 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./configuresettings 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
0on success π - or
1if 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 π
π COPYRIGHT π
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 π₯
- Website:
https://unit.nginx.org - User mailing list:
https://mailman.nginx.org/mailman/listinfo/unit - GitHub:
https://github.com/nginx/unit
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
- (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
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms