Written and maintained by CASRAI Editorial Board
Published
On this page
shinyapps.io is a fully managed cloud platform operated by Posit that allows researchers, data scientists, and research administrators to host interactive web applications written in R or Python without managing server infrastructure. By using the official rsconnect package, researchers can publish statistical dashboards, clinical data visualizers, and reproducible analytical tools directly from their local R environment to a secure, public or restricted web address.
This guide demonstrates how to configure authentication tokens, prepare application files, execute deployments, interpret container runtime logs, and evaluate hosting architectures such as client-side WebAssembly with Shinylive and self-hosted container clusters with ShinyProxy.
What it is used for in research
Modern data-intensive research requires accessible interfaces where peer reviewers, multidisciplinary collaborators, and the broader scientific community can interrogate findings, test sensitivity analyses, and explore complex data models. In academic and institutional settings, shinyapps.io provides an on-demand deployment environment for these analytical artifacts.
Common research applications include:
- Supplementary Interactive Figures: Augmenting traditional static journal articles with interactive dashboards that let readers adjust parameters, filter subgroups, or examine high-dimensional genomics data using R programming for data analysis.
- Longitudinal and Sensor Analytics: Hosting specialized r shiny time series applications that visualize temporal trends, forecast clinical outcomes, or track environmental sensor streams using packages such as
dygraphs,plotly, andtsibble(see our guide on Plotly in R). - Clinical Trial Simulators and Calculators: Providing clinical trialists and biostatisticians with interactive tools to calculate sample sizes, simulate trial power, or evaluate risk scores.
- Tabular Data Dissemination: Delivering searchable, downloadable data matrices using Shiny components like DT and the renderTable function in Shiny.
What is Shiny?
Shiny is an open-source framework developed by Posit (formerly RStudio) that enables computational researchers to build interactive web applications directly in R (and Python) without requiring expertise in HTML, CSS, or JavaScript. A Shiny application couples a reactive user interface (UI) with a server execution script. When a user changes an input—such as a slider, drop-down selection, or uploaded dataset—the server dynamically recalculates relevant statistical outputs and updates the browser display in real time.
For large research teams, structuring an application as a standardized R package using the golem shiny framework ensures robust documentation, dependency management, and modular architecture before pushing code to a cloud environment.
Install or access (official source only)
Deploying to shinyapps.io requires an authorized account on the hosting service and the official deployment client installed in your local R session.
- Official Account Registration: Navigate to the official portal at
https://www.shinyapps.io/and register an account. Authentication is supported via email, Google, or GitHub credentials. - Client Deployment Package: The primary tool for managing deployments is the
rsconnectpackage, maintained by Posit on the Comprehensive R Archive Network (CRAN). Install the package directly from CRAN in the RStudio IDE environment using the following command:install.packages("rsconnect") - Account Access Tokens: Log into your shinyapps.io account dashboard, navigate to Account in the left sidebar, and select Tokens. Click Show Token followed by Show Secret to access the API credentials required by
rsconnect.
Step-by-step task
Follow these numbered steps to authenticate your environment and publish an interactive Shiny application from your local workspace to shinyapps.io.
1. Authenticate the local environment with rsconnect
Copy the pre-formatted account authorization command provided in the shinyapps.io token dialog and run it in your R console. This stores your API token and secret in a secure local configuration file on your machine:
rsconnect::setAccountInfo(
name = "your-account-name",
token = "YOUR_TOKEN_KEY",
secret = "YOUR_SECRET_KEY"
)
2. Prepare the application project structure
Ensure your application directory contains a single self-contained app.R script (or paired ui.R and server.R files). All required R packages must be declared explicitly at the top of your script using library() statements so that rsconnect can automatically parse and bundle your dependencies:
library(shiny)
library(ggplot2)
library(dplyr)
ui <- fluidPage(
titlePanel("Interactive Research Explorer"),
sidebarLayout(
sidebarPanel(
sliderInput("bins", "Number of bins:", min = 5, max = 50, value = 25)
),
mainPanel(
plotOutput("distPlot")
)
)
)
server <- function(input, output) {
output$distPlot <- renderPlot({
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = input$bins + 1)
hist(x, breaks = bins, col = "steelblue", border = "white",
xlab = "Waiting time to next eruption (min)",
main = "Histogram of Old Faithful Eruption Intervals")
})
}
shinyApp(ui = ui, server = server)
Verify that all file references use relative paths within the project directory (e.g., readRDS("data/model.rds")) rather than absolute local filesystem paths.
3. Execute deployment to shinyapps.io
With your working directory set to the project folder, initiate the deployment process using the rsconnect::deployApp() function:
library(rsconnect)
rsconnect::deployApp(appName = "research-explorer")
Alternatively, in RStudio, click the blue Publish button located in the top-right corner of the source editor pane, select the target account, choose the files to include, and confirm publication.
4. Verify live web access
Once the packaging and container build steps complete, rsconnect outputs the live URL and automatically launches your application in your default web browser at:
https://<your-account-name>.shinyapps.io/research-explorer/
Output and how to read it
During deployment, the R console streams live progress output from the remote shinyapps.io build servers. Understanding each stage of this output is essential for verifying application integrity.
- Dependency Discovery:
rsconnecttraverses your source code to detect loaded libraries and creates a manifest (manifest.json). - Bundle Compression: Application scripts, static assets, and local data files are compressed into a tarball (
app.tar.gz) and uploaded via HTTPS. - Server-Side Build Log: The remote shinyapps.io worker spins up an isolated Ubuntu Linux container. Packages are downloaded and compiled against matching system libraries. Look for lines such as
Installing package from Posit Public Package Manager. - Worker Process Launch: The container executes
Rscriptto start the Shiny server. A successful launch concludes with a message statingApplication successfully deployedand the assigned URL.
Inspecting application logs
To inspect server runtime logs, user access events, or uncaught R execution errors, run the showLogs() function from your local R session:
rsconnect::showLogs(appName = "research-explorer", streaming = TRUE)
Logs can also be reviewed directly in the shinyapps.io dashboard under Applications > All > [Your App] > Logs.
Container storage behavior
The local filesystem of a shinyapps.io container is ephemeral. When an application goes idle or restarts, the container shuts down, resetting the local disk to the original uploaded bundle state. Research applications that generate user-submitted data, log participant entries, or cache large dynamic results must write to external persistent services, such as remote relational databases (e.g., PostgreSQL), cloud object storage (e.g., S3 buckets), or public data repository APIs (such as Zenodo or OSF).
Troubleshooting
Below are common deployment and runtime issues encountered when publishing research applications to shinyapps.io, along with verified diagnostic remedies.
- Missing Linux System Libraries: If package compilation fails with C/C++ library errors (common with spatial or graphics packages like
sf,rgdal, orxml2), ensure you are deploying from an environment using recent CRAN binaries or check the Posit Package Manager logs to ensure system dependencies match the Ubuntu container environment. - Container Memory Exhaustion (OOM): If your application crashes abruptly under load or during dataset initialization, check the logs for
exit code 137(out of memory killed by Linux). Mitigate this by pre-filtering raw research datasets, converting heavy calculations to precomputed lookup tables, or increasing instance memory in the shinyapps.io dashboard settings. - WebSocket Disconnects and Idle Timeouts: Users may encounter grayed-out screens displaying “Disconnected from the server” when long-running simulations exceed WebSocket timeout thresholds. Refactor long calculations into asynchronous operations using the
promisesorfuturepackages. - Absolute File Path Errors: Scripts referencing local computer directories (e.g.,
C:/Users/name/...or/home/user/...) fail on Linux containers withcannot open the connection. Use relative paths withhere::here()or bundle all data inside adata/subfolder. - Unpublished Package Sources: If you use custom packages installed from private GitHub repositories or local builds, ensure your local token has permissions or push the package to a publicly accessible repository so the remote build agent can install it.
Free alternatives
When selecting a distribution architecture for research computing, consider the technical trade-offs between managed cloud PaaS, serverless WebAssembly, and institutional on-premises hosting.
| Platform | Architecture | Hosting Environment | Data Privacy and Governance | Best For |
|---|---|---|---|---|
| shinyapps.io | Managed Cloud PaaS | Isolated Ubuntu containers on Posit cloud | Public or restricted cloud deployment; ephemeral storage | Fast dissemination of manuscript figures and academic tools without server setup |
| Shinylive (WebAssembly) | Serverless Client-Side | Runs in user browser via WebR / Pyodide; zero server | Maximum privacy; datasets processed entirely inside client browser | Static hosting on GitHub Pages; low-maintenance apps with modest computational loads |
| ShinyProxy | Self-Hosted Containers | On-premises servers, Kubernetes, or Docker Swarm | Full institutional control; integrates with LDAP, Active Directory, and OAuth2 | Regulated research data, HIPAA/GDPR clinical studies, and enterprise research labs |
| Posit Cloud | Browser Cloud IDE | Cloud-hosted RStudio workbench | Standard user authentication within workspace | Classroom instruction, workshop tutorials, and collaborative team prototyping |
FAQ
What is Shiny?
Shiny is an open-source framework from Posit that allows users to create interactive web applications directly from R or Python code. It translates reactive server-side code into dynamic web interfaces without requiring front-end web development skills.
How does shinyapps.io differ from Shinylive?
While shinyapps.io executes R code on remote Linux cloud servers and streams UI updates over WebSockets, shinylive (or shiny live) compiles R code into WebAssembly via WebR, allowing the application to execute entirely inside the user’s web browser without a persistent backend server.
Can I deploy Shiny applications built with golem to shinyapps.io?
Yes. Applications engineered with the golem shiny framework can be deployed directly to shinyapps.io using standard rsconnect::deployApp() or helper scripts like golem::add_rstudioconnect_file(). The golem structure ensures that dependencies are cleanly documented in the DESCRIPTION file.
What is the difference between shinyapps.io and ShinyProxy?
shinyapps.io is a fully managed cloud service requiring zero infrastructure management. In contrast, shinyproxy is an open-source, self-hosted deployment platform designed for Docker and Kubernetes that runs on an institution’s own servers, offering direct integration with enterprise authentication systems like LDAP and Keycloak.
How should researchers handle time series data in Shiny?
When deploying an r shiny time series dashboard, optimize data transfer by pre-aggregating high-frequency timestamps, loading time-series objects using packages such as xts or tsibble, and utilizing client-rendered visualization libraries like Plotly or Dygraphs to reduce server-side recalculation overhead.
Sources
- Posit Software, PBC. “shinyapps.io User Guide.” Official Documentation. Accessed 2026-11-09. https://docs.posit.co/shinyapps.io/
- CRAN (Comprehensive R Archive Network). “rsconnect: Deployment Interface for R Markdown Documents and Shiny Applications.” Package Manual. Accessed 2026-11-09. https://cran.r-project.org/web/packages/rsconnect/index.html
- Posit Software, PBC. “Deploying Applications on shinyapps.io.” Shiny Articles. Accessed 2026-11-09. https://shiny.posit.co/r/articles/share/shinyapps/
- ThinkR. “golem: A Framework for Robust Shiny Applications.” GitHub Repository Documentation. Accessed 2026-11-09. https://github.com/ThinkR-open/golem
- Posit Software, PBC. “Shinylive for R.” Official WebAssembly Documentation. Accessed 2026-11-09. https://posit-dev.github.io/r-shinylive/
- Open Analytics. “ShinyProxy: Open Source Enterprise Deployment for R Shiny.” Documentation. Accessed 2026-11-09. https://shinyproxy.io/







