NUT.CONF(5)
π NUT.CONF(5) π β like, the NUT Manual, but make it make sense
okay so bestie, welcome to nut.conf β the glow-up file that tries to standardize all the chaotic config files floating around different installs. we're talking /etc/default/nut on Debian-based systems and /etc/sysconfig/ups on RedHat-based systems. it's giving "can we please all agree on one thing" energy. π
An init (or service method) script provided by an OS distribution should source this file in order to determine which components have to be started; it may also be consulted by nutshutdown integration hook script and others. so yeah, this file is basically the group chat moderator for your UPS setup. π
Blank lines are ignored. Lines with a hash (#) character at the first position of the line are ignored, too. They can be used to add comments. so go ahead, leave your little notes, we love a documented vibe. β¨
π¨ IMPORTANT NOTES π¨ (read these, fr fr)
- This file is intended to be sourced by shell scripts as well as by service management frameworks like
systemdon Linux:- There is no guaranteed
export VAR=VALsyntax. so don't come crying to me when your export doesn't export. π - No guaranteed expansion of variables like
VAR1="$VAR2-something"β only verbatim assignments. like, it's not gonna do the math for you, bestie. π - You may need to
export VARwhen sourcing it into init-scripts or other scripts, for eventual propagation of certain settings to NUT programs. Not-exported variables can only be consumed by the script which "sourced" the file (and may choose to export them independently). so if you want your fave settings to travel, you gotta send them out properly. π«Ά
- There is no guaranteed
- You MUST NOT use spaces around the equal sign! like,
MODE = standaloneis a no.MODE=standaloneis the vibe. periodt. β - Practical support for this file and its settings currently varies between different OS packages and NUT sample scripts, but should converge over time. so it's a little messy rn, but we're working on it. π
- Contents of this file should be pure ASCII (character codes not in range would be ignored with a warning message). so no fancy unicode emoji in the config file itself, save those for the group chat. π
Refer to the EXAMPLE section for illustrations. (yes, there's a whole example down there, keep scrolling babe.)
β¨ DIRECTIVES β¨ (the actual settings, slay)
MODEβ Required. Recognized values arenone,standalone,netserverandnetclient. Defaults tonone. this is like the main character of the file, you gotta pick one. πnoneβ Indicates that NUT should not get started automatically, possibly because it is not configured or that an Integrated Power Management or some external system, is used to startup the NUT components. basically "don't start nothin', we're chillin'." π΄standaloneβ Addresses a local only configuration, with 1 UPS protecting the local system. This implies to start the 3 NUT layers (driver,upsdandupsmon), with the related configuration files. This mode can also address UPS redundancy. so it's like a solo mission but with backup. πͺnetserverβ Like thestandaloneconfiguration, but also possibly need one or more specificLISTENdirective(s) inupsd.conf. Since thisMODEis open to the network, a special care should be applied to security concerns. so like, you're serving the network now, bestie β lock your doors. πnetclientβ When onlyupsmonis required, possibly because there are other hosts that are more closely attached to the UPS, theMODEshould be set tonetclient. you're just here for the updates, not the whole party. π
ALLOW_NO_DEVICEβ Optional, defaults tofalse. Set this totrueto allow starting theupsdNUT data server service even ifups.confhas no device sections configured at the moment. This environment variable overrides the built-in "false" flag value in theupsdprogram, and an optional same-named default flag that can be set inupsd.conf. If you want a data server always running and responding on the network, even if it initially has nothing to serve (may be live-reloaded later, when devices become configured), this option is for you. like, it's the "open for business even if the shelves are empty" setting. πͺALLOW_NOT_ALL_LISTENERSβ Optional, defaults tofalse. Set this totrueto allow starting theupsdNUT data server even if not allLISTENdirectives can be honoured at the moment. This environment variable overrides the built-in "false" flag in theupsdprogram, and an optional same-named default flag that can be set inupsd.conf. If you want a data server always running, even if it would potentially not serve all clients on every uptime, this option is for you (note you would have to restartupsdto pick up theLISTENed IP address if it appears later). Probably configuringLISTEN *is a better choice in such cases. so like, it's the "we'll figure it out as we go" energy, but maybe just use the wildcard instead. π€·ββοΈUPSD_OPTIONSβ Optional. Setupsdspecific options. Seeupsd(8)for more details. It is ignored whenMODEabove indicates that noupsdshould be running. so don't bother setting this ifupsdisn't invited to the party. πUPSMON_OPTIONSβ Optional. Setupsmonspecific options. Seeupsmon(8)for more details. It is ignored whenMODEabove indicates that noupsmonshould be running. same vibe as above β only relevant ifupsmonis actually doing its thing. πΊPOWEROFF_WAITβ Optional. At the end of an emergency system halt, theupsmonprimary will signal the UPS to switch off. This may fail for a number of reasons. Most notably is the case that mains power returns during the shutdown process. See the section "Power races" in/usr/share/doc/nut/FAQ.txt.gz. The system will wait this long for the UPS to cut power, and then reboot. It should be long enough to exhaust the batteries, in case line power continues to be unavailable. On the other hand, it should not be so long that the system remains offline for an unreasonable amount of time if line power has returned. Seesleep(1)for compatible time syntax. If you specify the time in seconds, use the "s" suffix. so it's like setting a timeout for the UPS to actually cut the power β too short and it might not work, too long and you're waiting forever. π¬
β οΈ Warning β οΈ This workaround might be dangerous under some circumstances. Please read http://bugs.debian.org/358696 for more details. like, fr fr, read the bug report before you go messing with this. π
POWEROFF_QUIETβ Optional, defaults tofalse. This setting controls if the NUT shutdown integration scripts or service units would emit messages about their activity (or lack thereof). By default they may be verbose, to aid in post-mortem troubleshooting via logs or console captures. Set totrueto avoid that trove of information, if you consider it noise. so if you're not about that chatty log life, set this totrueand enjoy the silence. π€«NUT_DEBUG_LEVELβ Optional, defaults to0. This setting controls the default debugging message verbosity passed to NUT daemons. As an environment variable, its priority sits between that ofDEBUG_MINsetting of a driver and the command-line options. so it's like the middle child of debug settings β not the most important, not the least. π§NUT_DEBUG_PIDβ Optionally add current process ID to tags with debug-level identifiers. This may be useful when many NUT daemons write to the same console or log file, such as in containers/plugins for Home Assistant, storage appliances... so when everyone's talking at once, you can tell who said what. π£οΈNUT_DEBUG_PROCNAMEβ Optionally log process name (or however the program chose to identify itself). This may be useful when multiple NUT daemons log into the same file or console, withoutsyslogto prefix the name into each line (e.g. in tests, single init script systems like Home Assistant, etc.) so again, name tags for your logs. π·οΈNUT_DEBUG_SYSLOGβ Optional, unset by default. Normally NUT can (attempt to) use thesyslogor Event Log (WIN32), but the environment variableNUT_DEBUG_SYSLOGallows to bypass it, and perhaps keep the daemons logging tostderr(useful e.g. in NUT Integration Test suite to not pollute the OS logs, or insystemdwherestderrandsyslogboth go into the same journal). Recognized values:stderrβ Disabled andbackground()keepsstderrattachednoneβ Disabled andbackground()detachesstderras usualdefaultβ Not disabledunset/other β Not disabled
so if you're like "please don't touch the system logs," you got options. β¨
NUT_IGNORE_CHECKPROCNAMEβ Optional, defaults tofalse. Normally NUT can (attempt to) verify that the program file name matches the name associated with a running process, when using PID files to send signals. TheNUT_IGNORE_CHECKPROCNAMEboolean toggle allows to quickly skip such verification, in case it causes problems (e.g. NUT programs were renamed and do not match built-in expectations). This environment variable can also be optionally set in init-scripts or service methods forupsd,upsmonand NUT drivers/upsdrvctl. so if you renamed stuff and NUT is like "who dis?", this is your escape hatch. πͺNUT_QUIET_INIT_UPSNOTIFYβ Optional flag to prevent daemons which can notify service management frameworks (such assystemd) about passing their lifecycle milestones, to not report loudly if they could NOT do so (e.g. running on a system without a framework, or misconfigured so they could not report and the OS could eventually restart the false-positively identified "unresponsive" service. Currently such reports, done by default, help troubleshoot service start-up and highlight that NUT sources (or package build) did not take advantage of tighter OS service management framework integration (if one exists, so that developers could focus on adding that). Reasons to set this flag could include platforms without such a framework and not expecting one, although nagging your favourite OS or contributing development to make it better is also a way. so like, if you don't have the framework and don't want the noise, set this. but also, maybe help make it better? just saying. π
πΈ EXAMPLE πΈ (yes, actual code, copy responsibly)
# /etc/nut/nut.conf. See nut.conf(5)
MODE=none
UPSD_OPTIONS=""
UPSMON_OPTIONS=""
# POWEROFF_WAIT=15m
look at that clean little config. we love a minimal moment. π
π¦ INTEGRATION π¦
An init script, such as /etc/init.d/nut, is expected to source this file in order to determine which components have to be started. so yeah, the init script reads this file like it's the group chat pinned message β that's where the instructions live. π
(part 1 done, but we're not signing off β more coming, bestie!)
β¨ SEE ALSO β¨
okay so like, this page doesn't live alone bestie, it's literally in a whole friend group π go read the rest of the squad:
ups.conf(5)β where you actually define your UPS devices πupsd.conf(5)β the daemon config, the server-side icon β¨upsd.users(5)β users and their permissions, gatekeeping done right π₯upsmon.conf(5)β the monitoring side of things, main character energy π
π Internet resources
the NUT (Network UPS Tools) home page is right here, no cap:
https://www.networkupstools.org/historic/v2.8.5/
and that's the whole page, bestie β you ate that π«Ά this one's from Network UPS Tools 2.8.5, dated 06/21/2026 (yes that's the source/version and date footer, consider it your little receipt) πβ¨π
π¦ where this page comes from
- arch rolling: nut 2.8.5-2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms