Skip to content

Licensing#

Overview#

Posit Package Manager uses a built-in license management system. A license controls the number of available repositories, as well as the expiration of your product subscription. This page covers how to:

  • Check the status of your license
  • Activate a new or updated license
  • Troubleshoot various licensing errors

Licensing Status#

Initially, Package Manager operates in evaluation mode and then subsequently requires activation for continued use.

To determine the current license status of your system, run the following command:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager status
Offline Licensing Status Check

You can also perform an offline check of your current license status using the following command:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager status-offline

After purchasing a license to Package Manager, you’ll receive a license key used to activate the license on a given system. You can activate it locally or through a persistent server:

Local Activation Options:

Persistent Server/Floating Licensing Options:

Note

If you are unable to complete your evaluation of Package Manager, the trial period can also be extended.

Local Activation#

With Internet Access#

If you have internet access, activate your license key or file with the following command(s):

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager activate <license-key>
Terminal
$ sudo /opt/rstudio-pm/bin/license-manager activate-file </full/path/to/license-file>

After activation, restart the Package Manager server or send it the HUP signal.

Terminal
$ sudo systemctl restart rstudio-pm

Note

Use a HUP signal when your configuration changes are limited to properties marked as reloadable. Perform a full restart of Package Manager when changing other properties.

A HUP signal only reloads configuration settings that have explicitly changed. Commenting out a setting will not affect the configuration when using the HUP signal. If you have commented out a setting instead of changing the setting value, restart the Package Manager service instead of using the HUP signal.


See the Appendix - Reloadable Properties section to learn which settings may be reloaded via HUP.*

Server log messages related to this component can be shown by enabling the licensing region. More information about activating log regions is in the configuration appendix.

Connectivity Requirements#

To activate or deactivate Package Manager, internet connectivity is required for communicating with the licensing server. More information on specific networking access is available on this Posit documentation Licensing page. If your server is behind an internet proxy or not connected to the internet at all, the sections below describe what's required to successfully activate.

Additionally, your server should have a synchronized system clock, using ntp or some other clock syncing service. If the server's clock is sufficiently incorrect, licensing verification fails.

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 http_proxy or 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:

Terminal
$ 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:pass@127.0.0.1:8080/

If the port is not specified, the license manager will default to using port 1080.

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: Posit Offline Activation

To activate your license offline, you first generate an offline activation request as follows:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager activate-offline-request <product-key>

Executing this command prints an offline activation request to the terminal. Copy and paste the entirety of this request into our offline self-service application, or send it to Posit Support. You will receive a reply with a file attachment that can be used to activate offline as follows:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager activate-offline <activation-file>

After activation, restart the Package Manager server:

Terminal
$ sudo systemctl restart rstudio-pm
Moving an offline local activation

If you want to move your license to another system, first deactivate the license by running the following command:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager deactivate-offline

Executing this command prints an offline deactivation request to the terminal. Copy and paste the entirety of this request into the offline self-service application, or send it to Posit Support.

Then, activate your license on the new system by following the steps directly above in the Offline Local Activation section.

Floating Licensing#

Traditionally, an admin must activate a license on each Package Manager instance by running the activate and deactivate commands. If you start and stop 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 Package Manager instance communicate with this licensing server to lease a license. This configuration can be useful if Package Manager is ephemeral. In this case, you can use the Package Manager License Server.

Important

A specific license key is necessary for floating licensing. Please contact Posit customer support (support@posit.co) to obtain a key that supports floating licensing.

Activation#

With Internet Access#

If you have internet access, complete the following steps to activate a floating license on the persistent server:

  1. Install the License Server on a persistent server with network access to the Package Manager instance(s) and activate your license key on the License Server.
  2. Configure Package Manager to use the License Server.
  3. Optionally, change the Package Manager License Server defaults.
Install the License Server#

Follow these instructions in a persistent server running the Package Manager License Server.

Download the Package Manager License Server and then install the server and activate the license:

Terminal
$ sudo dpkg -i <rspm-license-server-version.deb>
$ sudo rspm-license-server activate <license-key>
$ sudo rspm-license-server start
Terminal
$ sudo yum install --nogpgcheck <rspm-license-server-version.rpm>
$ sudo rspm-license-server activate <license-key>
$ sudo rspm-license-server start
Terminal
$ sudo zypper --no-gpg-checks install <rspm-license-server-version.rpm>
$ sudo rspm-license-server activate <license-key>
$ sudo rspm-license-server start
Configure Package Manager to use the License Server#

Once the Package Manager license server is installed and activated, configure Package Manager to use the license server.

Follow these instructions in Package Manager or script them into your configuration management tools that will be building, starting, and stopping Package Manager.

  1. Edit the Package Manager configuration file:

    /etc/rstudio-pm/rstudio-pm.gcfg
    [Licensing]
    LicenseType = remote
    
  2. In the server running Package Manager, execute:

    Terminal
    $ sudo /opt/rstudio-pm/bin/license-manager license-server <rspm-license-server-host-or-ip:port>
    

    By default, the Package Manager license server runs on port 8969. The license-server command only needs to be run once. If the same Package Manager server subsequently starts and stops, it saves the Package Manager License Server address. However, if you rebuild the server or image running Package Manager you will need to re-run the license-server command.

  3. Restart Package Manager or send it the HUP signal:

    Terminal
    $ sudo systemctl restart rstudio-pm
    

Note

Use a HUP signal when your configuration changes are limited to properties marked as reloadable. Perform a full restart of Package Manager when changing other properties.

A HUP signal only reloads configuration settings that have explicitly changed. Commenting out a setting will not affect the configuration when using the HUP signal. If you have commented out a setting instead of changing the setting value, restart the Package Manager service instead of using the HUP signal.


See the Appendix - Reloadable Properties section to learn which settings may be reloaded via HUP.*

Changing the Package Manager License Server Defaults (Optional)#
Port#

The port used by the Package Manager license server can be changed:

/etc/rspm-license-server.conf
<bind port="8969"/>

After modifying /etc/rspm-license-server.conf, restart the Package Manager license server:

Terminal
$ sudo rspm-license-server restart
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. For instance, to make license leases last 30 minutes, use the following syntax:

/etc/rspm-license-server.conf
<lease length="1800"/>

The lease length controls how frequently the Package Manager instances need to contact the licensing server to renew their license leases.

A shorter lease length will increase tolerance to failures on Package Manager instances by making leases available for reuse more quickly. Package Manager will release its lease immediately if shut down normally. 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 Package Manager license server. Any such issues that can be resolved before the lease is due for renewal won’t interrupt use of 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.

Changing the Lease Expiration and Renewal Default#

This configuration can be scripted into the build process for ephemeral instances.

Under normal conditions, Package Manager will automatically renew its license lease in a configurable interval as described above. However, there are situations in which it would be unable to automatically renew. Examples of these situations include a network problem, or an issue on the host running the license server.

When 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, set the following value:

/etc/rstudio-pm/rstudio-pm.gcfg
[Licensing]
RemoteRetryFrequency = 30s

If you don’t want Package Manager to attempt to reestablish a license lease automatically, set the value to 0 to disable retries. In this case, you need to manually restart Package Manager or send it the HUP signal 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 Package Manager instances receive license leases from the limited pool on the license server.

Note

Use a HUP signal when your configuration changes are limited to properties marked as reloadable. Perform a full restart of Package Manager when changing other properties.

A HUP signal only reloads configuration settings that have explicitly changed. Commenting out a setting will not affect the configuration when using the HUP signal. If you have commented out a setting instead of changing the setting value, restart the Package Manager service instead of using the HUP signal.


See the Appendix - Reloadable Properties section to learn which settings may be reloaded via HUP.

Offline Activation#

If you are running the Package Manager Licensing Server in an offline environment, you need to perform an additional offline activation. First, generate an offline activation request:

Terminal
$ sudo rspm-license-server activate-offline-request <license-key>

Executing this command prints an offline activation request to the terminal. Copy and paste the entirety of this request into the offline self-sevice application, or send it to Posit Support. You will receive a reply with a file attachment that can be used to activate offline as follows:

Terminal
$ sudo rspm-license-server activate-offline <activation-file>
$ sudo rspm-license-server restart
Moving a floating license offline

To move your floating license to another system, first deactivate the license by running the following command:

Terminal
$ sudo rspm-license-server deactivate-offline-request <product-key>

Executing this command prints an offline deactivation request to the terminal. Copy and paste the entirety of this request into the offline self-service application, or send it to Posit Support.

Then, activate your license on the new system by following the steps directly above in the Offline Floating Activation section.

License Server Deactivation#

If you are permanently decommissioning your license server or need to transfer its license to a different license server, deactivate (remove) its license as follows:

Terminal
sudo systemctl stop rstudio-pm
sudo rspm-license-server stop
sudo rspm-license-server deactivate
sudo /opt/rstudio-pm/bin/license-manager clear-license-server

Troubleshooting Floating Licensing#

Run the following troubleshooting steps on the persistent Package Manager license server.

To validate that the Package Manager 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.

Terminal
$ sudo rspm-license-server activation-status

If your server is activated but you’re still having trouble with floating licensing, you can tell the Package Manager 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 Package Manager instances.

Terminal
$ 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 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.

Evaluations#

Extending Evaluations#

If you are unable to complete your evaluation during the evaluation period, contact your Customer Success Representative or Posit Sales (sales@posit.co) to speak about your evaluation process and how we may be able to help with the remaining items you need to test.

If possible, include the output from running the following command:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager extend-evaluation-request

Connectivity Requirements#

Beginning Evaluations#

Generally, 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 in the Proxy Server section above.

If you have no means of connecting to the Internet from inside the virtual environment, you can begin the evaluation by executing the following command:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager begin-evaluation-request

Executing this command prints an offline activation request to the terminal. Copy and paste the entirety of this request into the offline self-sevice application, or send it to Posit Support. You will receive a reply with a file attachment that can be used to begin the evaluation offline as follows:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager begin-evaluation-offline <evaluation-file>
$ sudo systemctl restart rstudio-pm

Restart Package Manager after starting your offline evaluation for licensing changes to take effect.

Renewing a License#

After purchasing a license renewal, you will receive an email with the license key. Next, follow the steps outlined below to activate the license, based on the type of license renewal that you require (Offline License Renewal or Offline License Renewal).

Online License Renewal#

To renew a license online, run the following commands:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager deactivate
$ sudo /opt/rstudio-pm/bin/license-manager activate <product-key>
$ sudo stop rstudio-pm
$ sudo start rstudio-pm

Check the status of the license by running:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager status

Offline License Renewal#

For offline licenses, first deactivate and reactivate the server to ensure that it picks up the new license expiration date by running the following commands:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager deactivate-offline <product-key>
$ sudo /opt/rstudio-pm/bin/license-manager activate-offline-request <product-key>

Executing these commands prints an offline deactivation request to the terminal. Copy and paste the entirety of this request into the offline self-service application. You will receive a reply with a file attachment that can be used to activate offline as follows:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager activate-offline <activation-file>
$ sudo stop rstudio-pm
$ sudo start rstudio-pm

Check the status of the license by running:

Terminal
$ sudo /opt/rstudio-pm/bin/license-manager status-offline

Licensing Errors#

Package Manager uses the license-manager to determine if a valid license is available. Should an error occur when interacting with the license manager, Package Manager indicates that problem in the /var/log/rstudio/rstudio-pm/rstudio-pm.log log. The license manager sends details about the error to the system messages (syslog). Consult both locations should Package Manager be unable to obtain license status.

Server log messages related to this component can be shown by enabling the licensing region. More information about activating log regions is in the configuration appendix.

Repository Count#

In part, Package Manager is licensed 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 also occurs 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 Posit customer support (support@posit.co) or your customer success rep.
  • Consider restructuring your sources and repository subscriptions. Multiple sources can be combined into a single repository.
  • Delete unused repositories.

To delete unused repositories, use the delete command, for example:

Terminal
$ rspm delete repo --name=<repoName>

Package Manager continues 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.