This is the final chapter of the essential Dash Fundamentals.
The previous chapter covered how to
share state between callbacks.
Now that you’ve got a handle on the basics, it’s time to put your app into the hands of decision makers!
By default, Dash apps run on localhost, meaning that you can only access them on your
own computer. To share a Dash app, you need to publish—or deploy—it to a server.
Plotly provides two platforms whose servers you can use to publish your app: Plotly Cloud and Dash Enterprise.
Both Plotly Cloud and Dash Enterprise offer enterprise-grade hosting features. They allow you to manage published apps from a web interface to publish new app versions, control who has access to each app, view the app logs, and more.
One key difference is that Plotly Cloud servers are fully managed by Plotly, meaning that you don’t have to set up any infrastructure before you can publish apps. If you want to share your apps as quickly as possible, or if managing infrastructure is not an option for you, consider Plotly Cloud.
Getting started with Plotly Cloud is free. To publish apps at no cost, sign up to Plotly Cloud on the Free plan. See what’s included in the Free plan.
Organizations that need full control over the infrastructure generally opt for Dash Enterprise. Learn more about the requirements for installing Dash Enterprise.
It is possible to change between Plotly Cloud and Dash Enterprise as your needs evolve. In most cases, you won’t need to make any changes to your app code. For help evaluating your options, don’t hesitate to request a demo!
This guide shows how to publish to Plotly Cloud from a running Dash app. You can also publish an app by uploading files directly at https://cloud.plotly.com. See Publishing from Local Files for more details.
Note: The total size of your app files must be less than 200 MiB when publishing from dev tools or less than 80 MiB when uploading directly at cloud.plotly.com.
To publish your app to Plotly Cloud:
Create an account if you don’t have one already: https://cloud.plotly.com/
Install the Plotly Cloud extension:
bash
pip install "dash[cloud]"
Run your app in debug mode by setting debug=True on app.run in your app code:
python
app.run(debug=True)
When run in debug mode, a Dash app has a dev tools panel with tools for debugging and publishing an app to Plotly Cloud.
<img>
Authenticate to Plotly Cloud in the browser tab that opens.
Return to your running Dash app in the browser, give the app a name and select the team on Cloud that you want to publish the app to.
<img>
Select Publish App. Once your app builds and starts, you’ll see an App is live message. Select View App to see it on Plotly Cloud.
(Optional) Manage access to your app by selecting Open Settings in Plotly Cloud and going to the Sharing tab. You can grant access to team members, share with specific users by email, or make the app public.
The Plotly Cloud extension ignores certain files and folders when publishing to Cloud, for example, virtual environments. Configure additional files or folders to ignore using a
.gitignorefile in your app folder.
Dash Enterprise
is Plotly’s premier product for developing and deploying
Dash apps. It provides a complete analytical app stack, including:
- LDAP and SAML authentication middleware
- Data app Workspaces
- Job queue support
- Enterprise-wide Dash app Portal
- Reporting, alerting, saved views, and PDF reports
- AI App Catalog
- Big Data best practices
Learn more about Dash Enterprise or get in touch.
If your organization has already licensed and installed Dash Enterprise, head to the Dash Enterprise guide to get started.
For detailed requirements to deploy your app to Dash Enterprise, see Preparing Your App for Dash Enterprise.