Running rpi 24/7 - any tips for basic setup

Hi all - hope you don’t think I’m going over old ground. I have been running openhab 1.7/1.8 for over a year now on numerous rpi’s (both 2b and 3). I have experienced uptimes of over 60 days whilst on other occasions, it’s been as low as a couple of days. I know that the rpi is prone to dropping the wifi connection and I have put a watchdog script in a cron job to try and detect loss of wifi and restart it. Conversely, I had an rpi2b go down yesterday which had a physical cat5 cable in it. I’m aware of the potential for sd card corruption but can’t say I’ve encountered it in 12 months x 5 rpi’s. I’ve seen mention of a watchdog to restart openhab if z-wave stalls (and may well implement it) but on a more general point, does anyone have specific tips to keep the basic rpi up for longer - if the rpi just powers down, there’s not a lot any watchdog is going to do about it.
Thanks
Tim

There are actually many topics here about same thing, like mine OH + RPi2 - Move everything away from SD Card
I added USB power bank to eliminate sudden power supply loss. So far I’ve never had problems with Internet(connected over Cable) or z-wave, so I don’t have watchdogs there.
So the only concerning thing for me is SD card.

My only one RPi2 had uptime of 3 months till yesterday, before I restarted it to apply some changes I made

The RPi series are very reliant on a stable power source, make sure the supply you’re using can provide the current that the device needs to use all of it’s peripherals.

I found that by adding the z-stick I was getting stalls and downtime, I switched to a better power supply and have been running for more than a few months on one of them now.

The first and probably most important advice would be: Move away from a wifi connection of the rpi3 and use a cable connection. This is not only related to RPI and OpenHAB, but to any 24/7 capable system with permanent data exchange. Wifi connections are fine for devices primarily used for web browsing etc., but not for “server like” systems. Or have you ever seen a company running any kind of Windows- or Linux-server wifi-based?

Other than that, the RPi3 is a solid device, even more if you go the USB storage way instead of the SD card.

You’re preaching to the converted on that one, Stefan. I much prefer a cable connection but I don’t think I will ever be able to insist on it. Thanks for your input.

I’m running the 5.1v 2.5A PSU from ModMyPi, which I understand should be sufficient for the rpi3.