An Installation Framework for Shiny Apps

Installs shiny apps packaged as stand-alone Electron apps using Inno Setup, an open source software that builds installers for Windows programs <>.


AppVeyor Build Status codecov CRAN_Status_Badge Downloads Downloads Project Status: Active - The project has reached a stable, usable state and is being actively developed.

RInno makes it easy to install local shiny apps by providing an interface between R, Inno Setup, an installer for Windows programs (sorry Mac and Linux users), and Electron, a modern desktop framework used by companies like Github, Slack, Microsoft, Facebook and Docker. RInno is designed to be simple to use (two lines of code at a minimum), yet comprehensive.

If a user does not have R installed, the RInno installer can be configured to ask them to install R along with a shiny app, include_R = TRUE. And similar to Dr. Lee Pang's DesktopDeployR project, RInno provides a framework for managing software dependencies and error logging features. However, RInno also supports GitHub package dependencies, continuous installation (auto-update on start up), and it is easier to manage with create_app, the main RInno function. DesktopDeployR requires many manual adjustments and a deep understanding of the entire framework to use, but RInno can be learned incrementally and changes automatically flow down stream. You don't need to remember the 100+ places impacted by changing app_dir. RInno only requires a high-level understanding of what you'd like to accomplish.

Getting Started

install.packages("remotes"); require(remotes)

# Use install_github to get RInno

# Require Package

# Use RInno to get Inno Setup

Minimal example

Once you have developed a shiny app, you can build an installer with create_app followed by compile_iss.

# Example app included with RInno package
example_app(app_dir = "app")

# Build an installer
create_app(app_name = "Your appname", app_dir = "app")

create_app creates an installation framework in your app's directory, app_dir. The main components are a file called "app_name.iss" and the "nativefier-app" directory. You can perform minor customizations before you call compile_iss. For example, you can replace the default/setup icon at, or you can customize the pre-/post- install messages, infobefore.txt and infoafter.txt. Just remember, the default values (i.e. create_app(info_after = "infobefore.txt")) for those files have not changed. The Inno Setup Script (ISS), app_name.iss, will look for default.ico and try to use it until you update the script or call create_app with the new icon's file name (i.e. create_app(app_icon = "new.ico")). Likewise, the Electron app will need to be recompiled to capture any manual changes to files in app_dir.

Electron is now used to render the shiny app's UI. All other user_browser options will be deprecated in future releases.

ui.R Requirements

In order to replace Electron's logo with your app's icon, add something like this to your ui.R file:

      rel = "icon", 
      type = "image/x-icon", 
      href = "http://localhost:1984/default.ico")

server.R Requirements

In order to close the app when your user's session completes:

  1. Add session to your server function

  2. Call stopApp() when the session ends

    function(input, output, session) {

    if (!interactive()) { session$onSessionEnded(function() { stopApp() q("no") }) } }

If you forget to do this, users will complain that their icons are broken and rightly blame you for it (an R session will be running in the background hosting the app, but they will need to press ctrl + alt + delete and use their task manager to close it). Not cool.

Package Dependency Management

Provide a named character vector of packages to create_app, and RInno will download them and install them with your shiny app. RInno downloads windows binaries from CRAN for the listed packages and their dependencies with tools::package_dependencies(packages = pkgs, recursive = TRUE).

  app_name = "myapp", 
  app_dir = "app",
  pkgs = c("shiny", "jsonlite", "httr")

For remotes, Github source files are compiled into windows binaries. Bitbucket will be supported in a future release.

Custom Installations

If you would like to create a custom installer from within R, you can slowly build up to it with create_app, like this:

  app_name    = "My AppName", 
  app_dir     = "My/app/path",
  dir_out     = "wizard",
  pkgs        = c("jsonlite", "shiny", "magrittr", "xkcd"),  # CRAN-like repo packages
  remotes     = c("talgalili/installr", "daattali/shinyjs"), # GitHub packages
  include_R   = TRUE,     # Download R and install it with your app, if necessary
  R_version   = "2.2.1",  # Old versions of R
  privilege   = "high",   # Admin only installation
  default_dir = "pf")     # Install app in to Program Files

create_app passes its arguments to most of the other support functions in RInno. You can (and probably should) specify most things there and they will get passed on. Alternatively, you can provide instructions directly to those support functions like this:

# Copy installation scripts (JavaScript, icons, infobefore.txt, package_manager.R, launch_app.R)
copy_installation(app_dir = "my/app/path")

# If your users need R installed:
get_R(app_dir = "my/app/path", R_version = "2.2.1")

# Create batch file
create_bat(app_name = "My AppName", app_dir = "my/app/path")

# Create app config file
create_config(app_name = "My AppName", R_version = "2.2.1", app_dir = "my/app/path",
  pkgs = c("jsonlite", "shiny", "magrittr", "dplyr", "caret", "xkcd"))

# Build the iss script
start_iss(app_name = "My AppName") %>%

  # C-like directives
  directives_section(R_version   = "2.2.1", 
             include_R   = TRUE,
             app_version = "0.1.2",
             publisher   = "Your Company", 
             main_url    = "") %>%

  # Setup Section
  setup_section(output_dir  = "wizard", 
        app_version = "0.1.2",
        default_dir = "pf", 
        privilege   = "high",
        inst_readme = "pre-install instructions.txt", 
        setup_icon  = "myicon.ico",
        pub_url     = "", 
        sup_url     = "",
        upd_url     = "") %>%

  # Languages Section
  languages_section() %>%

  # Tasks Section
  tasks_section(desktop_icon = FALSE) %>%

  # Files Section
  files_section(app_dir = "my/app/path", file_list = "path/to/extra/files") %>%

  # Icons Section
  icons_section(app_desc       = "This is my local shiny app",
        app_icon       = "notdefault.ico",
        prog_menu_icon = FALSE,
        desktop_icon   = FALSE) %>%

  # Execution & Pascal code to check registry during installation
  # If the user has R, don't give them an extra copy
  # If the user needs R, give it to them
  run_section() %>%
  code_section() %>%

  # Write the Inno Setup script
  writeLines(file.path("my/app/path", "My AppName.iss"))

  # Check your files, then

Feel free to read the Inno Setup documentation and RInno's documentation to get a sense for what is possible. Also, please suggest useful features or build them yourself! We have a very positive culture at FI Consulting, and we would love to get your feedback.

Please note that this project has a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.


The RInno package is licensed under the GPLv3. See LICENSE for details.



  • Breaking change to dependency management. Moving towards a self-contained application with windows binaries of all dependencies (CRAN, Github, Bitbucket, etc.). This makes it easier for IT to create a security rule for the .exe, and removes the need for an internet connection to install dependencies from CRAN and Github/Bitbucket. They all come in one package together.
  • Huge shout out to @trybik for contributing multiple pull requests and having the vision to move towards a stand-alone Electron UI.
  • We're now using nativefier to produce an Electron desktop app for shiny.
  • Many options will be deprecated in the next release. We're putting out notices in this release, so complain loudly if you want to keep user_browser = "chrome" or other options that are inferior to user_browser = "electron".


  • Numerous bug fixes over the past 6 months
  • Big shout outs to @bthomasbailey, @chasemc, @trybik and @Laurae2 for their pull requests and support of the project's issue submissions.
  • Roled back --app tag for Chrome in preparation for a true stand-alone release using the Electron framework (0.3.0). We will focus on that instead of the numerous issues caused by running Chrome in app mode.


  • @zhengle-advantaseeds and @trybik continue to move the project forward with great ideas and bug fixes.
  • @willbradley created a pull request which adds support for package version control and local package installations #34. Conditional statements like shiny = ">= 1.0.5" and/or local .tar.gz of R packages are now supported. These can reduce software dependency bugs caused by updates to CRAN.
  • Added support for more flexible R-version checks - #24.
  • For users who use support functions (i.e. setup, files, code etc.), this version includes breaking changes. All of those functions have been appended with _section in order to avoid namespace conflicts with devtools::setup and shiny::code among others.


  • Swapped out many sprintf calls with RStudio's new glue function for interpolating strings. This should make RInno more flexible and easier to maintain and debug moving forward.
  • Added support for app mode when user_browser = "chrome". RInno also automatically places app_icon in a "www/" directory and utilizes port 1984. This makes it easy to display the app's icon instead of Chrome's (see README for details). Big shout out to @trybik for this great suggestion.
  • Created an option to include an installation of Chrome with the app's installer w/ include_Chrome = TRUE.
  • Improved handling of internet connection status. If the app has never started before, it will stop and tell users to check their internet connection and try again. Otherwise, the app will start normally, but the app's log will have information about the fact that it pinged and did not get a response. Thank you @zhengle-advantaseeds for reporting this issue! #22
  • Exposed R installation flags w/ the R_flags argument. For more information, read ?run. Thanks @renejuan for requesting this feature!


  • Patched the way that RInno handles icons and text files. The defaults no longer cause Inno Setup compilation errors when custom icons or messaging is provided. Thanks @sollano for uncovering this bug!
  • Fixed the private repo process for continuous installations from Github. Added a new argument auth_token, which uses a Github token to authenticate with private repos. @sollano again provided amazingly detailed information that helped us resolve this issue. #19


  • Major improvements to registry checks and app start up sequence
    • RInno installers now query the registry during installation so that local Shiny apps can use registry information during their startup sequence. The registry is queried for R, Pandoc, Chrome, Firefox, and Internet Explorer. If you would like any other software added to the regpaths.json output, give us a holler!
    • This should make Shiny apps installed with RInno reliable for large numbers of users because strange installation bugs are often caused by unique desktop setups. 0.1.0 should reduce the maintenance cost of local installations and make them scalable for medium-sized organizations and teams.
  • Hanjo Odendall (@HanjoStudy) added support for flexdashboards. Thanks Hanjo!
    • Similar to the way that RInno installers can include copies of R, they can now include a copy of Pandoc to support the installation of flexdashboards. Because the registry query (detailed above) is performed post-install, these installation paths are captured by the registry query and can be used in the app startup sequence.
  • Our next release in September - October should include support for OAuth2 for RInno apps using continuous installation.


  • Fixed icon bug
  • Added version information for package dependencies
  • Added the option to select default browser with user_browser
    • Eventually, the user should be able to choose their favorite browser


  • Added support for GitHub package dependencies
    • Thanks Dean Attali (@daattali) for this feature request
  • Fixed error_log so that its name can be customized properly
  • Cleaned up installation paths
  • Added Firefox to the browser search path in launch_app.R:
    1. Chrome
    2. Firefox
    3. Internet Explorer
    4. User prompt
  • Removed packages.txt from installation files. Now using a json array in utils/config.cfg


  • Submitted to CRAN
  • Updated LICENSE to conform with GPL-3 standards
  • Added DesktopDeployR's Aphache 2.0 copyright notice
  • Added Travis-ci, Appveyor, and Codecov to repo
  • Added Code of Conduct for contributors

  • Added a file to track changes to the package.
  • Built function to install Inno Setup.
  • Added support for Bitbucket and GitHub APIs, so that locally deployed shiny apps automatically update during start up sequence.
  • Added support for Inno Setup Script sections (start_iss, directives, setup, files, icons, tasks, run, code, and languages), so you can build custom installation wizards in R.
  • Added application config file, icons, and installation readme.txt.
  • Added package management file which manages a local R library for your shiny app's package dependencies.
  • Added error logging
  • Modified .onAttach to include information about package version and maintenance

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0.1 by Jon Hill, 3 years ago

Report a bug at

Browse source code at

Authors: Jon Hill [aut, cre, cph] , W. Lee Pang [aut, cph] (DesktopDeployR project at , Hanjo Odendaal [ctb] , William Bradley [ctb] , Brent (Tom) Bailey [ctb] , Mikolaj Rybinski [ctb] , Chase Clark [ctb] , Damien Soukhavong [ctb] , Jonathan Godfrey [ctb] ( , Gábor Csárdi [aut] , Hadley Wickham [aut] , Winston Chang [aut] , Jim Hester [aut] , RStudio [cph] , Martin Morgan [aut] , Dan Tenenbaum [aut] , Mango Solutions [cph]

Documentation:   PDF Manual  

GPL-3 | file LICENSE license

Imports curl, glue, httr, installr, jsonlite, magrittr, methods, pkgbuild, remotes, rmarkdown, shiny, stringr, utils

Suggests knitr, stringi, covr, testthat

See at CRAN