2 Get Started: Installation
This chapter outlines the minimum steps to install RStudio Package Manager. More information on each step is available in subsequent chapters. Your environment will likely require one or more additional steps.
2.1 Need Help?
RStudio is happy to provide support for anyone using the product.
To focus on building the best products, RStudio does not provide installation or professional services. If you require such assistance, please refer to our certified partners.
RStudio support is limited to our professional products. If your question is related to R, R code, or specific R packages, please visit https://community.rstudio.com.
If your question is related to RStudio Package Manager, you can open a support ticket by:
- Running the command
/opt/rstudio-pm/bin/run-diagnostics. Note, if you have not been able to download the software, skip this step. If you unpacked the software in a non-default location, navigate to that directory and use
- If the cause of the problem is not evident to you, send an email to email@example.com with:
- Your name and company
- Your goal
- What you have tried
- The current error
- The diagnostics output from step 1
RStudio support is via email, see our SLA for details.
Please review the necessary system requirements, account privileges, and internet access requirements prior to installing RStudio Package Manager.
2.2.1 System Requirements
- Red Hat Enterprise Linux/CentOS Linux 6.0+
- Red Hat Enterprise Linux/CentOS Linux 7.0+
- SUSE Enterprise Linux 12 SP3+
- SUSE Enterprise Linux 15
- openSUSE Leap 42.3
- openSUSE Leap 15.0
- Ubuntu 14.04 (not recommended; end of life scheduled for April 2019)
- Ubuntu 16.04
- Ubuntu 18.04
RStudio Package Manager should run on a server with a minimum of 2GB of RAM. Package sources can be lazily cached from CRAN or eagerly downloaded. RStudio Package Manager recommends 50-200GB of disk storage.
2.2.2 Internet Access Requirements
RStudio Package Manager acts as a “bridge” between offline servers running R and upstream package sources like CRAN. RStudio Package Manager should be installed on a server in the network with outbound access to:
See Repository Syncing for more details on what information is downloaded from the RStudio CRAN service.
RStudio Package Manager can be configured to use a HTTP proxy to access the internet, see Outbound Proxy for more details.
Additional steps are necessary if your internal servers can not access an online server through your internal network. See the appendix on running RStudio Package Manager in an air-gapped environment.
2.2.3 Root Requirements
RStudio Package Manager does not run as root, see 2.2.4. By default, root privileges are required to:
- Install RStudio Package Manager
- Start and Stop RStudio Package Manager via the service daemons
- Activate the RStudio Package Manager license
RStudio Package Manager can be installed and licensed without requiring root privileges. Instructions are available in the appendix.
2.2.4 RunAs User
RStudio Package Manager starts and runs under an unprivileged account. It never requires root.
The installer creates a user account and group named
rstudio-pm and runs the
RStudio Package Manager service under this account. If you wish to change the
account under which the service runs, please see D.
2.3.1 Download and Install
Download and install RStudio Package Manager for your platform. These
commands will install the product into
/opt/rstudio-pm. See F to install
into a non-default location or to perform a non-root install.
# for ubuntu sudo apt-get install gdebi-core wget https://s3.amazonaws.com/rstudio-package-manager/ubuntu/amd64/rstudio-pm_1.0.12-4_amd64.deb sudo gdebi rstudio-pm_1.0.12-4_amd64.deb
# for redhat and centos wget https://s3.amazonaws.com/rstudio-package-manager/centos/x86_64/rstudio-pm-1.0.12-4.x86_64.rpm sudo yum install rstudio-pm-1.0.12-4.x86_64.rpm
# for opensuse 42.3 and sles 12 wget https://s3.amazonaws.com/rstudio-package-manager/opensuse/x86_64/rstudio-pm-1.0.12-4.x86_64.rpm sudo zypper install rstudio-pm-1.0.12-4.x86_64.rpm
# for opensuse/sles 15 wget https://s3.amazonaws.com/rstudio-package-manager/opensuse15/x86_64/rstudio-pm-1.0.12-4.x86_64.rpm sudo zypper install rstudio-pm-1.0.12-4.x86_64.rpm
2.3.2 Package Validation
The RStudio Package Manager installer is signed with a key belonging to RStudio,
Inc. If you wish to verify this signature, you can obtain the public key from our
website; save it into a file (e.g.
rstudio-code-signing.key). You can also obtain it from a GnuPG keyserver
using the following commands:
# for Ubuntu gpg --keyserver keys.gnupg.net --recv-keys 3F32EE77E331692F
# For RHEL, CentOS, openSUSE, and SLES gpg --keyserver keys.gnupg.net --recv-keys 3F32EE77E331692F gpg --armor --export 3F32EE77E331692F > rstudio-code-signing.key # Import the key into the set of keys RPM uses to validate package signatures. rpm --import rstudio-code-signing.key
After obtaining the GnuPG key, you can validate the RStudio Package Manager installer using the following commands:
# Validate Ubuntu installer dpkg-sig --verify rstudio-pm_1.0.12-4_amd64.deb # Validate RHEL, CentOS, openSUSE, or SLES installer rpm -K rstudio-pm-1.0.12-4.x86_64.rpm
2.4 Initial Configuration
RStudio Package Manager settings are controlled by a configuration file located
/etc/rstudio-pm/rstudio-pm.gcfg by default. At a minimum, complete the
Address property within the
Server section, by specifying the URL used to
access RStudio Package Manager.
; /etc/rstudio-pm/rstudio-pm.gcfg [Server] Address = http://r-packages.example.com
http://r-packages.example.com with the value appropriate to your
There are many other default options you may want to configure now or at a later point, such as:
- The on-disk location where data will be stored, default:
- The database where essential metadata should be stored, default: built-in SQLite.
- Important security settings settings such as HTTPS certificates and ports, default: HTTP on port 4242.
For multi-node or highly available (HA) setups, please refer to the REQUIRED config settings listed at 13.
Verify the status of your license using:
If you have a license key, activate the license using
/opt/rstudio-pm/bin/license-manager activate LICENSE_KEY
LICENSE_KEY with the value of your license key. If your server is
offline or you need more information, consult 6.
2.6 Restart RStudio Package Manager
After changing certain configuration file settings you must restart the RStudio Package Manager service. Follow the instructions for your operating system:
# for Ubuntu 16.04, Ubuntu 18.04, RHEL/CentOS 7, openSUSE/SLES sudo systemctl stop rstudio-pm sudo systemctl start rstudio-pm
# for Ubuntu 14.04 and REHL/CentOS 6 sudo stop rstudio-pm sudo start rstudio-pm
RStudio Package Manager supports the
HUP signal when making licensing changes,
including activating a new license. Some configuration properties are also marked
as “reloadable”. See 5.1 for details about sending a
signal to your RStudio Package Manager process.
HUPsignal only reloads configuration settings that have explicitly changed. Commenting out a setting will not affect the configuration when using the
HUPsignal. If you have commented out a setting instead of changing the setting value, restart the RStudio Package Manager service instead of using the
2.7 Visit the web UI
You should be able to visit RStudio Package Manager in a web browser. The
default port is 4242, so navigate to:
RStudio Package Manager should present a welcome page, though no repositories
are yet available.
2.8 Try out the CLI
You should be able to invoke the admin CLI by running:
/opt/rstudio-pm/bin/rspm list. If you are not able to use the CLI, ensure
your user is a member of the
sudo usermod -aG rstudio-pm USER, replacing
USERwith your username. This command will add
- Close the terminal or SSH session and begin a new session.
- In the new session, run the command
groupsto enumerate the groups the current user is a member of. Confirm that
- Re-run the command:
Note, you can elect a different group to grant access to the CLI, see D.
2.9 Next Steps
Now that RStudio Package Manager is installed, you can complete the second part of the setup by configuring RStudio Package Manager for your desired use case. Follow the instructions in Get Started: Configuration.