Skip to content

Configuring SSL Certificates in RStudio Connect#

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 RStudio Connect.

To configure SSL certificates, add the following lines to the RStudio Connect configuration file:

File: /etc/rstudio-connect/rstudio-connect.gcfg

[HTTPS]
Listen = :443
Certificate = <PATH-TO-CERTIFICATE-FILE>
Key = <PATH-TO-KEY-FILE>

Then restart RStudio Connect by running the following command:

Terminal

$ sudo systemctl restart rstudio-connect

Configuring HTTP to HTTPS redirects#

To redirect all HTTP traffic to the secure HTTPS endpoint, add the following lines to the RStudio Connect configuration file:

File: /etc/rstudio-connect/rstudio-connect.gcfg

[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 RStudio Connect by running the following command:

Terminal

$ sudo systemctl restart rstudio-connect

Additional documentation#

For more information on SSL certificates and other related settings, refer to the HTTPS settings in the Configuration Appendix of the RStudio Connect Administration Guide.