

#RSTUDIO SERVER CODE#
Note that a user's session will never be suspended while it is running code (only sessions which are idle will be suspended).Īs of RStudio version 1.0 session timeout settings can be customized for individual users or groups. You can change the timeout (including disabling it by specifying a value of 0) using the session-timeout-minutes setting. Session Timeoutsīy default if a user hasn't issued a command for 2 hours RStudio will suspend that user's R session to disk so they are no longer consuming server resources (the next time the user attempts to access the server their session will be restored). These settings are especially useful if you have a large number of potential users and want to make sure that resources are balanced appropriately. There is a separate /etc/rstudio/nf configuration file that enables you to control various aspects of R sessions (note that as with nf this file does not exist by default). For example: auth-required-user-group=rstudio_users

To limit the users who can login to RStudio to the members of a specific group, you use the auth-required-user-group setting. This file does not exist by default so if you wish to specify any of the settings below you should create the file. There are a number of settings which place limits on which users can access RStudio and the amount of resources they can consume. Note again that the server must be restarted for this setting to take effect. For example, if you have two versions of R installed on the server and want to make sure the one at /usr/local/bin/R is used by RStudio then you would use: rsession-which-r=/usr/local/bin/R You can override which version of R is used via the rsession-which-r setting in the server config file. For example: rsession-ld-library-path=/opt/local/lib:/opt/local/someapp/libīy default RStudio Workbench runs against the version of R which is found on the system PATH (using which R). This might be useful for ensuring that packages can locate external library dependencies that aren't installed in the system standard library paths. You can add elements to the default LD_LIBRARY_PATH for R sessions (as determined by the R ldpaths script) by adding an rsession-ld-library-path entry to the server config file. You can do this by entering the following command: $ sudo rstudio-server restart You can modify this behavior using the Note that after editing the /etc/rstudio/nf file you should always restart the server to apply your changes (and validate that your configuration entries were valid). For example: (accepting connections from any remote IP). If you wish to change to another port you should create an /etc/rstudio/nf file (if one doesn't already exist) and add a www-port entry corresponding to the port you want RStudio to listen on. Network Port and AddressĪfter initial installation RStudio accepts connections on port 8787. Note that this command is also automatically executed when starting or restarting the server (those commands will fail if the configuration is not valid). This can be accomplished by executing the following command: $ sudo rstudio-server verify-installation RStudio Workbench (previously RStudio Server Pro) is configured by adding entries to two configuration files (note that these files do not exist by default so you will need to create them if you wish to specify custom settings): /etc/rstudio/nfĪfter editing configuration files you should perform a check to ensure that the entries you specified are valid.
