Can I run Workbench, Connect and Package Manager on the same machine?

Follow

It may seem appealing to host your Posit Workbench, Connect, and Package Manager instances on the same server. It reduces the number of servers that you may need to manage, and it may seem like compute capacity is better utilized, especially in periods of low use when CPU and memory are almost idle.

 

Can I run Workbench, Connect, and Package Manager on the same machine?

The answer is yes, however Posit does not recommend it as best practice.

 

Are there any implications to doing so?

The general consensus that we have at Posit, is that it's best to host one(1) product per host. While it is possible to run multiple products on a single host, we generally do not recommend running Posit Workbench and Posit Connect on the same server.

The first reason for this is that there are networking concerns. It makes it difficult to scale a host that has multiple applications, especially if users on both applications are attempting to install packages or programs at the same time.

Secondly, there are resourcing concerns associated with hosting both products on a single platform. If Workbench is being used at the same time as Connect, then you may start to see performance degradation if your hardware isn't able to keep up with the demand from both applications running simultaneously.

 

I've heeded the warnings and I'd still like to go ahead and install them both on the same server.

If you do choose to go down this route, we would suggest using an external proxy such as Nginx or Apache to handle access to resources. Whilst this method isn't officially supported by Posit, we've seen this work in the past with varying levels of success.

 

How do I separate access to Workbench, Connect, and Package Manager if both applications are on a single server and share the same URL? What do I do about SSL certificates?

Lets say that we have a server that hosts Workbench, Connect, and Package Manager on the same host. This host uses an SSL certificate, and we would like to separate access to each application. For the purposes of this demonstration, Posit Workbench will exist on port 8777, Posit Connect will exist on port 3999, and Package Manager will exist on port 4222.

You can specify a specific port number allocated to each product even while using HTTPS. In the case of the Posit Connect server, the following configuration will need to be applied to the /etc/rstudio-connect/rstudio-connect.gcfg file:

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

**Note that in the example above we are using port 3999, however, this can be any custom port that you wish.

Then, restart Posit Connect as below:

sudo systemctl restart rstudio-connect

Then, for your Posit Workbench server, you can apply the configuration below to your  /etc/rstudio/rserver.conf configuration file:

www-port=8777 
ssl-redirect-http=0

**Note that in the example above we are using port 8777, however, this can be any custom port that you wish.

Then, restart RStudio server:

sudo rstudio-server restart

Lastly, for your Posit Package Manager server, you can apply the configuration below to your  /etc/rstudio-pm/rstudio-pm.gcfg configuration file:

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

From there, restart Posit Package Manager as below:

sudo systemctl restart rstudio-pm

You should now be able to access the services independent of each other.

 

Support Ticket

If you still have issues after completing the above, you can always lodge a support ticket, where our group of friendly, and incredibly knowledgeable staff can assist with any issues that you may be having. You can submit a ticket here:

https://support.rstudio.com/hc/en-us/requests/new

Comments