Workbench Core Concepts¶
Session types¶
Workbench launches four kinds of IDE sessions, plus background jobs:
| Session | Notes | Config file |
|---|---|---|
| Positron Pro | Posit's polyglot IDE for R and Python | positron.conf5, positron.extensions.conf6, positron-user-settings.json7 |
| RStudio Pro | The classic R IDE | rsession.conf, rstudio-prefs.json |
| VS Code | Code OSS based, with the Posit Workbench extension | vscode.conf, vscode.extensions.conf8 |
| JupyterLab / Notebook | Python centric notebooks | jupyter.conf9 |
| Workbench Jobs | Background scripts launched from an IDE | launcher.conf10 |
With launcher-sessions-enabled=1, the Job Launcher starts all of them. With the Local plugin (type=Local in launcher.conf) sessions are child processes on the Workbench host, owned by the user. With the Kubernetes or Slurm plugins, sessions run as pods or batch jobs elsewhere.
graph LR
User(["Browser"]) --> WB("rserver")
WB --> Launcher("Job Launcher<br/>(port 5559, TLS)")
Launcher --> Positron("Positron Pro")
Launcher --> RSess("RStudio Pro")
Launcher --> VSCode("VS Code")
Launcher --> Jupyter("JupyterLab")
style WB fill:#e8f1f8,stroke:#447099,stroke-width:2px,color:#1a1a1a
R versions are discovered automatically under /opt/R/<version> (r-versions-scan=1, the default), or listed explicitly in /etc/rstudio/r-versions12. Python is conventionally installed under /opt/python/<version>3; Positron and VS Code sessions auto-discover interpreters there4, while JupyterLab sessions use Python environments registered as Jupyter kernels9.
Resource isolation¶
Without limits, one user's runaway data.table join can starve everyone else on the box. On the Local plugin, limits rely on cgroups v2.
Check for cgroups v2¶
- Confirm
enable-cgroups=1is in the[server]section of/etc/rstudio/launcher.conf. New installs ship with it; upgraded installs keep their old file, and the compiled default is0.1011 - Confirm the kernel uses cgroups v2. RHEL 9 and 10 do by default. RHEL 8 does not.
cgroup2fs means cgroups v211. On RHEL 8, switch and reboot:
RHEL 8 also needs DefaultCPUAccounting=yes in /etc/systemd/system.conf before the reboot. On RHEL 9 and 10, CPU limits need CPU delegation: add Delegate=cpu cpuset memory pids to /etc/systemd/system/user@.service.d/delegate.conf, then run sudo systemctl daemon-reload.11
Set resource limits¶
- Define limits in
/etc/rstudio/launcher.local.profiles.conf:
[*]
default-cpus = 1
default-mem-mb = 4096
max-cpus = 8
max-mem-mb = 32768
resource-profiles = default,small,medium,large
allow-custom-resources = 0
[@data-science-power]
max-cpus = 16
max-mem-mb = 131072
allow-custom-resources = 1
- Optionally define named sizes users choose from in
/etc/rstudio/launcher.local.resources.conf:
[default]
name = Default (1 CPU, 4 GB)
cpus = 1
mem-mb = 4096
[large]
name = Large (4 CPUs, 32 GB)
cpus = 4
mem-mb = 32768
More specific sections win: [username] beats [@group] beats [*].11 Restart the launcher after changes:
session-memory-limit-mb is not a Workbench setting
Older notes sometimes show session-memory-limit-mb in rserver.conf. Workbench ignores it. Memory limits live in the launcher profiles above.
Session lifecycle¶
stateDiagram-v2
[*] --> Starting: user launches session
Starting --> Active: launcher starts process
Active --> Suspended: idle timeout or user suspends
Suspended --> Active: user resumes
Active --> Stopped: user quits or admin kills
Suspended --> Stopped: session cleaned up
Stopped --> [*]
RStudio Pro sessions suspend after session-timeout-minutes (in rsession.conf; compiled default 120, though the shipped config file sets 480) and write their state under ~/.local/share/rstudio/.12 Positron, VS Code, and Jupyter sessions have their own timeout settings in their config files.
Admin commands:
active-sessions lists only local R sessions; sessions on other nodes or started through the Job Launcher are not included. For a Launcher session, pass its ID (the last eight characters of the session URL) instead of a PID.13
Use force-suspend-session and kill-* only when a normal suspend fails; they can lose unsaved work.14
Internal database and metadata¶
Workbench keeps an internal database of users, sessions, licenses, and short lived auth state:15
| Setup | Database | Location |
|---|---|---|
| Single node | SQLite (default) | under /var/lib/rstudio-server (local disk only) |
| Load balanced | PostgreSQL (required) | /etc/rstudio/database.conf |
Other state lives in two places:
| Location | Contents |
|---|---|
~/.local/share/rstudio/ |
Per user RStudio session state, project history, console history |
server-shared-storage-path |
Cross node data for load balancing and project sharing (must be shared storage when load balanced)2 |
Home directories and storage¶
/home/<username>/
├── .local/share/rstudio/ # RStudio session state
├── .config/rstudio/ # RStudio prefs, keybindings, snippets
├── .positron-server/ # Positron session data
├── .vscode-server/ # VS Code extensions and data
├── .Renviron # user environment variables
├── .Rprofile # user R startup file
├── R/x86_64-pc-linux-gnu-library/4.x/ # user R library (per minor version)
├── .local/lib/python3.x/ # pip --user installs
└── <projects>
Home directories on NFS are normal and required for load balancing. Workbench needs to know the ACL model in rsession.conf:12
| Setting | Example | Purpose |
|---|---|---|
nfs-acl-version |
nfsv4 |
ACL semantics for project sharing |
nfs4-principal-type |
uid |
How NFSv4 principals map to users |
nfs4-domain |
example.com |
NFSv4 ID mapping domain (match /etc/idmapd.conf) |
Getting these wrong shows up as permission errors when saving files, project sharing failures, or sessions that cannot suspend.
Admin dashboard and API¶
rserver.conf setting |
Effect |
|---|---|
admin-enabled=1 |
Turn on the admin dashboard at /admin2 |
admin-group=<group> |
Linux group whose members can open it |
admin-superuser-group=<group> |
Members can also join and manage other users' sessions |
workbench-api-enabled=1 |
User level Workbench API |
workbench-api-admin-enabled=1 |
Admin level API |
workbench-api-super-admin-enabled=1 |
Super admin API |
Only enable the API tiers you use; each one widens what a token holder can do.
Auditing¶
rserver.conf setting |
Records | Default location |
|---|---|---|
audit-r-sessions=1 |
Session events: login, logout, start, suspend, exit | /var/lib/rstudio-server/audit/r-sessions16 |
audit-r-console=input |
Console input | /var/lib/rstudio-server/audit/r-console |
audit-r-console=all |
Console input and output (needs much more disk) | same |
audit-r-console-format=json |
NDJSON instead of CSV |
audit-r-sessions does not record console activity; that is audit-r-console. In Positron sessions, console auditing covers both R and Python but supports input mode only.16 See Audit Trail for retention guidance.
SELinux¶
Workbench provides an SELinux policy module in the separate rstudio-workbench-selinux package, for RHEL, Ubuntu, and Debian (a preview feature as of 2026.11). Install it before you turn on enforcing mode; see the SELinux configuration page. If users read data from nonstandard paths (a mounted data volume, a team share), you need a small custom policy module that labels those paths. See SELinux customization (a preview feature as of 2026.11).
Decide which SELinux posture your security team requires before you build, and test the policy module install in a non-production environment first.