> ## Documentation Index
> Fetch the complete documentation index at: https://sysg.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# restart

# restart

Restart services with zero downtime.

```sh theme={null}
$ sysg restart
```

## Options

| Short | Long                | Description                                                                                                                                |
| ----- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `-c`  | `--config`          | Path to the configuration file. When specified, reloads the configuration and restarts all services with the new settings                  |
| `-s`  | `--service`         | Name of a specific service to restart. If not specified, all services are restarted                                                        |
| `-p`  | `--project`         | Target a stable project id when restarting services                                                                                        |
| `-`   | `--daemonize`       | Start the supervisor before restarting if it is not already running                                                                        |
| `-`   | `--sys`             | Opt into privileged system mode. Requires running as root                                                                                  |
| `-`   | `--drop-privileges` | Drop child service privileges during spawn. In root/system mode, services without an explicit `user` run as `nobody`                       |
| `-`   | `--log-level`       | Set logging verbosity for this invocation. Accepts named levels (`trace`, `debug`, `info`, `warn`, `error`, `off`) or numeric values (5-0) |

## Examples

### Restart all services

```sh theme={null}
$ sysg restart
```

### Restart specific service

```sh theme={null}
$ sysg restart --service api
```

### Restart with new configuration

```sh theme={null}
$ sysg restart --config production.yaml
```

Reloads configuration and restarts all services.

### Restart a project and reload its stored manifest

```sh theme={null}
$ sysg restart --project arbitration
```

When `--config` is omitted, `restart --project` reuses the config path the
running supervisor already recorded for that project and reloads it from disk.
Manifest changes are applied: services added since the last load start, services
removed from the manifest stop, and changed commands take effect. You do not
need to pass `--config` again if the project already has a known config path.

## Cron units

`restart --service <CRON_UNIT>` is invalid. Cron units are scheduler entries,
not persistent services, so they cannot be restarted directly:

```
cron unit '<name>' cannot be restarted directly; reload project '<project>' to reschedule it
```

To reschedule cron definitions, reload or restart the whole project. A project
restart re-reads the manifest and reschedules every cron unit it defines.

## Deployment strategies

Services configured with `deployment.strategy: rolling` get zero-downtime restarts:

1. New instance starts
2. Health checks pass
3. (Optional) blue/green `switch_command` shifts traffic to candidate slot
4. Old instance receives `SIGTERM`
5. Grace period allows requests to complete
6. Old instance stops

Services without rolling deployment stop then start.

For deployment scripts, prefer:

```sh theme={null}
sysg restart --config <config> --daemonize
```

This keeps restart behavior explicit when supervisor detection is unavailable.

## See also

* [`start`](/how-it-works/commands/start) - Launch services
* [`stop`](/how-it-works/commands/stop) - Stop services
* [Deployment strategies](/how-it-works/configuration#deployment-strategies)
