Raspberry Pi External Status Lights

Last Updated:

For one of my projects, I wanted some external LED indicators of my Raspberry Pi’s status. I wired up a pair of LEDs with a resistor attached to each. Then, I plugged them into the ground pins and GPIO 13/21.

Device Tree Setup

Next, I altered the /boot/config.txt and appended the following lines:

# activity LED on gpio 21 (physical pin 40)

# "online" indicator LED on GPIO 13 (physical pin 33)
# this one's set to blink in a heartbeat pattern, but could
# be changed trigger on disk activity or stay on.

Other trigger types for gpio-led can be found in this stack overflow post

Full documentation for the device tree overlay setup can be found here: https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/README

Some approaches for a constant status led (ab)use the gpio-poweroff overlay which interrupts proper shutdown procedures, but gpio-led doesn’t.

Pin Naming

The device tree uses gpio pin numbers, not physical pin numbers. I attached + programmed my leds to use GPIO 21 and GPIO 13 since they had close proximity to the ground pins needed for the LEDs.


I 3d-printed a custom faceplate that I could mount inside a standard keystone-sized hole: /3d-prints/keystone-led-indicators. After some leds and some soldering, it looks pretty nice!


On the next restart, the LED on GPIO 21 will perform the functions of the onboard status LED, and the LED on GPIO 13 will activate based on it’s trigger.

Change Log

  • 2021-08-11 - Initial Revision
  • 2021-09-10 - Added links to 3d-printed keystone plate with slots for a pair of leds

Found a typo or technical problem? file an issue!