RStudio Package Manager and Artifactory

Control, organize, and govern your use of R packages to increase reproducibility and decrease the time you spend installing and troubleshooting. For more information visit

This article explains why you would use RStudio Package Manager in addition to Artifactory and provides the necessary integration steps.

Why use RStudio Package Manager and Artifactory?

Artifactory is a general purpose manager that supports multiple languages. If you already have Artifactory, or your IT organization has standardized on Artifactory, there are benefits to combining it with RStudio Package Manager.

Do I need Artifactory if I only have RStudio Package Manager?

No, RStudio Package Manager is a complete solution for data science teams using R.

Why should I consider RStudio Package Manager if I already have Artifactory?

Artifactory provides basic support for R packages, but unfortunately most data science teams face additional challenges:

Version Management - While Artifactory provides access to CRAN packages, most data scientists are familiar with the challenges that come with managing package versions over time. RStudio Package Manager makes this process easier by versioning the CRAN repository in addition to versioning individual packages, making it possible  for old code to "just work".

Approved Subsets of CRAN - Artifactory proxies all of CRAN, but often organizations require restricted access to approved subsets of CRAN. RStudio Package Manager uses knowledge of package dependencies to help organizations maintain these validated subsets.

Linux Binaries - Artifactory proxies directly from CRAN, which means its support on Linux systems is limited to source packages that can take hours to compile and install. RStudio Package Manager provides access to pre-compiled package binaries that make package installation fast enough to prevent disruptions and make it drastically easier to implement automation.

Luckily, teams do not have to pick between IT supported Artifactory and the benefits of RStudio Package Manager - the two tools can be combined together.  

This integration is especially helpful for organizations that wish to have RStudio Package Manager offline and are able to use Artifactory as a proxy to online package sources.

How to use RStudio Package Manager with Artifactory

Screen_Shot_2019-11-06_at_7.39.09_AM.pngThe goal of these steps is to enable RStudio Package Manager to pull CRAN packages and metadata from Artifactory.

  1. Inside of Artifactory, create a remote repository with the generic type. For the Repository Key, enter "rspm-cran". For the repository URL, enter:
    The remainder of the default settings are appropriate.

  2. ssh into the server where RStudio Package Manager is installed. Make sure that RStudio Package Manager is stopped:
    # for Ubuntu 16.04, Ubuntu 18.04, RHEL/CentOS 7, openSUSE/SLES
    sudo systemctl stop rstudio-pm
    # for Ubuntu 14.04 and REHL/CentOS 6
    sudo stop rstudio-pm
  3. Edit the RStudio Package Manager configuration file to add the following configuration section:

    ManifestURL = "https://<artifactory-server-address>:8081/artifactory/rspm-cran"

    If your Artifactory repository requires authentication, include the username and password secret in the URL following Artifactory's instructions for accessing the remote repository created in step 1.
  4. Restart RStudio Package Manager:
  5. # for Ubuntu 16.04, Ubuntu 18.04, RHEL/CentOS 7, openSUSE/SLES
    sudo systemctl start rstudio-pm
    # for Ubuntu 14.04 and REHL/CentOS 6
    sudo start rstudio-pm
  6. Follow the Getting Started steps in RStudio Package Manager to sync Package Manager and create a repository that subscribes to CRAN.

    To verify the integration is complete, you should see the following signs of success.

    In RStudio Package Manager, you should see a repository with an Activity Log showing the addition of CRAN packages.


    In Artifactory, you should see a remote repository called rspm-cran and a cache called rspm-cran-cache. Within the cache, you should see an artifact count of approximately 300 files following the initial setup and sync. As packages are installed this count will increase.


  7. The integration is complete! Follow the instructions in RStudio Package Manager for configuring access to R packages. R users will access packages from RStudio Package Manager instead of accessing them directly from Artifactory.
  8. Please note: if you're seeing issues with RStudio Package Manager not updating, you may need to exclude the file from the Artifactory cache by following the guide here.