Integrating Package Manager with Workbench and Connect
By the end of this lesson, you will be able to:
- Explain why Workbench and Connect should be pointed at Package Manager
- Describe what changes when R and Python clients use Package Manager instead of CRAN and PyPI
- Identify where repository configuration lives for Workbench and for Connect
- Recognize how to confirm that a product is using Package Manager
Introduction
Standing up Package Manager only delivers value once the products that consume packages, Workbench and Connect, are actually pointed at it. By default, open-source packages and extensions install directly from their public registries. Redirecting both products to Package Manager is what gives your organization control over which packages and extensions enter the environment, along with the performance benefit of pre-compiled Linux binaries.
This lesson explains why and where this integration happens. The accompanying lab walks you through configuring Workbench and Connect for both R and Python, and verifying that package installations flow through your Package Manager instance.
- Reading time: 10 minutes
- Documentation reading time: 15 minutes
- Hands-on exercise time: 20 minutes
Why Point Workbench and Connect at Package Manager
When Workbench and Connect use Package Manager rather than going directly to public registries such as CRAN, PyPI, and the extension galleries, you gain two things at once.
The first is control. Every package or extension a user installs in a Workbench session, or that Connect installs when deploying content, comes from a repository you govern. That is where the blocklist rules, curated sources, and vulnerability scanning from earlier lessons take effect. If the products bypass Package Manager, none of those controls apply.
The second is performance. CRAN does not provide pre-built binaries for Linux, so installing R packages directly from CRAN on a Linux server compiles them from source, which can be slow. Package Manager serves pre-built Linux binaries, dramatically reducing install times in both Workbench sessions and Connect deployments.
Where Configuration Lives
The integration is configured separately for each product and each language, because each uses a different mechanism. Wherever possible, prefer the product-native configuration option over editing a tool’s own configuration file (such as /etc/pip.conf or /etc/uv/uv.toml) directly, because the product-native option is applied consistently to every session or deployment.
- Workbench, R: set the default CRAN repository for sessions with the
r-cran-reposoption inrsession.conf, using the OS-specific binary URL that the Package Manager Setup page generates so that sessions get Linux binaries rather than source. This is one of several ways to configure R repositories; see Package Installation for RStudio Pro Sessions for alternatives such as listing multiple named repositories inrepos.conf. - Workbench, Python: set
session-python-index-urlinrserver.conf. Workbench injects this value into sessions as bothPIP_INDEX_URLandUV_INDEX_URL, so the single setting pointspipanduvat Package Manager without editing either tool’s configuration file. See Python Package Installation. - Workbench, VS Code and Positron Pro extensions: point the editors at an Open VSX extension repository served by Package Manager, configured in Workbench. See Configuring Workbench for VS Code Extensions. Note that Positron and VS Code do not support authenticated extension galleries.
- Connect, R: add an
[RPackageRepository "CRAN"]section inrstudio-connect.gcfgpointing at Package Manager. Add a section for each repository you want Connect to use, including any internal repositories (such as thegitrepository built earlier). See Overriding CRAN with Package Manager. - Connect, Python: add a
[PythonPackageRepository "PyPI"]section inrstudio-connect.gcfgpointing at Package Manager — the same file and the same pattern used for R. This is the recommended approach; it works for bothuvandpipand takes precedence over any/etc/uv/uv.tomlor/etc/pip.confsettings. See Configuring Python package repositories.
Confirming the Integration Works
After configuring each product, you can confirm the change by installing a package and observing where it came from. In Workbench, the install logs should show Package Manager’s URL rather than CRAN or PyPI. The same principle applies to Connect: deploy content and confirm the packages resolve through your Package Manager instance during the set up of the environment.
The extension integration listed above is not covered in the lab, but it follows the same pattern. Before you can point the editors at Package Manager, you must first create an Open VSX extension repository (see Serving Open VSX Extensions). Only then can Workbench be configured to serve extensions from it.