Deploy as Databricks App¶
This guide walks you through deploying Databricks DevBox as a Lakehouse App in your Databricks workspace.
Prerequisites¶
- Databricks Workspace (AWS, Azure, or GCP)
- Unity Catalog enabled (recommended for token management)
- Workspace Admin permissions (or permission to create apps)
- Databricks Runtime 13.3 LTS or higher
Step 1: Copy App Folder to Workspace¶
Option A: Using Databricks CLI¶
# Install Databricks CLI if needed
pip install databricks-cli
# Configure authentication
databricks configure --token
# Upload the app folder to your workspace
databricks workspace import_dir \
./app \
/Workspace/Users/<your-email>/databricks-devbox-app \
--overwrite
Option B: Using Databricks UI¶
- Navigate to your Databricks workspace
- Click Workspace → Users →
- Right-click → Create → Folder → Name it
databricks-devbox-app - Click the Import button (or drag and drop) to upload the following files from the
app/folder: app.pyvibe_code.pyversion.pyrequirements.txtapp.yamldevbox.yaml
Step 2: Create Lakehouse App¶
Using Databricks UI¶
- Navigate to Apps in the left sidebar
- Click Create App
- Fill in the app details:
Basic Information:
- Name:
databricks-devbox - Description:
Web-based development environments with code-server
Source Code:
- Source Type:
Workspace - Source Path:
/Workspace/Users/<your-email>/databricks-devbox-app - Entry Point:
app.py
Configuration:
- Python Version:
3.11 -
Command:
['python', 'app.py'](fromapp.yaml) -
Click Create
Using Databricks CLI (Advanced)¶
# Create app using Databricks CLI
databricks apps create \
--source-path /Workspace/Users/<your-email>/databricks-devbox-app \
--name databricks-devbox \
--description "Web-based development environments"
Step 3: Configure Environment Variables (Optional)¶
You can customize the behavior by setting environment variables in app.yaml:
command: ['python', 'app.py']
env:
- name: 'HOME'
value: '/app/python/source_code'
- name: 'SHELL'
value: '/usr/bin/bash'
- name: 'DATABRICKS_APP_DEPLOYMENT'
value: 'true'
- name: 'UV_PYTHON'
value: '/usr/bin/python3.11'
Step 4: Launch the App¶
- Navigate to Apps in your Databricks workspace
- Find databricks-devbox in the list
- Click Start or Launch
- Wait for the app to initialize (first launch takes 2-3 minutes)
What Happens on First Launch?¶
The app automatically:
- ✅ Downloads the platform-specific Go binary from GitHub releases
- ✅ Installs code-server (version specified in
CODE_SERVER_VERSION) - ✅ Installs Databricks CLI
- ✅ Sets up vibe coding tools (Claude Code, CCR, Codex, Gemini)
- ✅ Generates Databricks authentication token
- ✅ Starts the DevBox manager server
Step 5: Access the App¶
Once launched, you'll see the app URL:
Click the URL to access the Databricks DevBox web interface.
Understanding the Deployment¶
File Structure in Workspace¶
/Workspace/Users/<your-email>/databricks-devbox-app/
├── app.py # Main Python entry point
├── app.yaml # Databricks App configuration
├── devbox.yaml # DevBox configuration (extensions, templates)
├── vibe_code.py # Vibe coding tools setup
├── version.py # Version management
└── requirements.txt # Python dependencies
Binary Downloads¶
The app downloads binaries to:
/app/python/source_code/
├── build/
│ └── databricks-devbox-<os>-<arch> # Go server binary
├── .local/
│ ├── lib/
│ │ └── code-server-v4.104.1/ # code-server
│ └── bin/
│ ├── code-server -> ../lib/code-server-v4.104.1/bin/code-server
│ └── databricks # Databricks CLI
└── .npm-global/
└── bin/
├── claude-code # Claude Code CLI
├── ccr # Claude Code Router
├── codex # OpenAI Codex CLI
└── gemini # Google Gemini CLI
Data Persistence¶
Server data is stored in:
/app/python/source_code/
├── data/
│ ├── servers.json # Server configurations
│ └── <server-id>/ # Per-server data
│ └── code-server/ # code-server configs
├── logs/
│ └── <server-id>/ # Per-server logs
└── workspace/
└── <server-id>/ # Workspaces
Configuration¶
Customize Extension Groups¶
Edit devbox.yaml to add or modify extension groups:
extension_groups:
python:
name: "Python"
description: "Python development tools"
extensions:
- "ms-python.python"
- "ms-pyright.pyright"
user_settings:
"python.languageServer": "None"
Learn more about configuration →
Add Workspace Templates¶
Add templates in devbox.yaml:
packaged_assets:
tabs:
- name: "My Templates"
items:
- name: "ML Project"
description: "Machine Learning starter"
extensions_groups:
- "python"
- "jupyter"
github_url: "https://github.com/org/ml-starter.git"
Troubleshooting¶
App Fails to Start¶
Check logs:
Common issues:
- ❌ Binary download failed → Check internet connectivity from workspace
- ❌ Permission denied → Ensure Unity Catalog is enabled for token generation
- ❌ Python version mismatch → Verify
UV_PYTHONenvironment variable
Code-Server Not Installing¶
Solution: Manually set CODE_SERVER_VERSION:
Vibe Coding Tools Not Working¶
Check:
- Token generation is working (requires Unity Catalog)
- CCR is started:
source ~/.bashrc && ccr status - Configuration files exist in
.claude-code-router/
Updating the App¶
Update to Latest Version¶
- Stop the app in Databricks UI
- Replace files in workspace with new versions
- Update
LHA_SERVER_VERSIONinapp.yamlif needed - Restart the app
Update Vibe Coding Tools¶
# SSH into workspace or use notebook
npm install -g @anthropic-ai/claude-code@latest
npm install -g @musistudio/claude-code-router@latest
Security Considerations¶
Token Management¶
- Tokens are auto-generated with configurable expiry
Workspace Isolation¶
- Each code-server instance runs in isolated workspace
- No cross-instance file access
- Separate configuration per instance
Network Security¶
- All traffic routed through Databricks App proxy
- Authentication handled by Databricks SSO
- No direct internet access from code-server instances
Next Steps¶
-
Understand how DevBox works
-
Customize your deployment
-
Configure AI tools