## TL;DR

On CoreOS, run the install steps with sudo; permission errors during setup are the norm without it, not a broken machine.

## Steps

1. On CoreOS, run the install steps with sudo; permission errors during setup are the norm without it, not a broken machine. The agent reads its API key and target from the ignition config, so after a failed install open the rendered ignition and check MW_API_KEY and MW_TARGET for typos before anything else. Validate the key/target pair independently so you know the config values are good. Then read the agent service logs with journalctl; the first failure line distinguishes auth problems from connectivity problems.

## When to use

You are seeing this: Validate the key/target pair independently so you know the config values are good. Use this skill when you run into "Middleware on CoreOS: sudo the install, check key and target in ignition".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
