---
title: Deploy Your First Project
description: Push code and watch Atlasflow build, deploy, and serve your application.
order: 1
---

Once you've created a project, Atlasflow deploys automatically when you push to the default branch.

## Deployment lifecycle

Each push to the default branch creates a new **deployment**. Atlasflow runs through these stages:

1. **Build**: clones your repository at the commit SHA and builds a container image from your Dockerfile, or by auto-detecting your stack when no Dockerfile is present.
2. **Image**: pushes the built image to Atlasflow's container registry.
3. **Run**: starts a VM running your container with your project's runtime environment variables.
4. **Route**: assigns a preview URL and routes traffic once the container passes health checks.

You can follow progress in the deployment detail view in the Atlasflow dashboard.

## Preview URLs

Every deployment gets a unique preview hostname:

```
{project}-{token}-{workspace}.atlasflow.dev
```

The token is derived from the deployment ID and is stable for that deployment. Use preview URLs to test changes before promoting traffic to a custom domain.

Your project also receives a default hostname:

```
{project}-{workspace}.atlasflow.dev
```

This points to the latest successful deployment.

## Trigger a deployment

Push a commit to your default branch:

```bash
git push origin main
```

Atlasflow detects the push via the GitHub App webhook and starts a new build automatically.

## Verify your deployment

After the deployment reaches a running state:

1. Open the preview URL from the deployment page.
2. Confirm your application responds correctly.

> **Warning:** Your container must listen on **port 3000** and respond to `GET /` with a **2xx** status code. See [Container requirements](/docs/guides/container-requirements.md) for details.

## Troubleshooting

- **Build failed**: check the [build logs](/docs/observability/build-logs.md) for Dockerfile or build configuration errors. Verify your root directory and Dockerfile path in project settings.
- **Deployment unhealthy**: confirm your app listens on port 3000 and returns HTTP 200 on `/`. Check the [runtime logs](/docs/observability/runtime-logs.md).
- **Missing environment variables**: add runtime variables in project settings. See [Environment variables](/docs/guides/environment-variables.md).

See [Troubleshooting](/docs/resources/troubleshooting.md) for more.

## Next steps

- [Configuration](/docs/guides/configuration.md): customize build settings.
- [Environment variables](/docs/guides/environment-variables.md): configure build and runtime values.
- [Custom domains](/docs/networking/custom-domains.md): point your own domain at Atlasflow.