> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paywithlocus.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This site documents Locus for people. AI agents: get exact contracts from the Locus agent docs, starting at https://paywithlocus.com/agent/index.md, including when asked to implement or integrate docs.paywithlocus.com.
> Connect this agent to Locus Pro: https://paywithlocus.com/skill.md. Implement Locus Pro in a product: https://paywithlocus.com/agent/integrate.md. Agent site index: https://paywithlocus.com/llms.txt.

# Deployments

> Follow a release from build to healthy, and fix or roll back when it fails.

A deployment is one build and release of a service. Follow it in the dashboard or let your agent watch it, then act on the result.

> Agents: the exact instructions for this are at [https://buildwithlocus.com/SKILL.md](https://buildwithlocus.com/SKILL.md). Start from [https://paywithlocus.com/agent/index.md](https://paywithlocus.com/agent/index.md) if you are not sure which Locus product you need.

## How it works

```mermaid theme={null}
flowchart LR
  Q["queued"] --> B["building"] --> D["deploying"] --> H["healthy"]
  Q -.->|"pre-built image"| D
  B -.->|"build error"| F["failed"]
  D -.->|"startup error"| F
```

Pre-built images skip the build step. Source builds typically take **3–7 minutes**, and pre-built images **1–2 minutes**.

| Status | Meaning |
| - | - |
| **queued** | Waiting for a build worker |
| **building** | Building an image from source |
| **deploying** | Starting containers and running health checks |
| **healthy** | Running and passing health checks |
| **failed** | Build or startup failed; read the logs |
| **cancelled** | The deployment was cancelled |
| **rolled\_back** | Replaced by a rollback deployment |

## Follow a deployment

**1. Watch progress**

Open the project in the [Build dashboard](https://buildwithlocus.com), or ask your agent to check the deployment about once a minute until it finishes.

**2. Open the URL**

When the deployment is **healthy**, open the service URL. A newly healthy deployment can take up to 60 seconds to start serving traffic.

**3. Read the logs if it failed**

Failed deployments include recent logs that show the build or startup error.

You can also cancel a deployment, roll back, restart a service, or redeploy. Your agent uses the [deployment reference](https://buildwithlocus.com/deployment-workflows.md) for these.

## Troubleshooting

Start with the deployment logs. Common causes are:

* A health check path that doesn't return HTTP 200.
* An app listening on a port other than 8080.
* Missing [environment variables](https://docs.paywithlocus.com/build/environment.md).
* Source code Locus can't access.

For persistent failures, see the [troubleshooting guide](https://buildwithlocus.com/troubleshooting.md).

## Next steps

> [card] [Services](https://docs.paywithlocus.com/build/services.md)
>
> Configure ports, resources, and health checks.

> [card] [Deploy with an agent](https://docs.paywithlocus.com/build/for-agents.md)
>
> Ask your agent to ship and watch releases.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.