Skip to content

Publishing from Local Files

Already have a Dash app written and ready to publish? This guide can help you take the app files on your workstation and turn them into a published app on Plotly Cloud.

Preparing your app files

Plotly Cloud expects your app files to meet certain requirements. In this step, you'll review your files and make any adjustments needed to meet the requirements.

To prepare your app files:

  • Make sure that the file containing your Dash app definition is named app.py. (You can upload an app with more than one Python file, but the entry point must be named app.py).

  • In your app.py file, add a line server = app.server.

  • List your app dependencies in a requirements.txt file. This file lets Plotly Cloud know which dependencies to install for your app.

    Tip

    You can generate a requirements.txt based on the Python packages present in a local environment where your app successfully runs (ideally a virtual environment dedicated to your app). To do this, activate the environment and then run pip freeze > requirements.txt. You can also check the environment's Python version with python --version (you'll be asked to select a Python version in a later step).

  • Make sure that the total size of your files is less than 80 MiB.

Uploading your app files to Plotly Cloud

To upload your app files:

  1. Go to Plotly Cloud: https://cloud.plotly.com/

  2. Select New.

  3. In a different window, browse to your app files. Multi-select the files and/or folders and then drag them to the upload area. Alternatively, if your app files are all in a single folder, you can select the upload area and then select your folder.

    Plotly Cloud verifies that your files meet the requirements described above. If you accidentally upload unneeded folders like .git or .venv, they are omitted to reduce the final app size.

    If you forget some files or if you need to make further changes to meet the requirements, select Remove and then drag the new set of files.

    List of uploaded files with passing checks

Configuring general settings

Several options are available under Configuration:

  • Name: Identifies your app when you manage it on Plotly Cloud. You can change the automatically generated name to one that you prefer.

  • App URL: The unique URL where users will go to view the live app. You can change the default URL if you have a Plotly Pro plan (or higher).

  • Python version: The Python version that Plotly Cloud will use to build your app. It must be compatible with the dependencies in your requirements.txt file in order for your app to successfully build.

  • Environment variables (optional): Values that your app code expects in the live app environment. For more information, see Environment Variables.

    Configuration options

When everything looks good, select Save & publish.

You're taken to your apps list where you can monitor the status of your new app. If Plotly Cloud is able to successfully build and run your app, its status progresses to Running (you can follow along in the logs).

Select View in new tab Plotly Cloud app View in New Tab icon to view the live app.

Next, you may want to share or update your app.