Skip the guide and deploy the sample notebook
Deploy a Jupyter notebook to Connect Cloud
In this guide, you deploy a Jupyter notebook to Connect Cloud and get a URL you can share. You can deploy from GitHub, from Positron or VS Code, or from the command line.
Connect Cloud renders your notebook and publishes it as a static web page. Visitors see the results but cannot edit or run the code.
The sample notebook is an exploratory analysis of the Palmer penguins dataset, with summary tables, charts, and a correlation matrix.

The source code is available in the examples-jupyter repository.
Getting started
Whichever method you choose, you need the following:
A Connect Cloud account.
A Jupyter notebook. This guide uses the sample notebook, named
pandas_eda.ipynb, which reads its data fromdata/penguins_clean.csv.A
requirements.txtfile that lists the Python packages you use, in the same folder as the notebook. The sample notebook uses the following packages:requirements.txt
jupyter==1.1.1 ipykernel==6.29.5 pandas==2.2.2 plotnine==0.13.6
To preview the notebook before you deploy, install the dependencies and open it from the folder that contains pandas_eda.ipynb:
Terminal
pip install -r requirements.txt
jupyter notebook pandas_eda.ipynbIf you have already rendered your notebook to HTML, you can publish that file instead by using it as the primary file (for example, notebook.html).
Choose a deployment method
| Method | When to use it | Jump to |
|---|---|---|
| GitHub | Your code is on GitHub and you want it to update when you push (public repositories only on free accounts) | Deploy from GitHub |
| Posit Publisher | You work in Positron or VS Code and do not use GitHub | Deploy from Positron or VS Code |
| rsconnect-python | You want to deploy from a terminal or automate deployments | Deploy from the command line |
For more on how these methods differ, see Publishing.
Deploy from GitHub
Use this method when your notebook’s code is in a GitHub repository and you want changes you push to publish automatically. On a free account, your repository must be public, so anyone can see your code.
- Commit
pandas_eda.ipynb,data/penguins_clean.csv, andrequirements.txt, then push your notebook to a GitHub repository. - Sign in to Connect Cloud.
- Click Publish at the top of your Home page. If this is your first time publishing, Connect Cloud prompts you to install the GitHub App, which lets Connect Cloud read your repository.
- Select Jupyter.
- Select your repository.
- Check that Branch is the branch that has your content, usually
main. - Select
pandas_eda.ipynbas the Primary file. - Leave Automatically publish on push on if you want Connect Cloud to update what you published each time you push to this branch. Turn it off to update only when you choose.
- Click Publish.
- Result: Connect Cloud shows a log of the install steps while it deploys. When it finishes, your notebook is live as an HTML document at an address like
https://[content-id].share.connect.posit.cloud, where[content-id]is a unique identifier that Connect Cloud picks. You can set a custom name to change the URL. - Update or redeploy: Commit and push to the connected branch and Connect Cloud republishes automatically. If you turned off automatic publishing, click Republish on the content’s card on your Home page. See Republishing.
For all options, see Publish from GitHub.
Deploy from Positron or VS Code
Use this method when you work in Positron or VS Code and want to publish your notebook directly. Positron includes the Posit Publisher extension. In VS Code, install it from the marketplace first.
- Open your project folder in Positron, or in VS Code with Posit Publisher installed.
- Click the Posit Publisher icon in the Activity Bar.
- Next to CREDENTIALS, click + and select Posit Connect Cloud. A credential is a saved connection to your Connect Cloud account. Your browser opens.
- In your browser, check that the Authorize Access code matches the code in Positron or VS Code. Then click Continue and Authorize.
- Return to Positron or VS Code and accept or change the name for this credential. Do this once.
- Click the + next to Deployments. If Posit Publisher asks which file to publish, select
pandas_eda.ipynb. - Enter a title for your content, then select the credential you just added.
- Under PROJECT FILES, check that the list includes
pandas_eda.ipynb,data/penguins_clean.csv, andrequirements.txt. Connect Cloud uploads only the files in this list. - Click Deploy Your Project.
- Result: A success message appears in the lower right of Positron or VS Code. Click View Content in the extension to open the notebook on Connect Cloud. Its address has the form
https://[content-id].share.connect.posit.cloud, where[content-id]is unique to your notebook. - Update or redeploy: Save your changes, open Posit Publisher, select the previous deployment, and click Deploy Your Project again. Keep the
.positfolder in your project. It remembers which Connect Cloud content this project publishes to, so the next deploy updates the same content instead of creating a new one.
For the configuration file, multiple deployments per project, and troubleshooting, see Publish from your IDE.
Deploy from the command line
Use this method to deploy from a terminal or to automate deployments, for example, from a script. It requires rsconnect-python version 1.31.0 or higher.
Install the
rsconnect-pythoncommand-line tool.Terminal
pip install rsconnect-pythonAdd your Connect Cloud account. Replace
<YOUR_ACCOUNT_HERE>with your account name from your account page. Your browser opens for you to authorize access.Terminal
rsconnect add --connect-cloud \ --account "<YOUR_ACCOUNT_HERE>" \ --name cloudDeploy the notebook. The folder that contains it needs
requirements.txtanddata/penguins_clean.csv.Terminal
rsconnect deploy notebook pandas_eda.ipynb --name cloud
- Result: The command prints the URL of your content. Open the URL to see the content’s page on Connect Cloud. Add
--quietto print only the URL. - Update or redeploy: Run the same
rsconnect deploycommand again. The directory remembers where you deployed, so you can omit--name.
For noninteractive credentials, examples for automated builds, and other options, see Publish from your console or terminal.
After you deploy
Common things to set up next. They work the same however you deployed your notebook:
- Passwords and API keys: Store them as secret variables, not in your code. Add them under Variables in content settings, or during publishing. Read them with
os.getenv("NAME"). - Access and sharing: Control who can view your notebook in Sharing.
- Scheduling: On paid plans, schedule your notebook to republish at set times, for example, to refresh data each day.
- Custom name and domain: Change the notebook’s URL with a custom name or a custom domain.
- Upload size limit: The upload size limit applies when you upload your project files from your editor or the command line.
Troubleshooting
- Missing package error: Add the package to
requirements.txtand republish. Make sure the file is in the same directory as the notebook. - Missing data file: Commit the file to the repository, or include it under PROJECT FILES in Posit Publisher. Keep it in the
datafolder, because the notebook reads it by that relative path. - Repository not listed: Confirm that the GitHub App has access to it.
- The deploy command stops before uploading: The folder you are deploying needs a
requirements.txtfile. See Create a requirements.txt file.
If your deployment still fails, read the log that Connect Cloud shows while it deploys and look for the first error. You can also try Error Assist, which gives guidance based on your log output.