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)
- Link GitHub Repository
- Navigate to your Databricks workspace
- Go to your user directory
- Click Create → Git 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):
- 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
- Databricks Resources
- Update
DATABRICKS_CATALOG
with your target catalog name - Update
DATABRICKS_SCHEMA
with your target schema name
- Update
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.
- Navigate to Apps
- Go to Compute → Apps
- Click Create App
- Configure Application
- Select Custom App
- Configure SQL warehouse for your application
- Navigate to Catalog → Select your target catalog
- Go to Permissions
- Add the app's service principal user
- Grant the following permissions:
- USE CATALOG
- USE SCHEMA
- Navigate to the specific schema
- Go to Permissions
- Grant the following permissions:
- USE SCHEMA
- EXECUTE
- SELECT
- READ VOLUME (if required)
- Initiate Deployment
- Click Deploy in the Apps interface
- When prompted for the code path, provide your Git folder path or select your repository folder
- Monitor Deployment
- The deployment process will begin automatically
- Monitor logs for any configuration issues
To deploy updates from your GitHub repository:
- Pull Latest Changes
- In the deployment interface, click Deployment Source
- Select main branch
- Click Pull to fetch the latest changes from GitHub
- Redeploy
- Click Deploy again to apply the updates
- 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