OpenCPU 2.1 Release: Scalable R Services

November 22, 2018

OpenCPU provides a mature and robust system for hosting R based services. The server exposes a simple HTTP API for calling R functions, scripts and managing data. The Cloud Server is completely free and scales up to many concurrent users. This provides a reliable foundation for intergrating R into any environment.

The 2.1 branch is the new major release of OpenCPU. The changes in this version are mostly internal, and make the server a bit lighter and faster. The built-in CI system has switched to the lightweight remotes package for installing packages from GitHub. Moreover the opencpu-server package has been tweaked to work better inside docker. Also we now target R 3.5 on server installations.

The user facing features are unchanged; see the opencpu 2.0 announcement post for a brief overview.


The version 2.1.0 is available from CRAN, Launchpad, Dockerhub, OBS and the server archive.

The recommended platform for running the server is Ubuntu 18.04 or 16.04, which can be installed directly from the PPA. For Fedora and CentOS you can download installers from the server achive. All binaries from the archive have been built on dockerhub and depend on the current version of R from Fedora / EPEL.

The easiest way to get started is by deploying your packages on the public cloud server by enabling the opencpu webhook in your GitHub repository.


Another easy way to get started is using docker, which also runs on Windows these days. Images based on various platforms are published on dockerhub The opencpu/rstudio image is recommended for development: it runs both opencpu-server and rstudio-server which are very powerful together.

# Run server as executable
docker run --name mybox -t -p 80:80 opencpu/rstudio

# OR: if port 80 is taken use port 8004
docker run --name mybox -t -p 8004:8004 opencpu/rstudio

Now simply open http://localhost/ocpu/ and http://localhost/rstudio/ in your browser! Login via rstudio with user: opencpu (passwd: opencpu) to build and install packages.

To connect to a running container (e.g. for installing system libraries) get a root shell:

# Replace 'mybox' with the container name or id
docker exec -i -t mybox /bin/bash

Use the opencpu/base image for deployments. Also see the docker readme.