Skip to content
Latchkey

Octopus "No deployment targets found" in CI

A step needs a target in a specific role within the environment, and Octopus found none available. Either no machine is tagged with that role in the environment, or the matching targets are unhealthy or disabled, so there is nowhere to deploy.

What this error means

The deployment fails or warns with "No deployment targets found in Production with role web-server" or "No machines were found in this environment".

octo
Deploying to Production...
No deployment targets found in environment 'Production' with role 'web-server'.

Common causes

No target has the required role in the environment

The step is scoped to a role, but no machine in that environment carries the role, so no target matches.

Matching targets are unhealthy or disabled

Targets exist with the role but are offline, unhealthy, or disabled, so Octopus excludes them and finds none available.

How to fix it

Add or tag a healthy target with the role

  1. Confirm the role the step requires in the deployment process.
  2. Register a target in the environment and tag it with that role.
  3. Run a health check so the target is Healthy before deploying.

Bring existing targets back to Healthy

If targets exist but are offline or disabled, restore the Tentacle or agent connection and re-run a health check so they become eligible.

Terminal
octo health-check --project "Web" --environment "Production" \
  --server "$OCTOPUS_URL" --apiKey "$OCTOPUS_API_KEY"

How to prevent it

  • Keep at least one healthy target per role in every environment.
  • Alert on unhealthy or offline targets before deploys run.
  • Match step role scoping to the roles your targets actually carry.

Frequently asked questions

What causes ""No deployment targets ... found""?
The step is scoped to a role, but no machine in that environment carries the role, so no target matches.
How do I fix "No deployment targets ... found"?
Add or tag a healthy target with the role

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card