OpenCPU Server Release 1.5.4

[This article was first published on OpenCPU, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

opencpu logo

Version 1.5.4 of the OpenCPU server has been released to Launchpad (Ubuntu) and OBS (Fedora). This update does not introduce any changes to the OpenCPU API itself; it improves to the deb/rpm installation packages and upgrades the bundled opencpu system R package library.

Installing and Updating

Existing Ubuntu and Fedora serves that are already running the 1.5 branch will automatically update the next time they run apt-get update or yum update. Alternatively, to install OpenCPU server on a fresh Ubuntu 14.04 machine:

sudo add-apt-repository -y ppa:opencpu/opencpu-1.5
sudo apt-get update 
sudo apt-get install -y opencpu

Or to install it on Fedora 22 or 23 from OBS:

cd /etc/yum.repos.d/
yum install opencpu

To install OpenCPU server on other distributions, simplfy follow the instructions to build the deb (Debian/Ubuntu) or rpm (Fedora/CentOS/RHEL) packages from source, which is very easy.

The OpenCPU Package Library

Because OpenCPU is implemented completely in R, the server stack ships with a private library of R packages needed by the system in /usr/lib/opencpu/library. The isolated library allows you to freely install/upgrade/uninstall your own R packages on your server without accidentaly breaking the OpenCPU server. This is critical to guarantee the system is stable at all times and unaffected by whatever crazy things are happening in R.

However a side effect of this design is that for these system packages, the user might see a different package version when calling R via the OpenCPU API than when running R from the terminal on the same server. This is unfortunate because the OpenCPU is meant to provide a transparent HTTP API to the system’s R installation. One solution would be to add the opencpu library to your .libPaths() but this is unnecessarily annoying and complicated.

To make this easier, the OpenCPU rpm/deb packages now automatically create symlinks to the OpenCPU system library in the global R package library. Thereby the OpenCPU system library is still safely isolated, but the packages are also visible when running R in the terminal, hence we don’t need to install them again. Hopefully this makes managing packages on your OpenCPU server a little easier.

To leave a comment for the author, please follow the link and comment on their blog: OpenCPU. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)