Resolving license activation issues with a "Error activating product key: Connection to the server failed." message


If you see this message while trying to activate your license for RStudio Workbench (previously RStudio Server Pro), Shiny Server Pro, or RStudio Connect this indicates that there's an issue with your server not being able to contact our licensing server. This is most common if your server is not connected to the Internet, or if it's behind some kind of firewall or proxy. 

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 http_proxy or all_proxy environment variable is defined (these are read and used by our server products 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= activate <product-key>


$ sudo /opt/shiny-server/bin/license-manager --proxy= activate <product-key>

Proxy settings can include a host-name, port, and username/password if necessary. The following are all valid proxy configurations:

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, follow the directions given in our app here.

If you have any questions or concerns about this please file a premium support ticket with RStudio Support and we'll be happy to help you.