Support

Changing the server account for RStudio Server

Follow

The user account that RStudio Server runs under in the normal course of operations is rstudio-server. This account is automatically added to the system during installation and is created as a system rather than end user account (i.e. the --system flag is passed to useradd).

You can configure RStudio Server so that it will run from a different system account with the following steps:

  1. Create a system user if one doesn't already exist
  2. Assign this user to the server-user option in the /etc/rstudio/rserver.conf configuration file
  3. Delete the files /var/log/rstudio-server and /var/lib/rstudio-server
  4. Restart RStudio Server rstudio-server restart

Once completed, you will see that rstudio-server now runs as the new user. For example, if your new user was called myuser you would run the following commands:

sudo useradd --system myuser
sudo echo 'server-user=myuser' >> /etc/rstudio/rserver.conf
sudo rm -rf /var/log/rstudio-server
sudo rm -rf /var/lib/rstudio-server
sudo rstudio-server restart
ps aux | grep myuser

Keep in mind that management tasks performed using the rstudio-server utility will stay the same even when you change the RStudio Server system account. The rstudio-server utility enables the stopping, starting, and restarting of the server as well as many other management functions.

Have more questions? Submit a request

Comments

Powered by Zendesk