Docs

Install server

Choose your operating system:

Linux Server

This guide was tested on Ubuntu Server and Debian Server.

The linux installation guide is not yet finished and this section is in construction.

$ cd
$ mkdir rpgm
$ cd rpgm
$ wget https://linktorpgmserver.zip
$ unzip rpgm-server.zip
$ rm rpgm-server.zip
$ nano config.xml
Setting Description
port The main port of the server. 80 is the default HTTP port.
pgmPort The starting port used by PGM instances. Please note that each launched instance uses 3 ports (for the instance, for R and for the R help).
root The root URL of your server. It might be a domain name like http://example.com or an IP like http://192.168.10.3
rPath The path to the R folder. For linux it should be /usr/lib/R
rVersion The version of R to use. 32 or 64.
$ npm install
$ cd rpgm-server
$ npm install
$ cd ..
$ npm run create-admin
$ npm start

Running in Screen

RPGM can be run in Screen.

$ screen -S rpgm
$ npm start

You can detach from screen with Ctrl+A then D. To re-attach:

$ screen -r rpgm

Configuration

RPGM Server now needs some configuration in the admin panel.

  • Open an internet browser and navigate to RPGM Server by entering the URL.
  • Sign in with the credentials created during installation.
  • On the top right, click on your name and select "Admin".

Screenshot

  • In the sub-menu, click on Server then Configuration.

Screenshot

  • You are now in the Server Settings.

Screenshot

Emails must be configured with an SMTP server. This is mandatory to send email for verifying accounts and for sending new passwords if a user forget its password. Configure the SMTP server address, port, user and password.

If you need an SMTP server, you can check on these ones: Mailgun, Sendgrid, Mailjet, Elastic Email. More exists and they generally have a free plan of several thousands of mails per month, which should be more than enough for RPGM server.

Windows Server

Quick reminder about IE

The default browser in Windows Server is Internet Explorer (IE). IE by default is in a "hard admin" mode with extended security features, like Javascript which is disabled by default. This might impact your experience navigating on Internet. Also, IE might ask you a permission to whitelist a website before visiting it. If you don't want to struggle with this, download another browser like Google Chrome.

Prerequisites

  • R must be installed using the official website. RPGM Server was tested with R 3.6 versions but should work for all 3.x versions.
  • Node.js must be installed from the official website. RPGM was tester with version 10.16.3 LTS.

RPGM Server

  • Download RPGM Server with the link we provided to you.
  • Right click on the rpgm-server.zip file and choose Extract to... and change to target folder to where you want to install it.

Screenshot

Screenshot

  • Go to that folder and right click on config.yml and choose Open or Open with.... If the file does not open in notepad or another text editing software, choose Open with.... Select Notepad:

Screenshot

Screenshot

  • When the file is open, change the settings:
Setting Description
port The main port of the server. 80 is the default HTTP port.
pgmPort The starting port used by PGM instances. Please note that each launched instance uses 3 ports (for the instance, for R and for the R help).
root The root URL of your server. It might be a domain name like http://example.com or an IP like http://192.168.10.3
rPath The path to the R folder
rVersion The version of R to use. 32 or 64.

Screenshot

  • Execute the file windows-install.bat by double clicking on it. During the process, an email and a password will be asked for creating the main administrator of RPGM.

Start, restart, stop

RPGM is installed as a service. You can see it by going in the Services screen of Windows:

Screenshot

Screenshot

From there, you can stop, restart, start and with right-click then Properties you can choose how the server starts on Windows startup.

Screenshot

Open ports

Some ports need to be open for RPGM to work from outside. This includes the 80 port for HTTP but also the port for PGM instances.

  • Go to the Firewall with advanced security.

Screenshot

  • Right click on Inbound Rules on the right panel and select New Rule....

Screenshot

  • Select Port and click Next.

Screenshot

  • Select TCP and enter 80, 25000-25300. Adjust these numbers to the one you have in the config.yml. Please note that each launched instance use 3 ports (for the instance, for R and for the R help). So if you want your server to handle 100 simultaneous instances, you should use a range of 300 ports. Click Next when done.

Screenshot

  • Select Allow the connection then Next.

Screenshot

  • Ports are now opened!

Configuration

RPGM Server now needs some configuration in the admin panel.

  • Open an internet browser and navigate to RPGM Server by entering the URL.
  • Sign in with the credentials created during installation.
  • On the top right, click on your name and select "Admin".

Screenshot

  • In the sub-menu, click on Server then Configuration.

Screenshot

  • You are now in the Server Settings.

Screenshot

Emails must be configured with an SMTP server. This is mandatory to send email for verifying accounts and for sending new passwords if a user forget its password. Configure the SMTP server address, port, user and password.

If you need an SMTP server, you can check on these ones: Mailgun, Sendgrid, Mailjet, Elastic Email. More exists and they generally have a free plan of several thousands of mails per month, which should be more than enough for RPGM server.

Uninstall

To uninstall RPGM Server, go to rpgm-server folder and double click on the file windows-uninstall.bat. You might need to go to the Windows' Services screen to stop the rpgm-server service (See above). You can then delete the rpgm-server folder.