# Deploy your first app

> Create an AirLift app from a public Git repository or a container image: pick the parts, plan, variables, name and region, then pay and watch the first build.

Source: https://docs.phluit.com/products/airlift/deploy-your-first-app/

AirLift builds and runs your app from a public Git repository or a container image. There's no server to look after.

## Before you start

-   **Git:** the repository must be **public** (GitHub, GitLab, Bitbucket, Gitea or any Git server). For private code, build an image and deploy that instead.
-   **Image:** from Docker Hub or the GitHub Container Registry (ghcr.io), built for **amd64**. Private images work with a read token.
-   No code yet? The create page has public starters (Next.js, Laravel, Astro, Vite with React, Docusaurus and plain HTML) that deploy as they are.

## Create the app

1.  Open **AirLift → Create an app** ([portal.phluit.com/app-platform/new](https://portal.phluit.com/app-platform/new)).
2.  **Where is your code?** Choose **Git repository** and enter the repository address and branch, or choose **Container image** and enter the image and tag. AirLift checks the source and detects what it is: Node.js, Python, Go, PHP, Ruby, a static site or a Dockerfile.
3.  **Components:** check the parts AirLift found and their settings. An app can have:
    -   a **web service**, which answers on your domain;
    -   a **worker**, which runs in the background with no public address;
    -   a **static site**, built once and served from an edge cache;
    -   **jobs**, which run a command before or after each deployment, such as database migrations.
4.  **Plan:** pick a plan. Each one shows its memory, containers, components and bandwidth. See [Plans and prices](/products/airlift/plans-and-prices/).
5.  **Environment variables:** add the variables your app needs. Tick **Encrypt** for secrets. You can also paste a whole `.env` file with **Bulk edit / paste .env**. See [Variables, secrets and jobs](/products/airlift/variables-and-jobs/).
6.  **Name your app** and pick its **Region**. The app stays in that region.
7.  **Review** everything and click **Create app**. You confirm the plan at checkout.

## The first build

The build starts as soon as the first invoice is paid. Open the app to follow it in the live log, from queued to live. The first build usually takes **2 to 6 minutes**.

When it's live, the app answers with HTTPS on a free address, shown on the **Overview** tab. Next:

-   [Add your own domain](/products/airlift/custom-domains/)
-   [Deploy updates and roll back](/products/airlift/deploy-and-roll-back/)

## If the build fails

Open the **Activity** tab and read the build log of the failed deployment. Common causes:

-   The build or run command is wrong. Check them under **Settings → Components**.
-   The app listens on a different port. AirLift tells your app its port in the `PORT` variable; listen on that, or set the **HTTP port** of the component.
-   A variable is missing. Add it under **Settings → Environment variables**, then deploy again.

Still stuck? [Open a ticket](https://portal.phluit.com/tickets/create) with your app's name.
