# Deploy an app to NOVA

> Set up Docker and a container registry, connect the NOVA CLI, and deploy your app permanently to a Wandelbots NOVA instance.

So far your programs run on your own machine. Deploying makes your app permanently available on the NOVA instance:
it appears as a tile on the home screen, keeps running independently of your laptop,
and its programs stay available in the Program Operator.

NOVA apps are deployed as Docker containers. You build the container locally, push it to a container registry,
and the NOVA instance pulls it from there.

![Architecture Overview](/assets/nova/develop/architecture.webp)

> **Info:** This step introduces tooling that may require support from your IT department,
> e.g., installing Docker and getting access to a container registry.
> You can develop and test locally without it and come back once the tooling is available.

## Prerequisites

- You completed the [local development setup](/developer/local-development) and have a project that runs locally.
- You have permission to install Docker and to use a container registry, e.g., Docker Hub or a company-internal registry.

## Set up Docker and registries

You'll need Docker installed locally and access to an OCI registry such as Docker Hub.

### Step 1: Install Docker and create account

Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) (or Docker Engine) and create an account on your preferred OCI registry.

### Step 2: Log in to registry

Open your terminal and input the following command. This will allow Docker to push images to your registry:

```bash
docker login --username MY-DOCKER-USERNAME MY-REGISTRY
```

If you're using Docker Hub, the registry value is typically `registry-1.docker.io/MY-DOCKER-USERNAME`.

> **Info:** Be aware that if you have two-factor authentication (2FA) enabled on your account, you will need to use a Personal Access Token (PAT) instead of your password to authenticate. Even if 2FA is enabled the terminal will require you to enter a password but you have to use the PAT instead.

### Step 3: Update repository visibility in Docker

By default, repositories created on Docker Hub are public. If you want to keep your images private, open the repository settings and change the visibility as shown below.

<https://hub.docker.com/repository-settings/default-privacy>

> **Info:** Private repositories ensure that only authenticated users can pull your app image.

![Docker settings](/assets/nova/develop/docker_private.webp)

## Connect the NOVA CLI

### Step 1: Set up CLI

Before you can deploy, specify the NOVA instance you're deploying to.

> **Info:** If you don't specify a host, the CLI will default to using a local instance.

**Physical instance or VM**

Deploying to a physical controller or virtual machine in your network typically relies on IP connectivity.

Set the host of your NOVA instance:

```bash
nova config set host 192.168.1.100
```

This will allow the NOVA CLI to connect to your instance and deploy your app.

Provide additional authentication details if your instance requires them.

**Cloud instance**

[Cloud instances](/nova-cloud/cloud-instances) are accessible over the internet and require authentication.

Set the host of your cloud instance:

```bash
nova config set host my.instance.wandelbots.io
```

This will allow the NOVA CLI to connect to your instance and deploy your app.

Then authenticate via the CLI:

```bash
nova login
```

Follow the prompts to complete the login flow in your browser.

### Step 2: Set image registry

Configure the NOVA CLI to specify where to push your Docker images. This registry will also be used by your NOVA instance to pull the images.

```bash
nova config set image-registry MY-REGISTRY
```

If you're using Docker Hub, the registry value is typically `registry-1.docker.io/MY-DOCKER-USERNAME`.

## Deploy your app

### Step 1: Deploy the app

From within your project directory, deploy the app to your NOVA instance by running:

```bash
nova app install
```

This command builds the Docker container, pushes it to your registry, and instructs the instance to pull and run it.

> **Info:** You can also pass the app name explicitly, e.g. `nova app install myapp`.

### Step 2: Verify the app installation

After your app is installed, go to the home screen and ensure the app is visible.

![NOVA Python application interface](/assets/nova/installed-app.webp)

> **Info:** You can customize the icon by changing the `static/app_icon.png` in the auto generated project.

## Next steps

Your app now runs on the NOVA instance. To make it available to other NOVA users,
continue with [publishing to the app store](/developer/custom-apps/publish-to-app-store).
