Raspberry PI 4B power switch

I am using three Raspberry PI-4B 8GB in my rack. The pi-s are placed into the rack, and from time to time, I need to cold-reboot them (unplugging and re-plugging the power supply). Instead of digging into the rack, I would like to have a front-panel rack mounted on/off switch. Is there any on/off DC switch to be mounted to the front panel?


Hi Anthony,

Welcome to the forum!!

I couldnt find anything thats a panel mount out of the box but this one has proved me good: USB-C In-Line Power Switch Cable for Raspberry Pi 4 Australia
With a 3D print you could make it mount to the front.

Another route could be to make up your own harness with the following switches: Rocker Switch - SPST (round) Australia
Some spade connections: Spade Quick Connector Kit - 6.3mm / 4.8mm / 2.8mm Australia

or combining the two, take the switch apart( it handles all of the fine connections to the USB C ends) and solder/crimp your desired switch in place


What is wrong with a small toggle switch (C&K type ???) on the panel.
Cheers Bob


Thanks Robert, I do love the suggestion as it requires much smaller space on the panel. Due to the simplicity of the power 5.1V it should work very well.

Hi Anthony

5.1V has nothing to do with it. Would be exactly the same if it was 51V.
Cheers Bob


aso if you have a console open use the command line if you puty from another machine

then the need 4 the switch to toggle cold boot


from console for warm reboot also
shutdown works with certain software

sort of sets it in hibernation i`m told but not 100% on that one