Update your Rstudio server

I was surprised how little documentation was available on how to update Rstudio Servers. I use a Rstudio server deployed on the Australian Research and Data Commons (ARDC), NECTAR service. It took me too long to figure this out as all the current documentation was old and obsolete.

This post by Zhenguo Zhang was helpful, However not specific to my use case of just wanting to upgrade my server.

NOTE: Upgrading the software will need sudo privileges on the machine.


1. Stop the service

sudo rstudio-server stop


2. Remove the old service

sudo apt-get remove rstudio-server


3. Install new version

This step can mostly be followed from the POSIT website: https://posit.co/download/rstudio-server/


Disto dependant

Be aware the following is linux distribution dependant. My version is “Ubuntu 22.04.4 LTS” however yours might be slightly different.

If gdebi-core is not already installed from the old Rstudio server install it again

  1. install gdebi-core to allow debian package manager to install the new version
sudo apt-get install gdebi-core
  1. Install the new Rstudio version

You may need to get the most recent line of code from the posit website.

# Download
wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2024.04.2-764-amd64.deb
# Install
sudo gdebi rstudio-server-2024.04.2-764-amd64.deb


4. Start the new service

Verify installation

sudo rstudio-server verify-installation

Start the a new session

sudo rstudio-server start

Verify the a new session has started and is active

sudo rstudio-server active-sessions

Once the service is active make put the service back online

sudo rstudio-server online
  • and that should be it!!




Troubleshooting

Restarting your service

sudo rstudio-server restart
  • Check the ports are open rstudio server is usually 8787
# list ports in use
sudo netstat -tulpn
  • Check the rstudio configuration files
nano /etc/rstudio/rserver.conf