License Management

Capabilities

A Posit Connect product license limits usage in the following ways:

  • Number of user accounts that have signed into Posit Connect.

    Once the user account limit is reached, additional users will not be permitted to sign into Posit Connect. This limit is enforced the first time each user logs in.

    Locked users are not counted against this quota.

    Users not recently active on the server are not counted against this quota. Users are deemed “inactive” after 365 days without visiting Posit Connect, though this value may vary for certain licenses.

  • Number of users that can access Shiny applications at one moment in time.

    When this limit is exceeded, new anonymous users will be unable to view the requested application. This limitation does not affect logged-in users.

  • Log in may be required to access interactive content backed by a hosted server component (e.g., Shiny applications).

  • Support for hosting of API content.

  • Rendered and static content that does not require login may display a dismissible “Powered by Posit Connect” badge (e.g., rendered content such as Quarto projects, and static content such as HTML documents and pins).

  • Support for branding customization.

  • Support for current user execution (Applications.RunAsCurrentUser).

  • Support for off-host execution.

The settings of each metric depend on the license purchased from Posit.

Contact Posit Sales () to purchase a Posit Connect product license.

Adjust the capabilities included in your existing Posit Connect license through your dedicated Posit Customer Success contact or email .

Product activation

When Posit Connect is first installed on a system it operates in evaluation mode for a period of time and then subsequently requires activation for continued use. If you find that an automatic evaluation is not available on your system, speak to your dedicated Posit Customer Success contact or email Posit Support () to speak about your evaluation.

Licensing status

Determine the current license status of your system with the command:

sudo /opt/rstudio-connect/bin/license-manager status

Activation options

After purchasing a Posit Connect license, you will receive a license key or license file that can be used to activate the license on a given system.

Using license keys

A license key is a combination of letters and numbers with the shape AAAA-BBBB-CCCC-DDDD-EEEE-FFFF-GGGG.

Using license files

A license file is an encrypted text file with a name having the shape <expiration-date>_<product-code>_<organization>_<license-key>.lic.

Local activation

Activating a license key

You can activate your license key with the command:

sudo /opt/rstudio-connect/bin/license-manager activate <product-key>
sudo systemctl restart rstudio-connect

Note that you need to restart Posit Connect after activation for licensing changes to take effect.

Note

Your platform may use alternate commands to restart Posit Connect. Please see the Stopping and Starting section for instructions specific to your operating system version.

If you want to move your license of Posit Connect to another system you should first deactivate it on the old system with the command:

sudo /opt/rstudio-connect/bin/license-manager deactivate

Connectivity requirements

In order to activate or deactivate Posit Connect, internet connectivity is required for communication with the licensing server. More information on specific networking access is available here. 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.

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 will fail.

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:

sudo /opt/rstudio-connect/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 application which walks you through the process: Posit Offline Activation.

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

sudo /opt/rstudio-connect/bin/license-manager \
    activate-offline-request <product-key>

Executing this command prints an offline activation request to the terminal which you should copy and paste and enter into our offline activation application or send to Posit customer support (). You will receive a reply with a file attachment that can be used to activate offline as follows:

sudo /opt/rstudio-connect/bin/license-manager \
    activate-offline <activation-file>
sudo systemctl restart rstudio-connect

You need to restart Posit Connect after activation for licensing changes to take effect.

Note

Your platform may use alternate commands to restart Posit Connect. Please see the Stopping and Starting section for instructions specific to your operating system version.

If you are renewing your license or want to move your license of Posit Connect to another system you can also perform license deactivation offline. You can do this as follows:

sudo /opt/rstudio-connect/bin/license-manager deactivate-offline

Executing this command prints an offline deactivation request to the terminal which you should copy and paste and enter into the offline activation application then send to Posit customer support ().

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

sudo /opt/rstudio-connect/bin/license-manager status-offline

License files

A license file is an encrypted text file that fully describes the purchased product license. It includes details like the expiration date, number of users, and entitlements permitted by the license. Use of license files does not communicate with an external licensing provider, making it suitable for containerized, offline, and air-gapped environments.

If you are having issues with one of the other licensing methods, please speak to Posit customer support () about using license files.

Important

You must ensure that the license file is secured, used only in your environment, and within the bounds of your license agreement.

Activating a license file

Transfer the license file to the server hosting Posit Connect and activate it with the commands:

sudo chown root <license-file>.lic
sudo chmod 0600 <license-file>.lic
sudo cp -a <license-file.lic> /var/lib/rstudio-connect/
sudo systemctl restart rstudio-connect

When a *.lic file is found beneath the /var/lib/rstudio-connect directory, other licensing methods are bypassed.

Note that you need to restart Connect after activation for licensing changes to take effect.

Note

Your platform may use alternate commands to restart Posit Connect. Please see the Stopping and Starting section for instructions specific to your operating system version.

Deactivating a license file

Deactivate a license file by removing it from the /var/lib/rstudio-connect directory.

rm /var/lib/rstudio-connect/*.lic
sudo systemctl restart rstudio-connect
Note

Your platform may use alternate commands to restart Posit Connect. Please see the Stopping and Starting section for instructions specific to your operating system version.

Deactivate your license file before moving the license to another system.

If you are using a license file in a container, there is no need to worry about deactivation when the container is terminated.

Floating licenses

If you stop and start Posit Connect 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 Posit Connect instances.

When Posit Connect starts, it will connect to the license server and obtain a temporary lease, releasing it when Posit Connect is stopped. Using this method, you can have any number of Posit Connect instances, so long as you do not run more instances at once than specified in your license.

The Posit Connect License Server

The Posit License Server site contains license server downloads for all Posit products. Download and install the license server for Posit Connect. You then activate your license key with the command:

sudo dpkg -i connect-license-server-1.0.9-x86_64.deb
sudo connect-license-server activate <product-key>
sudo connect-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 Posit customer support ().

The file /etc/connect-license-server.conf contains configuration settings for the Posit Connect License server, including the network port to listen on and any proxy settings required for connecting to the Internet.

License Server offline activation

The connect-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 Posit Connect offline. Generate an offline activation request as follows:

sudo connect-license-server activate-offline-request <product-key>

Executing this command prints an offline activation request to the terminal which you should copy and paste the entire response of into our self-service Offline Activation application activation 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:

sudo connect-license-server activate-offline <activation-file>
sudo connect-license-server restart

Using floating licensing

Once your license server is up and running, you need to tell Posit Connect to use floating licensing instead of traditional licensing.

/etc/rstudio-connect/rstudio-connect.gcfg

; /etc/rstudio-connect/rstudio-connect.gcfg
[Licensing]
LicenseType = remote

The value remote indicates that Posit Connect 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 Posit Connect which licensing server to connect to:

sudo /opt/rstudio-connect/bin/license-manager \
    license-server <server-hostname-or-ip>
sudo systemctl restart rstudio-connect

Note that you need to restart Posit Connect after configuring a remote license server for licensing changes to take effect.

Note

Your platform may use alternate commands to restart Posit Connect. Please see the Stopping and Starting section for instructions specific to your operating system version.

You only need to run the license-server command once; Posit Connect saves the server name and will use it on each subsequent startup.

By default, the Posit Connect License Server listens on port 8999. If you wish to use a different port, you will need to specify the port in /etc/connect-license-server.conf, and specify license-server to the license manager as <server-hostname-or-ip:port>.

Depending on your system configuration, it is possible that the Posit Connect 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 Posit Connect can acquire a license immediately when starting up.

Renewing or moving a floating license

If you are renewing your floating license offline or if you want to move your floating license for Posit Connect to another system, then you can perform license deactivation offline.
To do this, run the following command:

sudo connect-license-server deactivate-offline-request <product-key>

Executing this command prints an offline activation request to the terminal which you should copy and paste the entire response of into our self-service Offline Activation application activation application>, or send it to Posit Support.

Specifying a License Server

Posit Connect supports three methods for connecting to a license server.

The default method connects via raw TCP on port 8999.

sudo /opt/rstudio-connect/bin/license-manager \
    license-server <mylicensehost:8999>
sudo systemctl restart rstudio-connect

The second method is to connect via HTTPS. This requires the license server to be listening over HTTPS, which can be configured to do so with the instructions here.

sudo /opt/rstudio-connect/bin/license-manager \
    license-server https://<mylicensehost>/
sudo systemctl restart rstudio-connect

The third method is to connect to a hosted license server. This method requires a special UUID which can be obtained here.

sudo /opt/rstudio-connect/bin/license-manager license-server <UUID>
sudo systemctl restart rstudio-connect

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:

/etc/connect-license-server.conf

<lease length="1800"/>

The lease length controls how frequently the Posit Connect 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 Posit Connect instances by making leases available for reuse more quickly. Posit Connect 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 Posit Connect License Server. Any such issues that can be resolved before the lease is due for renewal won’t interrupt use of Posit Connect.

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.

Lease expiration and renewal

Under normal conditions Posit Connect 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 Posit Connect 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-connect/rstudio-connect.gcfg
[Licensing]
RemoteRetryFrequency = 30s

If you don’t want Posit Connect 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 Posit Connect 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 Posit Connect instances receive license leases from the limited pool on the license server.

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 connect-license-server activation-status

If your server is activated but you’re still having trouble with floating licensing, you can tell the Posit Connect License Server to emit more detailed logs. Change the log level to notification:

<!-- /etc/connect-license-server.conf -->
<log file="/var/log/rstudio-licensing.log" level="notification"/>

Then, restart the license server, tail the licensing log, and start your Posit Connect instances.

sudo connect-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 Posit Connect 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.

Notification of expiration

Posit Connect will attempt to send email to administrators when the license key is 60 days from expiration. You can disable this behavior with the Licensing.ExpirationEmail setting.

The Connect Dashboard will display a notification to admins and publishers when the license is within 15 days of expiration. You can disable this behavior with the Licensing.ExpirationUIWarning setting.

Licensing errors

Posit Connect uses the license-manager to determine if a valid license is available. Should an error occur when interacting with the license manager, Connect indicates that problem in the /var/log/rstudio/rstudio-connect/rstudio-connect.log log. The license manager sends details about the error to the system messages (syslog). You should consult both locations if Connect cannot obtain a license.

Connect also displays an error page with an appropriate message if a requested feature is not supported by your license. Adjust the capabilities included in your existing Posit Connect license through your dedicated Posit Customer Success contact or email .

Support for off-host execution

The Launcher Feature Denied error is displayed when off-host execution is configured for Connect but your license does not support the feature.

Note

If you would like to use off-host execution with Connect, your license must support this. Speak to your dedicated Posit Customer Success contact or email to adjust the capabilities included in your existing Posit Connect license.

Please refer to the off-host execution section of the Admin Guide to learn more.