RStudio server

r-base

We install r-base, build-essential (in order to be able to compile r-cran packages) as well as a few of the most common build-depends (libblas-dev, liblapack-dev, gfortran). If you need further packages, you can install them (see below).

littler

We install littler, a not so well know package but very convenient. It allows you to use a #!/usr/bin/r shebang in your scripts to execute them directly without first starting R interactively.

Using all available CPU cores

R has a hardcoded limit of 125 threads, on machines with more CPUs than that (e.g. ours with 288), this can be overwritten by passing --max-connections, see #28.

Installing software

We update all systems automatically, however, you can update it manually with:

sudo apt full-upgrade -U

Software from the Debian repository can be installed with:

sudo apt install -U [...]

i.e. sudo apt install -U tmux.

Software not included in the Debian repository needs to be manually installed in your home. Depending on the build system of the software, consider using DESTDIR=$HOME/local or similar.

BFH data

If you need persistent storage, you can create storage shares on our Ceph cluster via BFH.science Self-Service Portal.

All data from Ceph is accessible at /mnt/data/group.

Scratch space

/mnt/local/scratch gives you access to local scratch space, i.e. temporary storage on the hosts fast SSDs.

Please note:

  • no backup: if you delete something by accident, data is gone.

  • no persistency: if we move the container to another host server, all data is gone.

  • limited capacity: compared to Ceph with hundrets of TB of space, the host servers just have two local SSDs in RAID1 shared with all containers for scratch space.

  • no guarantees: if required, we reserve the right to delete data if necessary even without prior notice in order to ensure stable and secure operation.

  • rule of thumb: only store temporary data which you would asume would be gone after a reboot (/tmp).

  • best practice: use /mnt/local/scratch (fast local SSDs) instead of /tmp (RAM disk). /tmp will either eventually kill your processes when used excessively or slow down your calculations because of wasted RAM.

pre-2026: If RStudio fails (no login page), how can I restart it?

It used to happen with older RStudio versions (pre 2026; now shouldn’t be required anymore) that it hangs and you cannot access your current session anymore. The following steps allow you to restart RStudio and resume your work.

  • Login via ssh to your server (replace ${bfh-account} with your BFH account, e.g. bad9): ssh rstudio.${bfh-account}.bfh.science

  • Stop rstudio server: sudo service rstudio-server stop

  • Kill rstudio sessions: sudo rstudio-server kill-all

  • Kill rstudio backend: sudo killall -9 rserver

  • Start rstudio server: sudo service rstudio-server start

If you do not have SSH access to your server yet, you can add your key in the BFH.science self-service portal.

pre-2026: If RStudio starts (login page is there), but my session is corrupted, how can I delete it?

It used to happen with older RStudio versions (pre 2026; now shouldn’t be required anymore) that if you allocated too much memory, you cannot resume your session (remember: RStudio is ment to be used as an development enviroment to work on your code, not to run large computations. Those should be run via SSH using screen or any other terminal multiplexer).

To remove an active session (this does not affect your data, but unsafed code will be lost), follow the following steps.

  • Login via ssh to your server (replace ${bfh-account} with your BFH account, e.g. bad9): ssh rstudio.${bfh-account}.bfh.science

  • Stop rstudio server: sudo service rstudio-server stop

  • Remove the active session (there’s only one): rm -rf .rstudio/sessions/active

  • Start rstudio server: sudo service rstudio-server start

If you do not have SSH access to your server yet, you can add your key in the BFH.science self-service portal.