9 License Management
9.1 Product Activation
9.1.1 Activation Basics
When RStudio Server is first installed on a system it operates in 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 rstudio-server license-manager status
After purchasing a license to RStudio Server you’ll receive a license key that can be used to activate the license on a given system.
You can activate your license key with the command:
$ sudo rstudio-server license-manager activate <product-key> $ sudo rstudio-server restart
Note that you need to restart the server in order for licensing changes to take effect.
If you want to move your license of RStudio Server to another system you should first deactivate it on the old system with the command:
$ sudo rstudio-server license-manager deactivate
9.2 Connectivity Requirements
In order to activate or deactivate RStudio Server, internet connectivity is required for communication with the licensing server. If your server is behind an internet proxy or not connected to the Internet at all this section describes what’s required to successfully activate.
9.2.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 rstudio-server 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
9.2.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 application which will walk you through the process: RStudio Offline Activation
To activate your license offline, you first generate an offline activation request as follows:
$ sudo rstudio-server 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 and enter into our offline activation application or send 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 rstudio-server license-manager activate-offline <activation-file> $ sudo rstudio-server restart
Note that you need to restart the server in order for licensing changes to take effect.
If you are renewing your license or want to move your license of RStudio Server to another system you can also perform license deactivation offline. You can do this as follows:
$ sudo rstudio-server license-manager deactivate-offline
Executing this command will print an offline deactivation request to the terminal which you should copy and paste and enter into the offline activation application then send to RStudio customer support (firstname.lastname@example.org).
You can also perform an offline check of your current license status using the following command:
$ sudo rstudio-server license-manager status-offline
9.3.1 Extending Evaluations
If you are unable to evaluate RStudio Server during the initial evaluation period, you can obtain a key for extending the evaluation period from RStudio customer support (email@example.com). Once you have the key, supply it to RStudio Server using the
$ sudo rstudio-server license-manager extend-evaluation <key>
If you are performing the evaluation on a physical machine (not on virtualized hardware or containers) without a network connection, you may also request an offline evaluation extension key, which does not require an internet connection. This key may be supplied to RStudio Server as follows:
$ sudo rstudio-server license-manager extend-evaluation-offline <key>
Note that offline evaluation extension keys are valid only on machines which do not have Internet access and are not virtualized. For most offline evaluation extensions, you will need to generate an offline evaluation request (see below for details).
9.3.2 Connectivity Requirements
184.108.40.206 Beginning Evaluations
Generally speaking, there are no network requirements during the evaluation period. Inside virtual machines or sandboxes (such as Docker), however, Internet access is required to begin the evaluation period.
If you have a proxy, you can supply it using the
--proxy argument as described above. If however you have no means of connecting to the Internet from inside the virtual environment, you can begin the evaluation as follows:
$ sudo rstudio-server license-manager begin-evaluation-request
Executing this command will print an offline activation request to the terminal which you should copy and paste and then send to RStudio customer support (firstname.lastname@example.org). You will receive a reply with a file attachment that can be used to begin the evaluation offline as follows:
$ sudo rstudio-server license-manager begin-evaluation-offline <evaluation-file> $ sudo rstudio-server restart
220.127.116.11 Extending Evaluations
You may extend evaluations offline using the same pattern described above (just use
$ sudo rstudio-server license-manager extend-evaluation-request
Then, when you’ve received the evaluation file:
$ sudo rstudio-server license-manager extend-evaluation-offline <evaluation-file> $ sudo rstudio-server restart
9.4 Floating Licensing
If you stop and start RStudio Server instances frequently, for instance because you’re running them inside virtual machines or containers, you may wish to use floating licensing instead of traditional licensing.
To use floating licensing, you run a small, lightweight server, which holds a license that grants you the right to run a certain number of concurrent RStudio Server instances.
When RStudio Server starts, it will connect to the license server and obtain a temporary lease, releasing it when RStudio Server is stopped. Using this method, you can have any number of RStudio Server instances, so long as you do not run more instances at once than specified in your license.
9.4.1 The RStudio Server Pro License Server
The RStudio License Server site contains license server downloads for all RStudio products. Download and install the license server for RStudio Server Pro. You then activate your license key with the command:
$ sudo dpkg -i rsp-license-server-1.0.3-x86_64.deb $ sudo rsp-license-server activate <product-key> $ sudo rsp-license-server start
A license key which distributes floating license leases is not the same as a traditional license key, and the two cannot be used interchangeably. If you have purchased traditional license keys and wish to exchange them for a floating license key, or vice versa, please get in touch with RStudio customer support (email@example.com).
/etc/rsp-license-server.conf contains configuration settings for the RStudio Server Pro License server, including the network port to listen on and any proxy settings required for connecting to the Internet.
9.4.2 License Server Offline Activation
rsp-license-server activate command requires an internet connection. If your license server has no connection to the Internet it’s also possible to perform an offline activation. The process for doing this on the license server is identical to the process used to activate RStudio Server offline. Generate an offline activation request as follows:
$ sudo rsp-license-server activate-offline-request <product-key>
Executing this command will print an offline activation request to the terminal which you should copy and paste and then send to RStudio customer support (firstname.lastname@example.org). You will receive a reply with a file attachment that can be used to activate offline as follows:
$ sudo rsp-license-server activate-offline <activation-file> $ sudo rsp-license-server restart
9.4.3 Using Floating Licensing
Once your license server is up and running, you need to tell RStudio Server to use floating licensing instead of traditional licensing.
remote indicates that RStudio Server should connect to a remote licensing server to obtain a license; the value
local can be used to explicitly specify traditional (local) activation.
Then, tell RStudio Server which licensing server to connect to:
$ sudo rstudio-server license-manager license-server <server-hostname-or-ip> $ sudo rstudio-server restart
You only need to run the
license-server command once; RStudio Server saves the server name and will use it on each subsequent startup.
By default, the RStudio Server Pro License Server listens on port 8989. If you wish to use a different port, you will need to specify the port in
/etc/rsp-license-server.conf, and specify
license-server to RStudio Server as
Depending on your system configuration, it is possible that the RStudio Server service will be started before the service which allows hostname resolution (this is known to be the case for example on some Amazon EC2 systems). If this is the case, you’ll want to specify the license server using a private IP address rather than a hostname, so that RStudio Server can acquire a license immediately when starting up.
9.4.4 Configuring 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:
The lease length controls how frequently the RStudio Server 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 Server instances by making leases available for reuse more quickly. RStudio Server 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 Server Pro License Server. Any such issues that can be resolved before the lease is due for renewal won’t interrupt use of RStudio Server.
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.
9.4.5 Lease Expiration and Renewal
Under normal conditions RStudio Server 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 Server 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:
If you don’t want RStudio Server 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 Server 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 Server instances receive license leases from the limited pool on the license server.
9.4.6 Troubleshooting Floating Licensing
To validate that the 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 rsp-license-server activation-status
If your server is activated but you’re still having trouble with floating licensing, you can tell the RStudio Server Pro License Server to emit more detailed logs. Change the log level to
<log file="/var/log/rstudio-licensing.log" level="notification"/>
Then, restart the license server, tail the licensing log, and start your RStudio Server instances.
$ sudo rsp-license-server restart $ tail -f /var/log/rstudio-licensing.log
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 Server 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.