7.2 Sharing as a webpage

7.2.1 For temporary uses

Say I have a Shiny app on my desktop in my office and I’ll have a meeting in a conference room somewhere in my department. It might be a good choice to host the Shiny app temporarily on my desktop.

  1. Find out your IP address. To access your app from other computer, you need to know your IP address. For Windows system, use ipconfig command in Command Prompt (Win+ R, then input cmd and Enter) . In linux, use ifcondig instead. Remember your IP4 Address, for example, mine is as shown in Figure 7.1.
The IP address

Figure 7.1: The IP address

  1. Run the following command on the machine hosting the Shiny app.
runApp(host = "", port = 80)

The default value of host is (localhost) which means that only the current machine can access it. To allow other clients to connect, host need to be set to

  1. Now you can access the Shiny app by typing the IP address in your browser from other machines.

My IP address starts from 10, which means it is a private IP, so only people using the same private network as me can access it. Private IP usually have the following ranges: - (65,536 IP addresses) - (1,048,576 IP addresses) - (16,777,216 IP addresses)

If your IP is not a private IP, anybody using the Internet may have access to your Shiny app. You may consult the IT department of your organization for details.

7.2.2 For long term uses

  • Using shinyapps.io, the Rstudio’s hosting service for Shiny apps.

  • Building your own Shiny Server.
  • Need a linux server
  • Open source edition (free) and Pro edition (advanced features)