Fairly new to servers and linux in general but have successfully followed the guide here about how to deploy Python web apps with gunicorn and nginx. However everything in that article is done under a user with sudo privileges which seems risky.

I'd now like to create a service account or user that only has access to whats required to run the app. The idea being that when an http request comes into the server everything required to serve a response is done by an account with the minimum privileges needed to serve the response properly and nothing else. I understand that is good practice? Is there a name for this? If there's a better practice feel free to mention that.

How do I go about doing this and what will I need to give the service account access to based the linked article? Thank you.


After doing a bit more digging came across this useful solution.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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