11 Outbound Proxy

If you are syncing RStudio Package Manager to create your own CRAN repository (see 7.3), the server will need access to the internet to download manifest and package data. If you need to use an outbound proxy server, RStudio Package Manager uses the HTTP_PROXY and HTTPS_PROXY environment variables to configure HTTP or HTTPS proxy behavior.

Typically, it is best to define these environment variables in the startup script used to run RStudio Package Manager. This varies depending on the service daemon. Instructions for systemd and Upstart are listed below.

11.0.1 systemd (Red Hat/CentOS 7, SUSE 12, Ubuntu 16.04+)

  1. Stop the RStudio Package Manager service. See 3.1.

    sudo systemctl stop rstudio-pm
  2. Edit the service configuration.

    sudo vi /etc/systemd/system/rstudio-pm.service.d/user.conf

    Define an HTTP_PROXY or HTTPS_PROXY environment variable:

    [Service]
    Environment="HTTP_PROXY=http://username:password@proxy.example.com:8080"
    Environment="HTTPS_PROXY=http://username:password@proxy.example.com:8080"
  3. Reload the systemd configuration.

    sudo systemctl daemon-reload
  4. Start the RStudio Package Manager service. See 3.1.

    sudo systemctl start rstudio-pm

11.0.2 Upstart (Ubuntu 14.04, Red Hat 6)

  1. Stop the RStudio Package Manager service. See 3.1.

    sudo stop rstudio-pm
  2. Edit the service configuration.

    sudo vi /etc/init/rstudio-pm.override

    Define an HTTP_PROXY or HTTPS_PROXY environment variable:

    env HTTP_PROXY=http://username:password@proxy.example.com:8080
    env HTTPS_PROXY=http://username:password@proxy.example.com:8080
  3. Start the RStudio Package Manager service. See 3.1.

    sudo start rstudio-pm