Shiny Deployment Checklist: Production-Ready Reference Guide

Essential steps and configurations for reliable Shiny app deployment

Complete deployment checklist for Shiny applications covering shinyapps.io, Docker, ShinyProxy, and self-hosted solutions. Includes security configurations, performance optimization, and troubleshooting guides for production-ready deployments.

Tools
Author
Affiliation
Published

June 22, 2025

Modified

June 23, 2025

Keywords

shiny deployment checklist, production deployment guide, shiny app deployment steps, deployment troubleshooting, shiny production setup

Shiny Deployment Checklist

Production-ready deployment steps and troubleshooting guide

1 Pre-Deployment Preparation

# Dependency management with renv
renv::init()
renv::snapshot()

# Test application locally
shiny::runApp()

# Check for common issues
rsconnect::lint(".")

# Optimize data files
saveRDS(data, "data/optimized.rds", compress = TRUE)

# Create .dockerignore / deployment exclusions
# .git, .Rproj.user, *.log, temp files

Critical: Always test locally first and lock package versions with renv

2 Platform Selection & Setup

# shinyapps.io deployment
rsconnect::deployApp(
  appName = "my-production-app",
  appTitle = "Production Dashboard",
  forceUpdate = TRUE,
  lint = TRUE
)

# Docker container build
docker build -t my-shiny-app:latest .
docker run -p 3838:3838 my-shiny-app:latest

# ShinyProxy application.yml entry
specs:
  - id: production-app
    display-name: "Production Dashboard"
    container-image: my-registry/app:latest
    container-memory: "4GB"
    container-cpu-limit: 2

Platform Choice

shinyapps.io: Quick, managed hosting
Docker: Full control, any infrastructure
ShinyProxy: Enterprise multi-tenant

3 Security Configuration

# Environment variables (never hardcode secrets)
db_password <- Sys.getenv("DATABASE_PASSWORD")
api_key <- Sys.getenv("API_KEY")

# HTTPS enforcement (shinyapps.io automatic)
# Docker with reverse proxy
proxy:
  https-redirect: true
  ssl-certificate: /path/to/cert.pem

# Authentication (ShinyProxy LDAP example)
authentication: ldap
ldap:
  url: ldap://company.com:389
  user-dn-pattern: uid={0},ou=users,dc=company,dc=com
  group-search-base: ou=groups,dc=company,dc=com

Security Rule: Use environment variables for all secrets and credentials

4 Performance Optimization

# Memory optimization
options(shiny.maxRequestSize = 50 * 1024^2)  # 50MB

# Reactive caching
processed_data <- reactive({
  # Cache expensive operations
  expensive_calculation(input$parameter)
})

# Docker resource limits
container-memory: "4GB"
container-cpu-limit: 2
container-env:
  R_MAX_VSIZE: "3GB"
  
# Progress indicators for long operations
withProgress(message = 'Loading...', {
  incProgress(0.5, detail = "Processing data")
  # Your code here
})

Performance Tips

Pre-process data → Use RDS format → Cache reactive expressions → Set memory limits

5 Monitoring & Health Checks

# Application health endpoint
observe({
  cat("Health check:", Sys.time(), "\n")
})

# Docker health check
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
  CMD curl -f http://localhost:3838/ || exit 1

# ShinyProxy monitoring
usage-stats-url: http://influxdb:8086/write?db=shinyproxy_stats

# Log rotation configuration
logging:
  file:
    max-size: 10MB
    max-history: 30
    
# Monitor resource usage
system("docker stats --no-stream")

Monitor: Response times, memory usage, error rates, and user sessions

6 Troubleshooting Guide

# Check deployment logs
rsconnect::showLogs()  # shinyapps.io
docker logs container-name     # Docker
journalctl -u shinyproxy      # ShinyProxy

# Test container locally
docker run --rm -p 3838:3838 my-app:latest

# Package dependency check
renv::status()
renv::restore()

# Memory debugging
gc()  # Force garbage collection
pryr::mem_used()  # Check memory usage

# Network connectivity test
curl -I https://your-app.shinyapps.io/

Common Issues

Package conflicts → Memory limits → Network timeouts → Authentication failures



Ready to Deploy Your Shiny App?

Choose your deployment platform and get started with detailed tutorials

Deploy to shinyapps.io Docker Deployment Enterprise ShinyProxy

Complete deployment tutorials • Security best practices • Production troubleshooting

placeholder

placeholder
No matching items
Back to top

Reuse

Citation

BibTeX citation:
@online{kassambara2025,
  author = {Kassambara, Alboukadel},
  title = {Shiny {Deployment} {Checklist:} {Production-Ready}
    {Reference} {Guide}},
  date = {2025-06-22},
  url = {https://www.datanovia.com/learn/tools/shiny-apps/cheatsheets/deployment-checklist.html},
  langid = {en}
}
For attribution, please cite this work as:
Kassambara, Alboukadel. 2025. “Shiny Deployment Checklist: Production-Ready Reference Guide.” June 22, 2025. https://www.datanovia.com/learn/tools/shiny-apps/cheatsheets/deployment-checklist.html.