> For the complete documentation index, see [llms.txt](https://www.lightward.guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.lightward.guide/technical/fly/restarting-apps.md). Agents can also search and read this documentation through its [MCP server](https://www.lightward.guide/~gitbook/mcp).

# Restarting apps

## Not-particularly-recommended path

The normal route for this is `fly apps restart $APP_NAME`.

This works, but (as of this writing) it restarts Fly machines in serial — and the restart sequence halts if any machine fails to restart normally. (This stuff is documented in [Rough edges](https://www.lightward.guide/technical/fly/rough-edges.md).)

## Recommended path

This command generates restart commands. If you copy and execute its output, you'll restart all of an app's Fly machines individually and in parallel. **Watch for failures — it's on you to address them.**

```
fly m list -q -a $APP | awk NF | awk '{ print "fly m restart " $1 " &;" }'
```

Or, because Isaac just found out about [pbcopy](https://ss64.com/mac/pbcopy.html):

```
 fly m list -q -a $APP | awk NF | awk '{ print "fly m restart " $1 " &;" }' | pbcopy
```

I couldn't get the above to work while also showing status/results of each restart, so this is Jed's version of it:

```
fly m list -q -a $APP | xargs -P500 -n1 fly m restart
```

### Filtering by process group

```
fly m list -a $APP | grep $GROUP | awk NF | awk '{ print "fly m restart " $1 " &;" }'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.lightward.guide/technical/fly/restarting-apps.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
