Skip to contents

When running a Shiny application you might want to set parameters like port or host. In Rhino, this can be done the same as in a regular Shiny application - by passing arguments to shiny::runApp.

For example, if you want to run your application with the host set to (so you can serve it in your local network) and port set to 5000, you can run:

# R console

shiny::runApp(host = "", port = 5000)

If you want to make your settings permanent, you can modify your .Rprofile file and set Shiny options there:

# .Rprofile

if (file.exists("renv")) {
} else {
  # The `renv` directory is automatically skipped when deploying with rsconnect.
  message("No 'renv' directory found; renv won't be activated.")

# Allow absolute module imports (relative to the app root).
options(box.path = getwd())

# Shiny options
options( = "")
options(shiny.port = 5000)

Make sure you don’t remove entries related to renv and box as they are required for your Rhino application to work!