Configuring SSL Certificates in Posit Package Manager#
RStudio is now Posit!
Our professional products have been renamed to Posit Connect, Posit Workbench, Posit Package Manager, Posit Cloud, and Posit Academy so it’s easier for folks to understand that we support more than just R. Please review our Blog post/FAQ to answer commonly asked questions about the rebrand.
Configuring SSL certificates#
You can configure SSL/TLS certificates by editing the configuration file to point to the relevant private key and certificate files and restarting Posit Package Manager, formerly RStudio Package Manager.
To configure SSL certificates, add the following lines to the Package Manager configuration file:
[HTTPS]
Listen = :443
Certificate = <PATH-TO-CERTIFICATE-FILE>
Key = <PATH-TO-KEY-FILE>
Info
When modifying HTTP.Listen
or HTTPS.Listen
to use a privileged port under 1024 like the configuration example above, you must grant the Package Manager binary permission to do so by issuing the following command:
$ sudo setcap 'cap_net_bind_service=+ep' /opt/rstudio-pm/bin/rstudio-pm
Then restart Package Manager by running the following command:
$ sudo systemctl restart rstudio-pm
Configuring HTTP to HTTPS redirects#
To redirect all HTTP traffic to the secure HTTPS endpoint, add the following lines to the Package Manager configuration file:
[Server]
Address = https://<SERVER-ADDRESS>
[HTTPS]
Listen = :443
Permanent = true
Certificate = <PATH-TO-CERTIFICATE-FILE>
Key = <PATH-TO-KEY-FILE>
[HTTPRedirect]
Listen = :80
Info
For HTTP to HTTPS redirects to work properly, ensure that you remove the
HTTP.Listen
option from the configuration file if you have defined it.
Then restart Package Manager by running the following command:
$ sudo systemctl restart rstudio-pm
Additional documentation#
For more information on SSL certificates and other related settings, refer to the HTTPS settings in the Configuration Appendix of the Package Manager Administration Guide.