Skip to content

Worked Example: One Host

This page reads the configuration of a real server against the controls in this section. The server runs Workbench, Connect, and Package Manager for a pharmaceutical company. Hostnames, the domain, group names, email addresses, and the company name have been replaced; every setting and value is otherwise as found. It is an example of how to review a configuration, not a recommended configuration.

The files were read by an account without sudo. The admin scripts work the same way. They leave the root only checks (such as database.conf, private keys, and data directory sizes) for the person who holds sudo.

The deployment

All three products run on one host, and each listens on the loopback address only. A reverse proxy on the same host publishes them under one name: Connect at the root, Workbench under /rstudio, and Package Manager under /rspm.

flowchart LR
    Users(["Users<br>(browser)"]) --> Proxy["Reverse proxy<br/>https://posit.example.com"]
    Proxy -->|"/"| Con("Connect<br/>127.0.0.1:3939")
    Proxy -->|"/rstudio"| WB("Workbench<br/>127.0.0.1:8787")
    Proxy -->|"/rspm"| PPM("Package Manager<br/>127.0.0.1:4242")
    WB --> Launcher("Job Launcher<br/>127.0.0.1:5559, TLS")
    style WB fill:#e8f1f8,stroke:#447099,stroke-width:2px,color:#1a1a1a
    style Launcher fill:#e8f1f8,stroke:#447099,stroke-width:2px,color:#1a1a1a
    style Con fill:#fdf1e3,stroke:#c9822b,stroke-width:2px,color:#1a1a1a
    style PPM fill:#e8f5ec,stroke:#3f8f5a,stroke-width:2px,color:#1a1a1a

Binding to loopback suits a proxy on the same host; Posit says that proxy should use localhost as the server host name.1 Serving Package Manager from a path is supported when Server.Address is the URL users see through the proxy.2 Connect's Server.Address should likewise be the public URL.3

Running the three products on one host is not. The Workbench, Connect, and Package Manager requirements each say the product needs its own dedicated server.456 For a qualified environment, record the shared host as a deviation in the configuration specification, with QA's risk assessment, or plan to split the products.

The configuration

Workbench and Launcher

Workbench: rserver.conf
# /etc/rstudio/rserver.conf
server-access-log=1
auth-required-user-group=posit-users
auth-pam-sessions-enabled=1
auth-pam-sessions-use-password=1
auth-pam-sessions-profile=rstudio-session
admin-enabled=1
admin-group=posit-admins
www-port=8787
www-address=127.0.0.1
r-versions-scan=0
rsession-which-r=/opt/R/<current version>/bin/R
launcher-address=127.0.0.1
launcher-port=5559
launcher-use-ssl=1
launcher-sessions-enabled=1
launcher-verify-ssl-certs=0
launcher-sessions-callback-address=https://posit.example.com/rstudio
launcher-sessions-callback-verify-ssl-certs=0
server-user=rstudio-server
secure-cookie-key-file=/etc/rstudio/secure-cookie-key
Workbench: rsession.conf
# /etc/rstudio/rsession.conf
allow-external-publish=0
session-timeout-minutes=10
r-cran-repos=https://posit.example.com/rspm/cran/latest
r-cran-repos-url=https://posit.example.com/rspm/__api__/repos
Launcher: launcher.conf
# /etc/rstudio/launcher.conf
[server]
address=127.0.0.1
port=5559
enable-ssl=1
certificate-file=/etc/pki/tls/rstudio-launcher/cert.pem
certificate-key-file=/etc/pki/tls/rstudio-launcher/cert.key
server-user=rstudio-server
admin-group=posit-admins
authorization-enabled=1
secure-cookie-key-file=/etc/rstudio/secure-cookie-key

[cluster]
name=local
type=Local

Connect and Package Manager

Connect: rstudio-connect.gcfg
; /etc/rstudio-connect/rstudio-connect.gcfg
[Server]
SenderEmail = posit@example.com
EmailProvider = SMTP
DataDir = /var/lib/rstudio-connect
Address = https://posit.example.com
RVersionScanning = false
RVersionMatching = exact
RVersion = /opt/R/<older version 1>
RVersion = /opt/R/<older version 2>
RVersion = /opt/R/<older version 3>
RVersion = /opt/R/<current version>
LandingDir = /opt/connect-landing-page

[HTTP]
Listen = 127.0.0.1:3939

[Authentication]
Provider = pam
Name = Company network
Lifetime = 8h
Inactivity = 90m

[PAM]
UseSession = true
Service = rstudio-connect

[Applications]
RunAsCurrentUser = true

[SMTP]
Host = smtp.example.com
Port = 25
StartTLS = always

[Python]
Enabled = true
Executable = /opt/python/<end of life version>/bin/python

[Quarto]
Enabled = true
Executable = "/usr/lib/rstudio-server/bin/quarto/bin/quarto"
Package Manager: rstudio-pm.gcfg
; /etc/rstudio-pm/rstudio-pm.gcfg
[Server]
Address = https://posit.example.com/rspm
TempDir = /var/tmp/rspm
RVersion = /opt/R/<current version>

[HTTP]
Listen = 127.0.0.1:4242

[CRAN]
SyncSchedule = "0 0 * * *"

[Git]
AllowUnsandboxedGitBuilds = true

Files not shown

/etc/rstudio/repos.conf is empty. Reading /etc/rstudio/database.conf failed with "Permission denied", which is correct: the file holds the database password and should be owned by root with mode 600.7

Controls already in place

Control Setting Notes
Only one group can sign in to Workbench auth-required-user-group Takes a single group name.8
Admin Dashboard limited to a group admin-enabled=1, admin-group 9
Launcher traffic encrypted and authorized launcher-use-ssl=1, enable-ssl=1, authorization-enabled=1 authorization-enabled defaults to 1.10 See the first gap below.
Credentials forwarded to PAM sessions auth-pam-sessions-enabled=1, auth-pam-sessions-use-password=1 Lets PAM modules such as pam_sss obtain Kerberos tickets at session start.11
Publishing UI for RPubs and shinyapps.io removed allow-external-publish=0 Users can still publish from the console, and publishing to Connect is not affected.12
Idle RStudio Pro sessions suspend after 10 minutes session-timeout-minutes=10 13
Packages come from Package Manager r-cran-repos Only for RStudio Pro sessions; see the repository gap below.
Shorter Connect sign in Lifetime = 8h, Inactivity = 90m The defaults are 24 hours and 8 hours.14
Content runs as the viewer Applications.RunAsCurrentUser = true Processes run under the viewer's own Unix account, so OS level activity is attributable to a person. Each content item must opt in, static content is not covered, anonymous viewers use the fallback RunAs account, and every viewer's account must be in Applications.SharedRunAsUnixGroup.15
Exact R version matching RVersionMatching = exact Content with no version constraint in its manifest fails to deploy unless its R version is installed exactly.16 See the Connect gap below.
Encrypted mail SMTP.StartTLS = always 17
HTTP access log server-access-log=1 Writes HTTP access logs under /var/log/rstudio/rstudio-server/. They do not replace the audit trail.18

Gaps to raise with QA

Launcher certificate verification is off

launcher-verify-ssl-certs=0 and launcher-sessions-callback-verify-ssl-certs=0 turn off verification of the Launcher's certificate and of the callback address certificate. The traffic is still encrypted, but neither side checks who it is talking to. Posit says to leave both at 1 in production and to use 0 only for testing.19 Install a certificate the server trusts, then remove both lines.

Git builds run without a sandbox

Git.AllowUnsandboxedGitBuilds = true lets Package Manager build packages from Git without isolating the build. Posit calls this insecure and says to use it only if you trust the source of every package that will be built.20 If the server has no Git sources, remove the setting. If it does, find out why the sandbox is unavailable, and record the decision. The setting is needed when user namespaces are unavailable or Package Manager runs as root.

Connect uses removed R settings

Server.RVersion, Server.RVersionScanning, and Server.RVersionMatching were deprecated and then removed in Connect 2024.09.0. The replacements are R.Executable (the full path to the R binary, not the installation directory), R.ExecutableScanning, and R.VersionMatching.2216 Exact version matching only protects validated content if Connect is actually applying it. Confirm the installed Connect version, then move the settings to an [R] section:

[R]
ExecutableScanning = false
VersionMatching = exact
Executable = /opt/R/<current version>/bin/R

Add a Python.VersionMatching setting for Python content at the same time.23

Package Manager sets a setting that is not documented

CRAN.SyncSchedule does not appear in the current Package Manager configuration reference. CRAN syncs from the Posit Package Service automatically, and the documented CRAN timing setting is DelaySyncDuration.2 Ask Posit what the installed version does with the line, then remove it or document it.

Workbench does not restrict R versions

r-versions-scan=0 only turns off the scan of directories such as /opt/R. Workbench still lists the R on the PATH, any versions in /etc/rstudio/r-versions, and those in profiles. rsession-which-r only sets the main R, used when no other versions are listed.2425 To pin a validated environment to one R version, take other versions off the PATH, list it (for example /opt/R/<current version>) in /etc/rstudio/r-versions, and record it.

Connect, meanwhile, offers three older R versions alongside the current one. Its single Python version has reached end of life, so it no longer gets security fixes. Check each Python version against the Python release status page.26 Ask QA whether older versions are kept only to rerun released content, and plan their retirement through change control.

Users can change the repository

allow-r-cran-repos-edit is not set, so it keeps its default of 1 and users can change repositories in Global Options. Setting it to 0 removes the option, but users can still pass repos = to install.packages().27 The configured repository is also cran/latest, which changes every day. A validated environment should point at a frozen snapshot or a curated repository. Remember that rsession.conf only applies to RStudio Pro sessions, so set the same repository in Rprofile.site for every R installation.

Quarto on Connect depends on Workbench

Connect's Quarto.Executable is the copy of Quarto inside the Workbench installation (/usr/lib/rstudio-server). A Workbench upgrade therefore changes the Quarto that Connect renders with, without any change to Connect. Install Quarto separately in a versioned directory such as /opt/quarto/<version>, which Connect's starter configuration scans, and point Connect at it.28

No session or console audit

rserver.conf has no audit-r-sessions or audit-r-console setting. Session auditing then depends on the license: it is on by default only with named user licenses. Console input is not recorded. Connect's audit log is always written to its database, but there is no Logging.AuditLog file to forward. See Audit Trail.

Connect uses a deprecated sign in setting

[Authentication] Name is deprecated as of 2026.11.0, and Connect logs a warning. Set the sign in message on System > Custom Messaging instead.21

Checks that need root

These items could not be checked from an ordinary account. The admin scripts print each command for the sudo administrator:

  • The contents of database.conf (with the password masked)
  • The Launcher certificate's subject, issuer, and expiry, and whether the key matches it
  • The owner and mode of /etc/rstudio/secure-cookie-key, which must be mode 600 and owned by the server user29
  • The size of each product's data directory, and recent log entries
  • Which process owns each listening port