How do I publish a ShinyApp?

Configuring ShinyApps Account on RStudio

First, we need to install and load the rsconnect package.


Once you login to, navigate to the token page.

Token Example

Then, we can access our own personal token, which we need to link to our RStudio session, by clicking show, show secret, and copying and pasting the command into RStudio.

Secret Command

The command should take the form as follows:


At this point, if you have access to deploy the app, you can deploy it onto with the command:


If you are experiencing errors with the app deployment, deleting the app’s manifest.json may help resolve errors.


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The source code is licensed under MIT.

Suggest changes

If you find any mistakes (including typos) or want to suggest changes, please feel free to edit the source file of this page on Github and create a pull request.


For attribution, please cite this work as

Ethan Tai (2022). Publishing a ShinyApp. ImLab Notes. /post/2022/03/07/publishing-a-shinyapp/

BibTeX citation

  title = "Publishing a ShinyApp",
  author = "Ethan Tai",
  year = "2022",
  journal = "ImLab Notes",
  note = "/post/2022/03/07/publishing-a-shinyapp/"