When RStudio Package Manager is first installed on a system it operates in an evaluation mode for a period of time and then subsequently requires activation for continued use.
To determine the current license status of your system, you can use the following command:
sudo /opt/rstudio-pm/bin/license-manager status
After purchasing a license to RStudio Package Manager, you will receive a product key that is used to activate the license on a given system.
You can activate your license key with the command:
sudo opt/rstudio-pm/bin/license-manager activate <product-key>
After activation, restart the RStudio Package Manager server.
sudo stop rstudio-pm sudo start rstudio-pm
Your platform may need alternate commands to restart RStudio Package Manager. Please see Section 5.1 for instructions specific to your operating system version.
If you want to move your license of RStudio Package Manager to another system, you should first deactivate it on the old system.
sudo /opt/rstudio-pm/bin/license-manager deactivate
6.1 Proxy Servers
If your server is behind an internet proxy, you may need to add an additional
command line flag indicating the address and credentials required to
communicate through the proxy. This may not be necessary if either the
all_proxy environment variable is defined (these are read
and used by the license manager when available).
If you do need to specify a proxy server explicitly you can do so using the
--proxy command line parameter. For example:
sudo /opt/rstudio-pm/bin/license-manager \ --proxy=http://127.0.0.1/ activate <product-key>
Proxy settings can include a host-name, port, and username/password if necessary. The following are all valid proxy configurations:
http://127.0.0.1/ http://127.0.0.1:8080/ http://user:firstname.lastname@example.org:8080/
If the port is not specified, the license manager will default to using port
6.2 Offline Activation
If your system has no connection to the internet it’s also possible to perform an offline activation. To do this, we recommend using our offline activation app which will walk you through the process: RStudio Offline Activation
You first generate an offline activation request as follows:
sudo /opt/rstudio-pm/bin/license-manager activate-offline-request <product-key>
Executing this command will print an offline activation request to the terminal which you should copy and paste into an email to RStudio customer support (email@example.com). You will receive a reply with a file attachment that can be used to activate offline as follows:
sudo /opt/rstudio-pm/bin/license-manager activate-offline <activation-file>
After activation, restart the RStudio Package Manager server. Please see Section 5.1 for instructions specific to your operating system version.
If you want to renew your license of RStudio Package Manager or move it to another system you can also perform license deactivation offline. You can do this as follows:
sudo /opt/rstudio-pm/bin/license-manager deactivate-offline
Executing this command will print an offline deactivation request to the terminal which you should send to firstname.lastname@example.org.
You can also perform an offline check of your current license status using the following command:
sudo /opt/rstudio-pm/bin/license-manager status-offline
6.3 Licensing errors
RStudio Package Manager uses the
license-manager to determine if a valid license is
available. Should an error occur when interacting with the license manager,
RStudio Package Manager indicates that problem in the
The license manager sends details about the error to the system messages
(syslog). You should consult both locations should RStudio Package Manager be unable to
obtain license status.
6.4 Repository Count
RStudio Package Manager is licensed, in part, by the number of available repositories. In some situations the web interface may display the message:
The number of repos exceeds the licensed repo count. Please see a system administrator.
This error may occur if you activate your license after the evaluation and have created more repositories than your license allows. The error may also occur if you downgrade your license. A similar error will also occur if you try to create a new repository after you reach your repository limit.
This error indicates that you are in violation of your license and steps should be taken immediately:
- If you require all of your repositories, or if a mistake has been made with the license, email email@example.com or your customer success rep.
- Consider restructuring your sources and repository subscriptions. Multiple sources can be combined into a single repository.
- Delete unused repositories with the
RStudio Package Manager will continue to serve packages from all defined repositories to provide a grace period while you apply changes. However, you are obligated to bring your configuration back into compliance with your license agreement.
6.5 Floating Licenses
Traditionally, an admin must activate a license on each RStudio Package Manager
instance by running the
deactivate commands. If you start and
stop RStudio Package Manager frequently, for instance because you are running
inside a virtual machine or docker container, it is preferable to use floating
licensing. Floating licensing allows you to run a standalone licensing server
and then have each RStudio Package Manager instance communicate with this
licensing server to lease a license. This configuration can be useful if
RStudio Package Manager is ephemeral. In this case, you can use the RStudio
Package Manager License Server (RSPM License Server).
As an administrator you’ll need to follow these steps:
- Install the RSPM License Server on a persistent server with network access to the RStudio Package Manager instance(s).
- Activate your license key on the RSPM License Server
- Configure RStudio Package Manager to use the RSPM License Server
- (Optional) Change the RSPM License Server defaults
6.5.2 RSPM License Server
Follow these instructions in a persistent server that will run the RSPM License Server.
Download the RSPM License Server and then install the server and activate the license:
sudo dpkg -i <rspm-license-server-version.deb> sudo rspm-license-server activate <license-key> sudo rspm-license-server start
sudo yum install --nogpgcheck <rspm-license-server-version.rpm> sudo rspm-license-server activate <license-key> sudo rspm-license-server start
sudo zypper --no-gpg-checks install <rspm-license-server-version.rpm> sudo rspm-license-server activate <license-key> sudo rspm-license-server start
A specific license key is necessary for floating licensing. Please reach out to firstname.lastname@example.org to swap the default license key for a key that supports floating licensing.
188.8.131.52 Offline Activation
If you are running the RStudio Package Manager Licensing Server in an offline environment you will need to perform an additional offline activation. First, generate an offline activation request:
sudo rspm-license-server activate-offline-request <license-key>
Executing this command will print an offline activation request. Copy this request and send it to email@example.com. You will receive a reply with a file attachment, use the attached file to complete the activation:
sudo rspm-license-server activate-offline <activation-file> sudo rspm-license-server restart
6.5.3 Configuring RStudio Package Manager to Use the RSPM License Server
Once the RSPM License Server is installed and activated, you need to configure RStudio Package Manager to use the License Server.
Follow these instructions in RStudio Package Manager or script them into your configuration management tools that will be building, starting, and stopping RStudio Package Manager.
- Edit the RStudio Package Manager configuration file:
; /etc/rstudio-pm/rstudio-pm.gcfg [Licensing] LicenseType = remote
- In the server running RStudio Package Manager, execute:
sudo /opt/rstudio-pm/bin/license-manager license-server <rspm-license-server-host-or-ip:port>
By default, the RSPM License Server runs on port 8969. The
only needs to be run once. If the same RStudio Package Manager server
subsequently starts and stops it will remember the RSPM License Server address.
However, if you rebuild the server or image running RStudio Package Manager you
will need to re-run the
- Restart RStudio Package Manager using the commands specific to your operating system:
sudo stop rstudio-pm; sudo start rstudio-pm;
sudo systemctl stop rstudio-pm; sudo systemctl start rstudio-pm
6.5.4 Changing the RSPM License Server Defaults
These instructions refer to configuration settings on the persistent RSPM License Server.
The port used by the RSPM License Server can be changed:
<!-- /etc/rspm-license-server.conf--> <bind port="8969"/>
/etc/rspm-license-server.conf, restart the RSPM License Server:
sudo rspm-license-server restart
184.108.40.206 License Leases
When using floating licenses, you can optionally determine how long the license
leases last by setting the
lease length value on the licensing server. This
value is in seconds, so for instance to make license leases last 30 minutes you
would use the following syntax:
<!--/etc/rspm-license-server.conf--> <lease length="1800"/>
The lease length controls how frequently the RStudio Package Manager instances need to contact the licensing server to renew their license leases in order for the lease to remain valid.
A shorter lease length will increase tolerance to failures on RStudio Package Manager instances by making leases available for reuse more quickly. RStudio Package Manager will release its lease immediately if shut down normally, but if abnormally terminated, the lease will not be released until it expires.
A longer lease length will increase tolerance to transient failures on the network and the RStudio Package Manager License Server. Any such issues that can be resolved before the lease is due for renewal won’t interrupt use of RStudio Package Manager.
We generally recommend using a longer lease length. Use a short lease length only if your environment routinely encounters abnormal terminations of the server or the container/instance on which it runs.
6.5.5 Changing the RStudio Package Manager Lease Expiration and Renewal Default
This configuration applies to RStudio Package Manager and can be scripted into the build process for ephemeral instances.
Under normal conditions RStudio Package Manager will automatically renew its license lease in a configurable interval as described above. However, there are situations in which it will be unable to do so, such as a network problem, or an issue on the host running the license server.
When RStudio Package Manager cannot obtain a license lease, either because there are no leases currently available or because it can’t reach the licensing server, it will begin automatically attempting to acquire a lease every 10 seconds. This interval is configurable; for instance, to retry every 30 seconds instead you would set the following value:
; /etc/rstudio-pm/rstudio-pm.gcfg [Licensing] RemoteRetryFrequency = 30s
If you don’t want RStudio Package Manager to attempt to reestablish a license lease automatically, set the value to 0 to disable retries. In this case you will need to manually restart RStudio Package Manager in order to reestablish the lease. This can be useful if you often run more instances than you have keys for, and wish to have more control over which RStudio Package Manager instances receive license leases from the limited pool on the license server.
6.5.6 Troubleshooting Floating Licensing
Run these troubleshooting steps on the persistent RSPM License Server.
To validate that the RSPM License Server has been successfully activated, run the
activation-status command. This will report the version of the server as well as
the license key and the number of available slots.
sudo rspm-license-server activation-status
If your server is activated but you’re still having trouble with floating licensing, you can tell the RSPM License Server to emit more detailed logs. Change the log level to notification:
<!--/etc/rspm-license-server.conf--> <log file="/var/log/rstudio-licensing.log" level="notification"/>
Then, restart the License Server, tail the licensing log, and start your RStudio Package Manager instances.
sudo rspm-license-server restart tail -f /var/log/rstudio-licensing.log
At the notification level, the licensing log will tell you the total number of licenses associated with your key, and how many are currently in use. It will also notify you when RStudio Package Manager instances acquire leases, and when those leases are released, renewed, or expired. No rotation is done for this log, so it’s recommended to use the warning level in production.