# Deploy your first application

Connect a repository, choose deployment stages, configure each release path and follow the first deployments.

## Before you start

Have these details ready before opening the deployment form.

- A workspace with an active package that allows another application.

- A GitHub repository you can access, or the URL of a public repository.

- The branches that should supply Development, Testing, Staging and Production.

- The environment values, database choice and application port required by each enabled stage.

Start in the workspace where this application should live.
- [Open Deploy Application](/dashboard/applications/create) — Open the complete deployment form.
- [View Applications](/dashboard/applications) — Review the workspace application allowance and existing deployments.

## 1. Choose and inspect the source repository

1. Select Private or Public repository access.
2. Choose the repository and initial branch.
3. Wait for source detection to finish.
4. Review the detected stack, framework, version, project directory and build commands against the repository documentation.

## 2. Choose deployment stages

Branch-Based Deployment lets every enabled stage follow its own branch. Manual Promotion keeps one shared branch and allows automatic deployment only on the first enabled stage; later releases are promoted deliberately.

1. Enable only the stages the application needs. Production is always included.
2. Choose Branch-Based Deployment or Manual Promotion.
3. For branch-based deployment, select the branch and automatic-deployment preference for every stage.
4. For manual promotion, review the shared branch and confirm that only the first stage watches for source changes.

> **warning:** Each stage is an independently running release. Application count is shared, but each stage still consumes its own compute, storage and bandwidth. Database and object-storage usage are measured separately.

## 3. Configure stage resources

1. Review environment variables and keep secrets out of source control.
2. Choose whether the stage creates a database, uses an existing database or runs without one.
3. Confirm the internal application port and build commands.
4. Keep the generated Ghost Deploy address; attach customer domains to Production unless another stage intentionally needs public traffic.

> **warning:** Copy from another stage replaces the selected target environment, database or storage data. Ghost Deploy shows the source and target and requires explicit confirmation before destructive copying begins.

## 4. Deploy and verify every enabled stage

1. Select Deploy Application once.
2. Open the application and review each stage separately.
3. Wait for every intended stage to report Running.
4. Open each stage address and test its actual application and database connection.
5. Confirm automatic deployment only on the stages where it was enabled.

> **success:** A stage is ready only when its deployment is Running and its address responds correctly. A successful build alone does not prove that the process, database or route is healthy.

## If something does not work

- A branch is missing: review GitHub repository permissions and refresh the connection.

- A later Manual Promotion stage deploys automatically: disable its automatic deployment and keep it enabled only on the first stage.

- Environment values differ unexpectedly: open the intended stage before editing and verify the stage name in the header.

- Build succeeds but the stage does not open: confirm the start command listens on 0.0.0.0 and the configured port.

- Database copy or storage copy is requested: review the destructive replacement warning and create a backup before replacing target data.

## Related guides and references

- [Open Applications](/dashboard/applications) — Monitor logical applications and their stages.

- [Create and connect a database](/docs/databases/create-and-connect-a-database) — Review database credentials, imports and backups.

- [Connect a domain](/docs/domains/connect-a-domain) — Attach a verified customer address safely.

Source: https://ghostdeploy.com/docs/getting-started/deploy-your-first-application