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 product key that can be used to activate the license on a given system. You can perform the activation as follows:
$ 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 system you are moving from. For example:
$ 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. Note however that this may not be necessary if either the
all_proxy environment variable is defined (these are read and used by RStudio Server 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 1080.
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 app 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. Once you have the key, supply it to RStudio server using the
$ sudo rstudio-server license-manager extend-evaluation <key>
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>
9.3.2 Connectivity Requirements
Generally speaking, there are no network requirements during the evaluation period. Inside virtual machines or sandboxes (such as Docker), however, Internet access is required 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 (email@example.com). 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
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 the licenses and distributes leases. When an RStudio Server instance starts, it will connect to the server and obtain a temporary lease on a license, releasing it when the instance is stopped. Using this method, you can have more RStudio Server instances than licenses, so long as you do not run more instances at once than you have licenses.
9.4.1 The RStudio Server Pro License Server
To get started with floating licensing, you first need to download and install the RStudio Server Pro License Server on a machine in your network. You then activate the license server with your license key, using a command like the following:
$ sudo rsp-license-server activate <product-key> $ sudo rsp-license-server start
A license key which distributes floating licenses 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.
/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
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 Servers by make 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 License Server. Any such issues that can be resolved before the lease is due for renewal won’t interrupt use of the 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 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.