Configuration Files¶
Workbench configuration lives in /etc/rstudio/. Most changes need a restart, and some files reload without one;1 the commands and the list of reloadable files are on Sudo Commands. Owners and modes are on Directories and Files.
Core files¶
| File | Purpose |
|---|---|
rserver.conf |
Main server: ports, TLS, auth, launcher, admin, auditing |
rsession.conf |
RStudio Pro session behavior: timeouts, repos, NFS |
launcher.conf |
Job Launcher server and cluster definitions |
launcher.local.profiles.conf |
CPU and memory limits per user and group |
database.conf |
Internal database (SQLite or PostgreSQL) |
repos.conf |
Default package repositories for RStudio sessions |
positron.conf |
Positron Pro sessions |
vscode.conf |
VS Code sessions |
jupyter.conf |
JupyterLab and Notebook sessions |
secure-cookie-key |
Signing key; identical on all load balanced nodes2 |
rserver.conf¶
Annotated rserver.conf (single node, TLS on Workbench, Local launcher)
# /etc/rstudio/rserver.conf
# TLS
ssl-enabled=1
ssl-certificate=/etc/rstudio/workbench.example.com.crt
ssl-certificate-key=/etc/rstudio/workbench.example.com.key
secure-cookie-key-file=/etc/rstudio/secure-cookie-key
# Service account
server-user=rstudio-server
# Job Launcher
launcher-address=127.0.0.1
launcher-port=5559
launcher-sessions-enabled=1
launcher-default-cluster=Local
launcher-use-ssl=1
launcher-sessions-callback-address=https://workbench.example.com
# Shared storage (project sharing, load balancing)
server-shared-storage-path=/shared/rstudio-server/shared-storage
# PAM
auth-pam-sessions-profile=rstudio-session
auth-pam-sessions-use-password=1
# Admin dashboard
admin-enabled=1
admin-group=posit-admins
admin-superuser-group=posit-superadmins
# Health and auditing
server-health-check-enabled=1
audit-r-sessions=1
audit-r-console=input
# R discovery
r-versions-scan=1
# Optional integrations
# databricks-enabled=1
# workbench-api-enabled=1
Notes:
launcher-sessions-callback-addressmust be a URL the launched sessions can reach rserver on.3 When sessions run on the same host,https://workbench.example.com(the public name) works if the cert matches. With SSL, the host name must match the certificate's CN or SAN.6 If sessions hang in "Starting", this setting is a prime suspect.- If
launcher-use-ssl=1, the launcher needs its own certificate settings inlauncher.conf.
rsession.conf¶
Session settings for RStudio Pro live in /etc/rstudio/rsession.conf.4
# /etc/rstudio/rsession.conf
session-timeout-minutes=120
r-cran-repos-file=/etc/rstudio/repos.conf
allow-r-cran-repos-edit=0
nfs-acl-version=nfsv4
nfs4-principal-type=uid
nfs4-domain=example.com
allow-r-cran-repos-edit=0 hides the repository option in Global Options so users stay on Package Manager.4 It does not stop a determined user from calling options(repos = ...); enforcement belongs on the network (outbound firewall) if you need it.
repos.conf¶
Package Manager's guide recommends posit-package-manager-url in rserver.conf instead of repos.conf. The two are not compatible, so use one approach or the other.5
# /etc/rstudio/repos.conf
CRAN=https://packagemanager.example.com/cran/__linux__/rhel9/latest
Internal=https://packagemanager.example.com/internal/__linux__/rhel9/latest
This only sets defaults for RStudio Pro sessions.5 For R started anywhere (Positron, VS Code, Jupyter with an R kernel, Rscript in a terminal, Workbench Jobs), set repositories in each R installation's Rprofile.site. See Linux binaries.
launcher.conf¶
Job Launcher settings live in /etc/rstudio/launcher.conf.6
# /etc/rstudio/launcher.conf
[server]
address=127.0.0.1
port=5559
server-user=rstudio-server
admin-group=rstudio-server
authorization-enabled=1
enable-cgroups=1
thread-pool-size=4
enable-ssl=1
certificate-file=/etc/rstudio/workbench.example.com.crt
certificate-key-file=/etc/rstudio/workbench.example.com.key
[cluster]
name=Local
type=Local
Leave enable-debug-logging off in production (default 0). It is noisy and can log sensitive request data.6 Turn it on temporarily when diagnosing launcher problems.
database.conf¶
See Databases.7 The file can hold a password, so it must stay private; its owner and mode are on Directories and Files.
Certificates¶
Keep the certificate and key where the service can read them. The key is typically owned by rstudio-server with mode 600 (certificate 644), and must not have a passphrase.8 If your certificate is issued by an internal CA, include the intermediate chain in the certificate file: server certificate first, then intermediates.8 See Certificates.