The RStudio Connect configuration file is
/etc/rstudio-connect/rstudio-connect.gcfg. You will edit this file to properly configure RStudio Connect for your organization.
A configuration management tool like Puppet or Chef can be used to maintain the
rstudio-connect.gcfg file. We recommend that it be owned by
root and have permissions
0600, as your configuration may need to contain passwords and other sensitive information.
Subsequent RStudio Connect installs and upgrades will not overwrite customizations to the
The RStudio Connect server log is located at
/var/log/rstudio-connect.log. This file is owned by
root with permissions
logrotate is available when RStudio Connect is installed, a
logrotate configuration will be installed. The default configuration is to rotate the logfile when it exceeds 10MB. The old log file will be compressed and stored alongside the original log file with a
.1.gz extension (then
.2.gz, etc.). Up to twelve archived log files will be maintained; upon the 13th log rotation the oldest log file will be deleted.
Each R process launched by RStudio Connect produces output that is retained within the
jobs subdirectory of the RStudio Connect data directory. These directories and files are managed by the server. They are retained for 30 days and subsequently removed from the system.
Application logs are available in the RStudio Connect dashboard. The dashboard settings page for deployed content contains a Logs section containing execution details for each launched R process. Standard output and standard error are captured and available.
RStudio Connect manages uploaded Shiny applications, R Markdown documents, and plots. All of the variable data associated with this content is stored within the server’s data directory. This includes:
- Deployment bundles as uploaded by the user.
- Directories containing unpacked bundles, including R source code.
- R packages, as demanded by the deployed code.
- Rendered R Markdown documents.
The RStudio Connect data directory also contains information used by the server in managing your deployed content. This includes:
- The RStudio Connect
sqlitedatabase and encryption key.
- R process execution information including logged output.
- Parameter overrides for R Markdown documents.
The default location for the RStudio Connect data directory is
/var/lib/rstudio-connect. This can be customized by specifying an alternate
DataDir in the
Server section of your configuration file.
[Server] DataDir = /mnt/rstudio-connect
The RStudio Connect database must exist on local storage. If the location for
DataDir is not local storage but a networked location over NFS, configure the
Dir setting in the
Database section of your server configuration file.
[Server] DataDir = /mnt/rstudio-connect [Database] Dir = /var/lib/rstudio-connect/db
Data directory permissions
Data directory permissions are established by RStudio Connect as files are created. This section documents the general ownership patterns you will find under the RStudio Connect data directory. In general, directories which need to be directly accessed from R will be owned by the
rstudio-connectuser. Directories which need to to be accessed by
rserver-monitor for metrics collection will be owned by the
rstudio-connect user (or the user configured to run
rserver-monitor). Other directories will be owned by
/var/lib/rstudio-connect is owned by
root with permissions
For details on the ownership and permissions for the metrics data directories, please see this section of the administrator's guide. For details on configuring the user that runs
rserver-monitor, please see this section.
apps subdirectories are owned by
root with permissions
0711 and contain directories for each deployment. These nested directories are writable to R processes and therefore owned by
packrat subdirectories will contain installed R packages. R will write into these directories as packages are installed. They need to be owned by
All other data subdirectories are owned by
We recommend including the RStudio Connect configuration file in
/etc/rstudio-connect and the variable data directory in your system backups. If you have configured the database to be stored outside the data directory, ensure that it is also included in the backup.
A running RStudio Connect server may be writing into the data directory if there are any active deployments, applications or documents. You should stop the RStudio Connect server before taking a backup.
$ sudo stop rstudio-connect # Run appropriate backup steps here. $ sudo start rstudio-connect
Your platform may need alternate commands to restart RStudio Connect. Please see this section of the administrator's guide for instructions specific to your operating system version.