How can RPi.GPIO be used in a Django app without running the app with root privileges i.e.

sudo python manage.py runserver

  • You could make a custom service to interface between the GPIO and the app. Sep 22, 2015 at 21:40

1 Answer 1


Currently RPi.GPIO has to be run with root priviliges to allow GPIOs access.

There are changes in the pipeline which will remove that need, but those changes might be several weeks away.

  • is there a similar library which does not require root privileges?
    – Jay Karimi
    Sep 2, 2015 at 20:05
  • 1
    @JayKarimi That depends on what you mean by similar. My pigpio Python module does not require that Python be run as root. It works differently, it communicates GPIO requests to a separate daemon which does run as root.
    – joan
    Sep 2, 2015 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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