# services.<name>.restart

> Restart behaviour when the process exits.

Restart behaviour when the process exits.

- **Type:** object
- **Since:** manifest v1

## Example

```yaml
services:
  web:
    restart:
      policy: on_failure
      max_retries: 10
```

## Fields

### policy

`services.<name>.restart.policy`

When to restart.

- **Type:** `on_failure`, `always`, `never`
- **Default:** `on_failure`
- **Since:** manifest v1

```yaml
services:
  web:
    restart:
      policy: on_failure
```

### max_retries

`services.<name>.restart.max_retries`

Restarts before the service is marked crashed.

- **Type:** integer
- **Default:** `10`
- **Range:** 0 to 100
- **Since:** manifest v1

```yaml
services:
  web:
    restart:
      max_retries: 10
```

## See also

- [services](/docs/manifest/services/): all fields of `services`
- [guv.yaml reference](/docs/manifest/)
