This guide walks you through deploying a Reflex web application on Databricks using the Apps platform.

  • Databricks workspace with Unity Catalog enabled
  • GitHub repository containing your Reflex application
  • Reflex Enterprise license (for single-port deployment)
  1. Link GitHub Repository
    • Navigate to your Databricks workspace
    • Go to your user directory
    • Click CreateGit folder
    • Paste the URL of your GitHub repository containing the Reflex application

Create a new file called app.yaml directly in Databricks (not in GitHub):

  1. Reflex Access Token
    • Visit Reflex Cloud Tokens
    • Navigate to Account Settings → Tokens
    • Create a new token and copy the value
    • Replace your-token-here in the configuration
  2. Databricks Resources
    • Update DATABRICKS_CATALOG with your target catalog name
    • Update DATABRICKS_SCHEMA with your target schema name

Update your Reflex application for Databricks compatibility:

Modify your main application file where you define rx.App:

Also add reflex-enterprise and asgiproxy to your requirements.txt file.

  1. Navigate to Apps
    • Go to ComputeApps
    • Click Create App
  2. Configure Application
    • Select Custom App
    • Configure SQL warehouse for your application
  1. Navigate to Catalog → Select your target catalog
  2. Go to Permissions
  3. Add the app's service principal user
  4. Grant the following permissions:
    • USE CATALOG
    • USE SCHEMA
  1. Navigate to the specific schema
  2. Go to Permissions
  3. Grant the following permissions:
    • USE SCHEMA
    • EXECUTE
    • SELECT
    • READ VOLUME (if required)
  1. Initiate Deployment
    • Click Deploy in the Apps interface
    • When prompted for the code path, provide your Git folder path or select your repository folder
  2. Monitor Deployment
    • The deployment process will begin automatically
    • Monitor logs for any configuration issues

To deploy updates from your GitHub repository:

  1. Pull Latest Changes
    • In the deployment interface, click Deployment Source
    • Select main branch
    • Click Pull to fetch the latest changes from GitHub
  2. Redeploy
    • Click Deploy again to apply the updates
Environment VariableDescriptionExample
HOMEApplication home directory/tmp/reflex
REFLEX_ACCESS_TOKENAuthentication for Reflex Cloudrx_token_...
DATABRICKS_WAREHOUSE_IDSQL warehouse identifierAuto-assigned
DATABRICKS_CATALOGTarget catalog namemain
DATABRICKS_SCHEMATarget schema namedefault
REFLEX_SHOW_BUILT_WITH_REFLEXShow Reflex branding (Enterprise only)0 or 1
  • Permission Errors: Verify that all catalog and schema permissions are correctly set
  • Port Issues: Ensure you're using $DATABRICKS_APP_PORT and single-port configuration
  • Token Issues: Verify your Reflex access token is valid and properly configured
  • Deployment Failures: Check the deployment logs for specific error messages
  • Single-port deployment requires Reflex Enterprise
  • Configuration must be created directly in Databricks, not pushed from GitHub
  • Updates require manual pulling from the deployment interface

Built with Reflex