19  Posit Connect Cloud

Published

2026-10-14

Posit Connect Cloud is a managed hosting platform for deploying Shiny applications, Quarto documents, and other R/Python content. Deploy your app-package using rsconnect::deployApp() with your Connect Cloud account credentials. The deployment process is identical to shinyapps.io but gives you a centralized platform integrated with your Posit Team workspace.

  1. Create a Posit Connect Cloud account and note your server URL

  2. Install and configure rsconnect with your account credentials

  3. Deploy using rsconnect::deployApp() from RStudio or Positron

  4. Monitor your application through the Connect Cloud dashboard

This chapter covers deploying your app-package to Posit Connect Cloud, a managed hosting platform for Shiny applications and other content. Unlike shinyapps.io, Connect Cloud integrates directly with your Posit Team workspace, giving you a centralized place to manage all your deployed applications alongside your collaborators’ work. We deployed the production version of our application in Section 9.4.2, but here I’ll walk through the Connect Cloud deployment workflow and show you what to expect during and after deployment.

I’ve created the shinypak R package in an effort to make each section accessible and easy to follow. Install shinypak using pak (or remotes):

install.packages('pak')
pak::pak('mjfrigaard/shinypak')
library(shinypak)

List the apps in this chapter:

list_apps(regex = '^19')

Launch apps with launch()

launch(app = '19_connect-cloud')

Download apps with get_app()

get_app(app = '19_connect-cloud')

19.1 Deployment workflow

The diagram below shows the complete deployment flow from your local development environment to a running application in Connect Cloud:

%%{init: {'theme': 'base', 'themeVariables': { 'fontFamily': 'monospace', "fontSize":"14px", "darkMode":true}}}}%%

flowchart TD
    subgraph Local["<strong>Local Development</strong>"]
        code["App-package code<br/>(R/, inst/, app.R)"]
        test["Test locally with<br/>launch_app()"]
    end

    subgraph Config["<strong>Configuration</strong>"]
        creds["rsconnect credentials<br/>(API key, server URL)"]
    end

    subgraph Deploy["<strong>Deployment</strong>"]
        bundle["Bundle files &<br/>capture dependencies"]
        upload["Upload to<br/>Connect Cloud"]
    end

    subgraph Cloud["<strong>Connect Cloud</strong>"]
        build["Build container image<br/>(install packages)"]
        start["Start application<br/>instance"]
    end

    subgraph Monitor["<strong>Production</strong>"]
        running["App running &<br/>accessible"]
        dashboard["Monitor via<br/>dashboard"]
    end

    code --> test
    test --> check{"Ready to<br/>deploy?"}
    check -->|"Yes"| creds
    check -->|"No"| code
    creds --> bundle
    bundle --> upload
    upload --> build
    build --> success{"Build<br/>successful?"}
    success -->|"No"| logs["View build logs<br/>& troubleshoot"]
    logs --> code
    success -->|"Yes"| start
    start --> running
    running --> dashboard

    style code fill:#7fd9c7,color:#fff,stroke:#4CBB9D,stroke-width:1px,rx:5,ry:5
    style test fill:#7fd9c7,color:#fff,stroke:#4CBB9D,stroke-width:1px,rx:5,ry:5
    style creds fill:#7fd9c7,color:#fff,stroke:#4CBB9D,stroke-width:1px,rx:5,ry:5
    style bundle fill:#7fd9c7,color:#fff,stroke:#4CBB9D,stroke-width:1px,rx:5,ry:5
    style upload fill:#7fd9c7,color:#fff,stroke:#4CBB9D,stroke-width:1px,rx:5,ry:5
    style build fill:#7fd9c7,color:#fff,stroke:#4CBB9D,stroke-width:1px,rx:5,ry:5
    style start fill:#7fd9c7,color:#fff,stroke:#4CBB9D,stroke-width:1px,rx:5,ry:5
    style running fill:#90EE90,color:#000,stroke:#4CBB9D,stroke-width:2px,rx:5,ry:5
    style dashboard fill:#7fd9c7,color:#fff,stroke:#4CBB9D,stroke-width:1px,rx:5,ry:5
    style check fill:#fff,color:#000,stroke:#333,stroke-width:1px
    style success fill:#fff,color:#000,stroke:#333,stroke-width:1px
    style logs fill:#FFB6C6,color:#000,stroke:#CC0000,stroke-width:1px,rx:5,ry:5

19.2 Configuring rsconnect

To deploy to Posit Connect Cloud, you’ll need the rsconnect package. Install and load it:

install.packages("rsconnect")
library(rsconnect)

Connect Cloud uses API authentication, which means you’ll configure rsconnect with your server URL and API key (not a username and password). You can generate an API key from your Connect Cloud account settings.

Set your Connect Cloud credentials using rsconnect::connectUser():

rsconnect::connectUser(
  account = "https://connect.posit.cloud",
  token = "your_api_key",
  server = "posit-connect-cloud"
)

Once configured, rsconnect will remember your credentials for future deployments.

19.2.1 Deploying from RStudio

RStudio connects to Connect Cloud through the Publish button. After configuring your account, load and document your app-package, then launch app.R:

devtools::load_all()
devtools::document()
source("app.R")

Click the Publish icon in the Viewer pane, select your deployment account, choose which files to include, and enter an app name. RStudio will bundle your files and send them to Connect Cloud.

19.2.2 Deploying from Positron

You can also deploy from Positron using the rsconnect::deployApp() function. This approach gives you full control over deployment parameters:

rsconnect::deployApp(
  appDir = getwd(),
  appName = "movie-reviews",
  server = "posit-connect-cloud",
  account = "your_account")

The deployment output is printed directly to the Console, and the process works identically to RStudio’s Publish buttonβ€”both use rsconnect under the hood.

19.3 Deployment logs

When you deploy to Connect Cloud, you’ll see output showing each step of the process: bundling files, capturing dependencies, uploading the bundle, and building the container environment. Here’s what a successful deployment looks like:

── Preparing for deployment ────────────────────────────────────────────────────
β„Ή Deploying to Posit Connect Cloud
β„Ή Creating application on server...
β„Ή Created deployment with id 98765432
β„Ή Bundling 68 files: .Rbuildignore, app.R, DESCRIPTION,
NAMESPACE, README.md, renv.lock, inst/extdata/movies.fst,
inst/prod/app/app.R, R/launch_app.R, R/mod_var_input.R,
R/mod_scatter_display.R, R/scatter_plot.R, data/movies.rda,
man/*.Rd, tests/testthat/*.R, and others...
β„Ή Capturing R dependencies
β„Ή Found 87 dependencies
β„Ή Created 2,941,205b bundle
β„Ή Uploading bundle...
βœ” Uploaded bundle
── Deploying to server ─────────────────────────────────────────────────────────
β„Ή Waiting for deployment to start...
β„Ή Building image...
β„Ή Installing system dependencies...
β„Ή Installing R packages...
β„Ή Starting deployment...
βœ” Deployment succeeded!
β„Ή Your application is available at:
   https://your-workspace.connect.posit.cloud/content/abc123/

The bundling step captures all your R dependencies through renv.lock (if you’re using renv) or by scanning your code for package imports. Connect Cloud then builds a container image with those dependencies installed, ensuring your app runs the same way regardless of updates to external packages.

You can monitor your application’s status and view more detailed logs through the Connect Cloud dashboard.

19.4 Monitoring and managing your application

After your application is deployed, visit the Connect Cloud dashboard to monitor its status. You can view:

  • Application logs: Review startup messages and runtime output to debug issues.
  • Usage metrics: See how many users are accessing your app and when.
  • Resource usage: Monitor CPU and memory consumption.
  • Deployment history: Track previous versions and rollback if needed.

You can also update your application by redeploying from RStudio or Positronβ€”Connect Cloud will bundle the new code and replace the running instance with the updated version.

19.5 The rsconnect folder

When you deploy with rsconnect, a rsconnect/ folder is automatically created to store deployment metadata and configuration. This folder records which account and server each app was deployed to:

rsconnect/
└── connect.posit.cloud
    └── your_account
        └── movie-reviews.dcf
3 directories, 1 file

The .dcf file contains metadata about your deployment (app ID, account, version), but it should not be committed to Git. It contains machine-specific settings and can cause conflicts when multiple team members deploy the same app.

Add rsconnect/ to .gitignore to prevent accidental commits:

.Rproj.user
.Rhistory
.RData
.Ruserdata
.DS_Store
sap.Rcheck/
sap*.tar.gz
sap*.tgz
rsconnect/

/.quarto/
inst/doc
*_.new.png

If rsconnect/ was already committed, remove it from Git history:

git rm -r --cached rsconnect/
git commit -m "Remove rsconnect folder from repository"
git push origin main

This will remove it from the Git history while keeping it locally. If we need to share deployment details with our team, we can document the deployment process in the README.Rmd or create a deploy.Rmd vignette.

Recap

Deploying your app-package to Posit Connect Cloud is straightforward: configure rsconnect with your account credentials, then push your app from RStudio or Positron. Connect Cloud handles dependency management and container setup automatically.

TipRecap: Posit Connect Cloud
  1. Create a Posit Connect Cloud account and generate an API key from your account settings.

  2. Install rsconnect and configure it with your Connect Cloud URL and API key using rsconnect::connectUser().

  3. Verify your app runs locally using launch_app() before deploying.

  4. Deploy from RStudio using the Publish button or from any IDE using rsconnect::deployApp().

  5. Add rsconnect/ to .gitignore to prevent deployment metadata from being committed:

    rsconnect/

    If already committed:

    git rm -r --cached rsconnect/
    git commit -m 'Remove rsconnect folder from repository'
  6. Monitor your application through the Connect Cloud dashboard to view logs, usage, and manage versions.