Skip to content

Upgrading to RStudio Server Pro / RStudio Workbench 1.4#

RStudio is now Posit!

Our professional products have been renamed to Posit Connect, Posit Workbench, Posit Package Manager, Posit Cloud, and Posit Academy so it’s easier for folks to understand that we support more than just R. Please review our Blog post/FAQ to answer commonly asked questions about the rebrand.

These procedures are to upgrade RStudio Server Pro1 or RStudio Workbench to version 1.4.

You are already running version 1.4+ and want to upgrade to a newer version

If you are running RStudio Server Pro versions prior to 1.4 and would like to upgrade to a newer version, there is an incremental upgrade required before you can upgrade:

  1. First, you must upgrade to version 1.4 by completing the procedures below: Upgrade to RStudio Workbench 1.4 procedures]
  2. Next, you can upgrade to your desired version of Workbench. You can find those procedures in the Upgrade Workbench available on the next page.

Upgrade Requirements#

If you are running an RStudio Server Pro version prior to 1.4 and would like to upgrade to RStudio Server Pro or RStudio Workbench version 1.4 or greater, there may be additional configuration for your upgrade which are available below.

You have no added administrative requirements and can navigate to the Upgrade Procedures if you:

  • Have only one RStudio Server Pro/RStudio Workbench node (including integration with Kubernetes or Slurm via the Launcher)
  • Do not wish to configure VS Code as an IDE for RStudio Workbench
  • Are satisfied with RStudio Workbench's default locations for saving server state (true in most cases)
  • Do not wish to use RStudio Workbench's Project Sharing feature

If you do not meet one or more of the requirements listed above, then complete the following sections.

Database#

Required, if load-balancing

Starting in RStudio Workbench version 1.4, a database is required. The product comes with an SQLite database out-of-the-box.

  • If you are running a single-node installation of RStudio Workbench; no further configuration is required.
  • If you are load-balancing multiple RStudio Workbench instances, a separate Postgres database is required.

Note

The minimum supported PostgreSQL version is 9.5.

Install Type Database
Single Node, RStudio Sessions Only SQLite
Single Node, Jupyter + VS Code Sessions (Launcher) SQLite
Single Node, External Resource Manager (K8S, Slurm) SQLite
Multiple Nodes Load Balanced/HA (w/ or w/o External Resource Manager) Postgres

RStudio Workbench uses the database to manage and maintain the server state.

  • If using a Postgres database, an administrator must create the database and properly configure RStudio Workbench; no further database administration is required.

Info

Understanding the RStudio Product Databases includes details on how RStudio professional products use their databases.

To update a load-balanced RStudio Workbench cluster to 1.4 or greater, you will need to:

  1. Stop all nodes in the cluster.
  2. Create the Postgres database.
  3. Edit the configuration files for all nodes to use the Postgres database.
  4. Install the new version of RStudio Workbench.
  5. Start the RStudio Workbench nodes.

Detailed instructions can be found in the RStudio Workbench Professional Edition - Admin guide.

VS Code#

Optional, IDE available

RStudio Workbench 1.4 allows users to launch VS Code sessions in addition to RStudio, JupyterLab, and Jupyter Notebook sessions. This configuration must be enabled by an administrator.

Enabling VS Code sessions is a two-step process:

  1. Install the VS Code executable.
  2. Configure RStudio Workbench to use the VS Code executable.

Additionally:

  • If RStudio Workbench is configured to run sessions locally, there is an installation utility provided by RStudio Workbench for a one-line install, including R and Python extensions.
  • If RStudio Workbench is configured to use an external resource manager like Kubernetes or Slurm, the VS Code executable must be installed into the relevant containers or Slurm nodes.
    • The r-session-complete container provided by RStudio already has the VS Code executable installed.

The procedures for installing and configuring VS Code in RStudio Workbench, please see the RStudio Workbench Professional Edition Admin Guide.

Default Data Directory#

New default, now optionally configurable

RStudio Workbench maintains state in the user’s home directory:

  • In versions of RStudio below 1.4, this state was maintained in the ~/.rstudio folder, with no ability to alter the location.
  • Starting in RStudio Workbench 1.4, this data now lives in the ~/.local/share/rstudio directory, and this location is configurable.

Note

We strongly recommend that the data in this folder be used by the IDE alone, and not manually accessed.

Directory Migration#

  • For most RStudio Workbench installations, the migration will be automatic and invisible to users and administrators.
  • In some configurations, RStudio Workbench administrators may wish to move this data somewhere else if space is limited on the drive with user home directories.

Configurable Paths#

  • If you wish to return the data to its prior location, or to move the data location somewhere else, the XDG_DATA_HOME or RSTUDIO_DATA_HOME environment variables in the service definition can be configured.

See the RStudio Workbench Professional Edition - Admin guide for more details on configuring this setting.

Project Sharing#

Optional, newly enabled in Launcher configurations

Prior to RStudio Workbench version 1.4, using the Launcher feature to enable an External Resource Manager and/or JupyterLab, Jupyter Notebook, and VS Code sessions required disabling the real-time project sharing feature of RStudio sessions.

This is no longer the case as of version 1.4. Please see the RStudio Workbench Professional Edition - Admin guide for details on enabling project sharing.

Administrative Tasks Conclusion

Now that you have reviewed and completed the required administrative tasks, you may continue to the next section, Upgrade Workbench to version 2021.09.0+ or 2022.02.0+.

Upgrade Procedures#

Caution

Review the Upgrade Requirements for the applicable version that you wish to upgrade to prior to continuing with this section.

There are additional configuration requirements that must be satisfied for a successful upgrade. Failure to do so may result in an unsuccessful upgrade with configuration issues.

Note

If you perform an upgrade of Workbench, and an existing version of the server is currently running, then the upgrade process will also ensure that active sessions are immediately migrated to the new version.

This includes the following behavior:

  • Running R sessions are suspended so that future interactions with the server automatically launch the updated R session binary
  • Currently, connected browser clients are notified that a new version is available and automatically refresh themselves.
  • The core server binary is restarted

This includes the following behavior:

  • Running R sessions are suspended so that future interactions with the server automatically launch the updated R session binary
  • Currently, connected browser clients are notified that a new version is available and automatically refresh themselves.
  • The core server binary is restarted
  1. Notify users ahead of time of the upgrade. You can use the admin notification feature.
  2. Check if there are any active sessions running: sudo rstudio-server active-sessions
    1. If there are active sessions, then suspend all active user sessions: sudo rstudio-server suspend-all
  3. Put the old version of the server into offline mode: sudo rstudio-server offline
  1. Download and upgrade Workbench:
$ curl -O https://download2.rstudio.org/server/rhel8/x86_64/rstudio-workbench-rhel-2022.07.2-576.pro12-x86_64.rpm
$ sudo yum install rstudio-workbench-rhel-2022.07.2-576.pro12-x86_64.rpm
$ curl -O https://download2.rstudio.org/server/centos7/x86_64/rstudio-workbench-rhel-2022.07.2-576.pro12-x86_64.rpm
$ sudo yum install rstudio-workbench-rhel-2022.07.2-576.pro12-x86_64.rpm
$ sudo apt-get install gdebi-core
$ curl -O https://download2.rstudio.org/server/bionic/amd64/rstudio-workbench-2022.07.2-576.pro12-amd64.deb
$ sudo gdebi rstudio-workbench-2022.07.2-576.pro12-amd64.deb
$ sudo apt-get install gdebi-core
$ curl -O https://download2.rstudio.org/server/jammy/amd64/rstudio-workbench-2022.07.2-576.pro12-amd64.deb
$ sudo gdebi rstudio-workbench-2022.07.2-576.pro12-amd64.deb

$ curl -O https://download2.rstudio.org/server/opensuse15/x86_64/rstudio-workbench-2022.07.2-576.pro12-x86_64.rpm $ sudo zypper install rstudio-workbench-2022.07.2-576.pro12-x86_64.rpm}

For older versions of RStudio, please review the Older Versions page.

  1. Restart the server: sudo rstudio-server restart
  2. Put the new version online: sudo rstudio-server online`

The service will never be truly down (in the sense that users see a failure to connect). The offline mode keeps users from trying to start new sessions while you’re doing the upgrade.

Your configuration and settings remain unchanged from the previous version, and if you are running Workbench, your license status will remain untouched as well.


  1. You may still find references to “RStudio” in our documentation, and some of those are expected! Several of our open source products like the RStudio IDE will retain their original names, while our professional products’ names have changed to “Posit”, e.g., Posit Connect. To minimize user confusion, past versions of our professional products will go by their old names until they are no longer supported. For more information about our product names, please see the rebranding blog post