Posts: 9
Joined: Wed Mar 07, 2012 8:41 am

RPIzW Stretch 24/7 running

Thu Dec 27, 2018 10:27 pm

I'm running a Raspberry Pi Zero W 24/7 as a headless server - no screen, mouse or keyboard access. I'm using the latest cut of Stretch. It connects to the internet via wifi - doesn't need bluetooth.

What services can I drop from systemctl to get this as lean as possible? secondly, what's the best to drop services? systemctl disable? mask? other?

Trying to get a smooth reliable server - that can be rebooted back to an up and running state quickly & reliably.


Posts: 1707
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: RPIzW Stretch 24/7 running

Fri Dec 28, 2018 12:57 am

just dont start services your not employing.

whats currently configured to start up?

a little googleing should reveal whats what if you dont recognise the daemons running

fwiw my own headless pi-0-w server runs the full desktop version of stretch not the lite version, and hosts a mqtt broker web server docker and a couple of servers as well as node red.. its not slow restarting imho.. but i rarely use its resources directly beyond the odd terminal session to update and a couple of the hosted web interfaces.

Posts: 151
Joined: Mon Jul 31, 2017 10:02 am

Re: RPIzW Stretch 24/7 running

Mon Dec 31, 2018 5:36 am

Assuming that you are actually running "lite" not the desktop version, there really isn't much to turn off. Maybe avahi if that's running.

Add "dtoverlay=pi3-disable-bt" to your /boot/config.txt to make sure bluetooth is disabled. Yes "pi3" on the zero.

Posts: 574
Joined: Wed Sep 25, 2013 8:43 am
Location: Canterbury, Kent, UK

Re: RPIzW Stretch 24/7 running

Thu Jan 03, 2019 1:28 pm


You didn't mention what you intended running, however I would echo what BeauSlim said, there is not a lot of fat that I have found in the lite image.

I have a ZeroW running Apache, its crude I know but a reboot took about 50 seconds until SSH was back up…

Code: Select all

13:21:31.756 The SSH2 session has terminated with error. 
13:22:19.971 Connection established.
HTOP shows me using about 60Mb Ram, with me connected...

I have had a play around with this in the past, could be handy for you

Posts: 9
Joined: Wed Mar 07, 2012 8:41 am

Re: RPIzW Stretch 24/7 running

Mon Jan 21, 2019 5:54 pm

I’m running a number of continuously running python scripts doing various tasks.

Thank you for the feedback - this is very reassuring.

Return to “Advanced users”