 <p>A bit more late, but I've found another option using <strong>ngnix</strong> as a proxy:</p> <p>This guide has been finished by following partially this guideline: <a href="https://support.rstudio.com/hc/en-us/articles/213733868-Running-Shiny-Server-with-a-Proxy" rel="nofollow">https://support.rstudio.com/hc/en-us/articles/213733868-Running-Shiny-Server-with-a-Proxy</a></p> <p>On an Ubuntu 14.04:</p> <ol> <li>Install nginx</li> <li>Change file config /etc/nginx/nginx.conf to:</li> </ol> <p>This:</p> <pre><code>events { worker_connections 768; multi_accept on; } http { map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen XX; location / { proxy_pass http://localhost:YY; proxy_redirect http://localhost:YY/ $scheme://$host/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_read_timeout 20d; auth_basic "Restricted Content"; auth_basic_user_file /etc/nginx/.htpasswd; } } } </code></pre> <p>XX: Port that the nginx will listen to</p> <p>YY: Port that the shiny server uses</p> <ol start="3"> <li><p>Using this tutorial, I added password authentication to the nginx server: <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-password-authentication-with-nginx-on-ubuntu-14-04" rel="nofollow">https://www.digitalocean.com/community/tutorials/how-to-set-up-password-authentication-with-nginx-on-ubuntu-14-04</a></p></li> <li><p>Set up the shiny process or the shiny server to only listen to localhost (127.0.0.1)</p></li> </ol>