Ubuntu 14.04 / 16.04 (recommended)

# Requires Ubuntu 14.04 (Trusty) or 16.04 (Xenial)
sudo add-apt-repository -y ppa:opencpu/opencpu-1.6
sudo apt-get update 
sudo apt-get upgrade

# Installs OpenCPU server
sudo apt-get install -y opencpu
# Done! Open http://yourhost/ocpu in your browser

# Optional: installs rstudio in http://yourhost/rstudio
sudo apt-get install -y rstudio-server 

Fedora

Go here to add the opencpu repository. Also have look at the readme for rpm packages.

# Need to add repo first! (See link above)
sudo yum install opencpu

Debian / CentOS / Suse etc

See the readme on building deb or rpm packages from source.

Docker

Docker containers based on various platforms are published via dockerhub:opencpu. Use opencpu/base for opencpu or opencpu/rstudio for opencpu + rstudio server. See this readme for more details.

# Run as executable
docker run -t -p 80:80 -p 8004:8004 opencpu/rstudio

# Run in background
docker run -t -d -p 80:80 -p 8004:8004 opencpu/rstudio

Local Single-User Server

install.packages("opencpu")
library(opencpu)

Installing OpenCPU Apps

#install the "gitstats" or "stocks" app from github
library(devtools)
install_github("opencpu/gitstats")
install_github("opencpu/stocks")

#open in single-user server
library(opencpu)
opencpu$browse("/library/gitstats/www")

Server Manual PDF

The OpenCPU server manual PDF is the primary reference for installing and managing OpenCPU servers.