VyOS and a Linux supported UPS

How do I configure a UPS to initiate shutdown of VyOS?

I have a UPS device that is fully supported by Network UPS Tools (NUT) how do I set up NUT or something else for VyOS? The vendor provides an up to date .tgz, .rpm, and .deb as well.

I plan to have the UPS directly connected via USB to VyOS.
The VyOS device is a mini PC with an Intel Celeron processor and 4GB of RAM

I’m a home user with a straight forward setup but some of us work from home so I can’t afford to have the router down because of a corrupt filesystem after power loss

IMHO there is no need to perform a clean shutdown of VyOS since its a router/firewall.

There is a theoretical risk of data corruption on open files but @Apachez is right, chances of disk corruption are very low as most processes run in RAM anyway.

Having said that, I totally get that you’d like to have an UPS in front of VyOS. Installing NUT from the .deb package is perfectly possible, see installation manual at 5. Installation instructions. Afterwards configure and you’re done.

Keep in mind that this package+config will cease to exist on VyOS image upgrade. You’ll need to repeat your steps.

Alternatively, you can create your own installation iso with the nut package embedded: Build VyOS — VyOS 1.5.x (circinus) documentation. You’d still have to do the configuration part of course.

Lastly, you could look into running NUT inside a container. Google for “network ups tools docker” and you’ll get loads of hits. VyOS has container support: Container — VyOS 1.5.x (circinus) documentation. Big plus is that this will survive image upgrade.

Good luck.


I run Nut on my NAS and it works well. The NAS is connected to UPS via a USB cable as you mentioned above. Upon detecting a power outage, the NAS will initiate a shutdown command and turn off.

For the router/firewall, agree with @Apachez and @marc_s that the risk is negligible/minimal. But if you go down the path what @marc_s mentioned would work.

Is “nut” the package to go with if we speak about Debian or do there exist other options?


Any suggested config lines that should exist and be included in the feature request for https://vyos.dev ?

Please feel free to update ⚓ T5950 Communicate with UPS for monitoring and clean shutdown (or let me/others know in this thread what you wish to have included).


I think so, it’s supports a wide variety of hardware. I’ll take a look at the docs on potential commands and add them to the link you provided

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.