Score:0

Best practices for setting up Linux "service" user

us flag

I've set up a server running Ubuntu to host a backend based on Node and MongoDB with Nginx as reverse proxy. When I first logged into the machine I was root, and without thinking too much that's the account I used for setting everything up. Beginners mistake I guess. Going into production running everything as root seems like a bad idea, but I can't find any good articles describing how to set up an account and making sure it starts the services I need after reboot, what access the account will need etc. Any tips?

in flag
How come you did this at root in the first place? The default installation of Ubuntu has root disabled and creates a user that has sudo-privileges. This is already a very good configuration. The installation of Node, MongoDB and and NginX (via apt) creates service users and systemd services for automatic start of the services. There should be nothing left to do.
Martin Gunnarsson avatar
us flag
It's a Digital Ocean Droplet, and when you access it through their web console after creation I believe you are root by default. I know it wasn't the right thing to do and that's why I want to set things right now.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.