Cloud Publishing

Publish ShareBridge-compatible Shiny apps to Posit Connect Cloud and Hugging Face Spaces, with notes for zip-based local distribution

ShareBridge is built first for local Windows distribution, but the Shiny app inside a ShareBridge project can also be published to hosted services. Start with Posit Connect Cloud when you want a hosted URL that users can open in a browser without syncing a folder.

Note

Posit Connect Cloud does not run the full ShareBridge deployment folder. Publish the Shiny app source itself: app.R or ui.R + server.R, supporting folders, data files, and a manifest.json.

The ShareBridge Publisher UI can also run on Connect Cloud or Hugging Face Spaces as a hosted inspector. In that mode, users upload an app folder with the browser folder picker, review dependencies and preflight checks, download readiness reports and IT checklists, and download the generated zip. Hosted sessions cannot browse arbitrary local paths such as C:\... or create Portable R from a local Windows R installation.

Posit Connect Cloud

Posit’s current Connect Cloud workflow for Shiny for R expects:

  • A public GitHub repository
  • A primary Shiny file, usually app.R
  • A dependency manifest named manifest.json

Create the manifest from the app source folder:

install.packages("rsconnect")
rsconnect::writeManifest(appDir = ".")

Commit and push the app source plus manifest.json to GitHub, then publish from Connect Cloud by choosing Shiny, selecting the repository and branch, choosing the primary file, and clicking Publish.

For the ShareBridge Publisher UI itself, the repository root includes app.R as the Connect Cloud entry point and manifest.json generated from the tracked project files. Commit and push both files whenever the Publisher UI changes.

Use this command from the framework root when regenerating the ShareBridge Publisher manifest:

files <- system2("git", "ls-files", stdout = TRUE)
files <- files[!files %in% c("manifest.json")]
files <- files[!grepl("^(R-portable|R-portable-master|\\.claude)/", files)]
rsconnect::writeManifest(
  appDir = ".",
  appFiles = files,
  appPrimaryDoc = "app.R",
  appMode = "shiny"
)

Hugging Face Spaces

ShareBridge also has a Hugging Face Space repository:

git clone https://huggingface.co/spaces/Prigas89/Shiny_ShareBridge

Use this repository when publishing the public Hugging Face version of the app. Hugging Face Spaces are Git repositories, so updates are deployed by committing and pushing changes to the Space.

For Shiny for R, Hugging Face’s documented path uses a Docker Space. The Space README should declare the Docker SDK, and the repository should include a Dockerfile that installs R, Shiny, and the app dependencies before launching the app on the Space port.

Example README front matter:

---
title: Shiny ShareBridge
sdk: docker
app_port: 7860
---

For Hugging Face, publish the app source and Docker build files rather than the zipped ShareBridge Windows deployment. The portable Windows R/ runtime is for local ShareBridge zip distribution, not for a Linux Docker Space.

The ShareBridge Space uses the same hosted inspector behavior as Connect Cloud. It should install Shiny in the Docker image and launch build/publisher_ui/app.R on port 7860.

ShareBridge zip vs Connect Cloud

Use ShareBridge zip output when the target is a local Windows deployment through SharePoint, OneDrive, or another file share. In that case, the zip must contain the complete deployment folder generated by the Publisher UI.

Important

If end users should run the zipped ShareBridge app without installing R, create portable R first and make sure the generated zip includes the bundled R/ folder. Zipping only the Shiny app files is not enough for local ShareBridge users.

Use Connect Cloud or Hugging Face Spaces when the target is a hosted app. In that case, users do not need a zipped ShareBridge folder or bundled portable R; they open the hosted app URL.

When the hosted Publisher UI generates a zip, treat it as a downloadable ShareBridge deployment artifact. For Windows users who do not have R installed, confirm the framework had Portable R available before the build so the zip includes the generated R/ folder.

Deployment checklist

Before publishing to Connect Cloud:

  • Run the app locally from the source folder
  • Make sure all data files needed by the app are committed
  • Add any dynamically loaded packages to the app code or ensure they appear in manifest.json
  • Run rsconnect::writeManifest(appDir = ".")
  • Commit and push to GitHub
  • Publish the repository from Connect Cloud

Before using hosted inspector mode:

  • Click Browse… under App folder to upload the local app folder
  • Use zip upload only as a fallback
  • Review the readiness score, dependency notes, and preflight warnings
  • Put files that must be bundled inside the uploaded app folder
  • Use DATA_DIR only for a runtime path the deployed Windows app will use later
  • Download the readiness report and IT checklist before team review
  • Download diagnostics if a build fails or a warning needs review

Before publishing to Hugging Face Spaces:

  • Clone https://huggingface.co/spaces/Prigas89/Shiny_ShareBridge
  • Keep the Space configured as a Docker Space
  • Commit the Shiny app source, Dockerfile, and Space README.md
  • Make sure the app listens on the configured Space port, usually 7860
  • Push to the Hugging Face Space repository

Before distributing a ShareBridge zip:

  • Create portable R in the ShareBridge Publisher if users should not install R
  • Build the deployment from the Publisher UI
  • Enable zip output
  • Confirm the zip contains LaunchApp.hta, run.bat, run.R, packages/, and R/
  • Ask users to extract or sync the complete folder before launching

References