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".
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
- Confirm the role the step requires in the deployment process.
- Register a target in the environment and tag it with that role.
- 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.
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.