Developing and Deploying Apps when Dash Enterprise Is Internet-Restricted

This page applies to Dash Enterprise 5.

If your administrator has isolated Dash Enterprise from public and unsecured networks, Dash Enterprise does not have access to the internet.
Systems that don’t have access to the internet are often called airgapped. This guide can help you write and deploy Dash apps that
are suited for an airgapped Dash Enterprise instance.

Note about accessing documentation: Documentation about Dash and Dash Enterprise is available in Dash Enterprise. Everyone who is logged in
and has a license seat can select Documentation from the Dash Enterprise sidebar to open these docs. However, note that documentation about other
Plotly products, such as the Python graphing library, are not included. An internet connection is required to view documentation
that is not included in Dash Enterprise.

To write Dash apps that you want to deploy to an airgapped Dash Enterprise instance, we recommend using Dash Enterprise Workspaces. Because
Workspaces uses the same environment as the deployed app, you can avoid app behavior discrepancies caused by different environments—For example,
if your workstation has internet access and Dash Enterprise does not, your app might run well locally but encounter issues when deployed to Dash Enterprise.
In addition, deploying from Workspaces does not make an external network request, whereas running git push from your workstation requires HTTPS or SSH,
which your administrator may have disabled.

Handling Dependencies

To deploy Dash apps to an airgapped Dash Enterprise instance, your app files need to instruct Dash Enterprise to fetch
packages from the right location.

Dash Enterprise libraries such as Dash Design Kit are available on the same host as Dash Enterprise. When you develop your app in Workspaces or deploy it, Dash Enterprise automatically configures your app to fetch any
Dash Enterprise libraries it requires from Dash Enterprise itself.

Your app needs to fetch all other packages it requires from a private Python package index like Artifactory that Dash Enterprise
has network access to (by default, public packages installed with pip are fetched from, which airgapped Dash Enterprise instances cannot access)—unless you opt to put the packages directly in your app files.

To configure your app to fetch packages from your private Python package index, add the following at the top of its
requirements.txt file:

--extra-index-url <private-package-index> --trusted-host <private-package-index>

where <private-package-index> is the URL to your organization’s private Python package index. You can omit the --trusted-host flag if the index uses HTTPS.

Your app will install any Dash Enterprise libraries it requires from the Dash Enterprise host, and look for all other packages in the index defined with the --extra-index-url flag. Note
that you can have more than one --extra-index-url.

If you’re working locally and want to use Dash Enterprise libraries in your app, you’ll need to add your Dash Enterprise packages URL as another --extra-index-url in order for your app to install those libraries. The first line
of your requirements.txt would then look like:

---extra-index-url <your-dash-enterprise-packages-url> --extra-index-url <private-package-index> --trusted-host <private-package-index>

where <private-package-index> is the URL to your organization’s private Python package index. You can omit the --trusted-host flag if the index uses HTTPS.

If your app requires a package that is not available in your organization’s private Python package index, include the package as a tar.gz (tarball) or .whl (wheel)
file in your app’s code and list its file name in your requirements.txt. Note that if the package depends on other packages that are similarly not available in your organization’s private Python package index,
you’ll need to add them to your app as well.

Using Local References Instead of External Requests

Any code in your app that requires an internet connection will fail when you deploy it to an airgapped Dash Enterprise instance.

When your app needs access to external resources such as datasets, we recommend adding the files to your code and referencing
them using their file paths. Consider using the persistent filesystem feature if your datasets are very large.

Remember that you can check your app logs in Dash Enterprise to troubleshoot an app that experiences issues due to the airgapped environment.

Deploying Your App

If you’re working in Dash Enterprise Workspaces, you can deploy your app from within the IDE by selecting Deploy or running Git commands
in the terminal. Learn more about deploying from a workspace.

If you’re working locally, ask your administrator whether git push over HTTPS or SSH is allowed for Dash Enterprise. If so, follow the
deployment instructions (also available in your app’s Overview in Dash Enterprise).