---
title: Get started with Databricks Apps
description: Learn how to set up your development environment for Databricks Apps and develop and deploy your first Databricks app.
canonical_url: https://docs.databricks.com/aws/en/dev-tools/databricks-apps/get-started
---

# Get started with Databricks Apps

This page helps you get started with Databricks Apps using a step-by-step example to create a simple app in your Databricks workspace using a template that follows Databricks best practices.

This example walks you through:

* Creating an app from a template
* Viewing the app after it's deployed
* Copying the app template to your computer for further development
* Running the app locally
* Re-deploying the app to your workspace

By the end of this article, you’ll be able to iterate on your app locally and deploy updates to Databricks.

> [!TIP]
>
> If you want to deploy from a Git repository instead of workspace sync, skip the template and [create a custom app](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/create-custom-app.md) with a Git repository configured during creation. Then see [Deploy from a Git repository](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/deploy.md#deploy-git) to deploy.

## Prerequisites

Before you complete this tutorial, make sure that your Databricks workspace and local development environment are configured correctly. See [Set up your Databricks Apps workspace and development environment](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/configure-env.md).

## Step 1: Install dependencies

Open a terminal and run the following commands to:

* Install the Python libraries required by the example app.
* Create a local directory for the source and configuration files for your app.

```bash
pip install gradio
pip install pandas
mkdir gradio-hello-world
cd gradio-hello-world
```

`gradio-hello-world` is the local directory for your app files.

## Step 2: Create the app

> [!NOTE]
>
> To open Apps in Databricks on AWS GovCloud workspaces, click ![compute icon](https://docs.databricks.com/aws/en/images/icons/compute-icon.png) **Compute** in the workspace sidebar and then click the **Apps** tab.

1. In your Databricks workspace, click the ![App icon.](https://docs.databricks.com/aws/en/images/product-icons/AppIcon.svg) app switcher and select **Databricks Apps**.

2. Click **+ Create app**.

3. Choose the **Gradio Hello world** template.

   ![Select the Hello World template](https://docs.databricks.com/aws/en/images/apps/hello-world.png)

4. Name the app **gradio-hello-world** and click **Create app**.

This creates a new app based on the selected template and deploys it to your workspace.

## Step 3: View the app

After you create an app, it starts automatically and displays a URL that you can use to preview it. View the app URL and deployment status on the **Overview** page:

![View the app details page after app deployment](https://docs.databricks.com/aws/en/images/apps/hello-world-app-details-after-deploy.png)

Click the URL to view the app:

![View the output of the hello world app locally](https://docs.databricks.com/aws/en/images/apps/hello-world-app-view-local-output.png)

Databricks generates the app URL automatically based on your app name and workspace ID. You can't change the URL after you create the app. If you need a different URL, create a new app with a different name. For more information, see [App URL](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/key-concepts.md#app-url).

## Step 4: Copy the app to your computer

After you create the app, you can download the source code to your local machine to customize it.

1. Copy the commands under **Edit in your IDE**:

   ![View the app details page after app creation](https://docs.databricks.com/aws/en/images/apps/hello-world-app-details-after-create.png)

2. In a terminal, navigate to the `gradio-hello-world` local directory that you created, then run the copied commands:

   ```bash
   databricks workspace export-dir /Workspace/Users/my-email@org.com/databricks_apps/gradio-hello-world_2026_02_03-22_34/gradio-hello-world-app .

   ...
   Export complete

   gradio-hello-world % databricks sync --watch . /Workspace/Users/my-email@org.com/databricks_apps/gradio-hello-world_2026_02_03-22_34/gradio-hello-world-app

   ...
   Initial Sync Complete
   ```

   The first command exports three files from your workspace to your local directory: `app.py`, `app.yaml`, and `requirements.txt`. The second command starts a sync process that watches for local file changes and automatically uploads them to your workspace.

   * `app.py` contains the code that implements the app's functionality and user interface.
   * `app.yaml` defines the app's configuration, including its entry point and permissions.
   * `requirements.txt` lists the Python packages required by the app.

## Step 5: Modify and test the app locally

1. Optionally, customize and develop your app locally. For example, you might modify `app.py` to make the data interactive, add a theme or styling options, or allow data uploads.

2. To test your app, run `python app.py`:

   ```bash
   python app.py

   Running on local URL:  http://127.0.0.1:7860
   ...
   ```

3. To view the app, navigate to `http://127.0.0.1:7860` in a browser window.

4. Optionally, use the [databricks apps run-local command](https://docs.databricks.com/aws/en/dev-tools/cli/commands.md#apps) to run and debug the app:

   ```bash
   databricks apps run-local --prepare-environment --debug
   ```

   This command installs all dependencies and prepares the virtual environment, then starts the app and the debugger on port 5678. Navigate to `http://localhost:8001` to view the app.

   To set breakpoints in Visual Studio Code, install the Python debugger extension, then go to **Run** > **Start Debugging** > **Remote Attach**.

## Step 6: Re-deploy the app to your workspace

To re-deploy the app, copy the command under **Deploy to Databricks Apps** on the app overview page:

![Copy the command to deploy an app](https://docs.databricks.com/aws/en/images/apps/deploy-app.png)

Run the command from within the `gradio-hello-world` local directory.

The command succeeds with:

```json
{
  "create_time": "2026-02-03T23:25:38Z",
  "creator": "my-email@org.com",
  "deployment_artifacts": {
    "source_code_path": "/Workspace/Users/4cfd4a36-2cef-4155-88c4-d258ed6d0d91/src/01f10157a60a113e980014bebd5f4a03"
  },
  "deployment_id": "01f10157a60a113e980014bebd5f4a03",
  "mode": "SNAPSHOT",
  "source_code_path": "/Workspace/Users/my-email@org.com/databricks_apps/gradio-hello-world_2026_02_03-22_34/gradio-hello-world-app",
  "status": {
    "message": "App started successfully",
    "state": "SUCCEEDED"
  },
  "update_time": "2026-02-03T23:25:41Z"
}
```

To view the deployment status, go to the **Overview** page for the app.

## Step 7 (Optional): Deploy from a Git repository

The previous steps use workspace sync to deploy your app. For a more scalable workflow, push your app code to a Git repository and deploy from there. This lets you use version control, collaborate with teammates, and optionally auto-deploy on every push.

1. Initialize a Git repository in your `gradio-hello-world` directory and push it to your Git provider (for example, GitHub):

   ```bash
   git init
   git add .
   git commit -m "Initial app code"
   git remote add origin https://github.com/your-org/gradio-hello-world
   git push -u origin main
   ```

2. Configure the Git repository on your app:

   ```bash
   databricks apps create-update gradio-hello-world \
      --json '{"update_mask": "git_repository", "git_repository": {"url": "https://github.com/your-org/gradio-hello-world", "provider": "gitHub"}}'
   ```

3. For private repositories, add a Git credential for the app's service principal. See the CLI instructions in [Deploy from a Git repository](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/deploy.md#deploy-git).

4. Deploy from Git:

   ```bash
   databricks apps deploy gradio-hello-world \
      --json '{"git_source": {"branch": "main"}}'
   ```

After you configure Git deployment, you can redeploy by pushing to your repository and running the deploy command again. To redeploy automatically on every push, enable automatic Git deployments. See [Enable automatic Git deployments](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/deploy.md#automatic-deployments).

## <a id="additional-resources" /> Additional resources

Now that you deployed and customized your first app, you can:

* [Deploy from a Git repository](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/deploy.md#deploy-git) to manage your app code with version control.
* [Enable automatic Git deployments](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/deploy.md#automatic-deployments) to redeploy your app on every push to a branch.
* [Set up CI/CD with GitHub Actions](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/cicd-github-actions.md) for production deployment workflows with validation and health checks.
* [Configure authorization](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/auth.md) to manage who can access and edit your app.
* [Integrate your app](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/resources.md) with Databricks platform features like Databricks secrets or Databricks SQL.
* [Share your app](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/permissions.md) with other users in your workspace or across your organization.
* Explore more app templates to experiment with different frameworks and capabilities.
