Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If you have a raspberry on some location and it must run a python script "forever" (a year, maybe two, without me being on location), how often should I reboot it? I know people are keeping them alive for a year+, but I wrote a simple script that can reboot it at given time + raspberry will automatically run the python script on boot.

share|improve this question
Why reboot if you don't need to? There are times when a reboot may be needed system upgrades for example. but if this is not automated I would not reboot. A reboot is not free of the risk that the system will not reboot successfully. – Steve Robillard Jan 6 at 17:39
The one I run 24/7 has an uptime of 67 days right now, which is probably not unusual. I only reboot it for a purpose. As Steve says, why do it without any purpose? – goldilocks Jan 6 at 17:53
In the context of IT support, you presumably mean "in 90%" of problems reboot helps. You would not call up a customer at random and tell them to reboot now just in case ;) – goldilocks Jan 6 at 18:05
24/7 datalogging on Arch, current uptime 260 d. Usually rebooting leads to trouble ;) – Ghanima Jan 6 at 18:57
Just check your logs and other growing files: logrotate will do it. SD cards have a limited lifespan on heavy loaded disk activity, maybe move /root to use external spinning drive. I added a blinking led in sync with cron and a red that lit when disk space is low and other that lit on some security log info, trimmed rsyslog to the min. – fcm Jan 7 at 1:41
up vote 24 down vote accepted

I've got a couple of Pis running my Ham Radio repeater and irrigation system - realistically, I'm rebooting them maybe once every 6 months for security updates or some other "maintenance" reason; but I've not seen issues where a reboot was REQUIRED to "keep things running"

share|improve this answer

In terms of hardware, the only reason you should ever need to reboot an ARMHF-y board is firmware changes, necessary changes to ROM, or possibly new devices that must be present at boot.

For instance, adding a driver or close-to-metal kernel module and a device implementing that driver will probably need a reboot, just to tell the CPU and kernel memory mapper about the change. You can update the Linux kernel without rebooting.

In terms of software, all the major computing environments available for the Pi are *nix-like1, in that they're True Unix™ or in that they use Linux or a Linux derivative and are thus (U)nix-y.

Unix and its derivatives are designed from the bootloader up to userland to be fully scalable, portable and reliable; they were designed for servers that never or almost never undergo a hard reset (aka being fully shut down and cold-booted from scratch), and, to a lesser extent, embedded devices exactly like Raspberry Pis. Consequently, these goals indeed apply on the Pi.

This means in practice, you basically never need to reboot your Pi (or your *nix desktop PC, for that matter).

1Ignoring, for a moment, the Microsoft Windows 10: Internet Of Things Edition for the Pi, which I wish to be a practical joke but isn't.

share|improve this answer
Thank you for your 2c, it helped a lot, I am now sure I will never reboot my PI. – Rok Dolinar Jan 7 at 0:57
Kernel / device modules upgrades are the only likely causes for needing a reboot if the hardware is not changing - and it is getting possible to change modules without restarting these days if I understand things correctly. – SlySven Jan 7 at 2:17
@SlySven you can change modules without a reboot, just don't rely on them being fully properly functional and nondestructive – cat Jan 7 at 2:22
Reboot NTs once a month? How do you come up with that?! – Max Ried Jan 7 at 5:35
@pjc50 Wow, didn't realise there'd been more recent releases for it. While I was wrong about that, I know that Win10 IoT is same core as Win10 and not CE :) – Matthew Steeples Jan 7 at 16:04

With embedded "run forever" systems, periodic reboots are unnecessary. It is common to use a hardware watchdog timer to detect a system hang and reboot. I believe the watchdog timer is more valuable than a periodic reboot (the reboot probably won't work if the system is hung).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.