Running an RStudio server on your VM
This guide assumes you have spun up an Ubuntu 20.04 LTS VM on CloudCIX with the appropriate compute resources (RAM/storage) for your RStudio Server and tools for working on a VM (see Installing Basics)
Download and install the appropriate version of RStudio Server (Debian 11/Ubuntu 20) for Ubuntu 20.04 LTS.
RStudio Server should now be accessible at the following address:
http://VM_public_IP:8787
Username and password should be the same as you log in to your VM with.
Note
If you haven’t changed the default username/password for your VM, it should be:
Username: administrator
Password: password that CloudCIX emailed you
Tip
If you want to use conda to manage your RStudio Server environments, you can follow the instructions in this GitHub repo which hosts Rstudio Server within a container and mounts the conda environment.
Setting up a reverse proxy server to encrypt traffic (recommended)
Note
The following method requires that your VM has a registered domain name. For this, you may request a subdomain for your VM from CloudCIX e.g.
yourlab.cloudcix.com
Install NGINX on your VM. Follow the “Install prebuilt ubuntu package from official NGINX repo” instructions.
Register for an SSL cert which can be obtained from Let’s Encrypt. These are free, valid for three months and can be configured to auto renew.
Once the above steps are completed, add the following lines in the server block of your NGINX conf file (usually located in the /etc/nginx/conf.d/ directory):
location / { proxy_pass http://127.0.0.1:8787/; }
Test that the NGINX configuration is correct by running:
sudo nginx -t
If the test is successful, reload NGINX to apply changes:
sudo systemctl reload nginx
That’s it, you’re done! Your RStudio Server should now be accessible at:
https://yourlab.cloudcix.com/