---
title: "alpacon agent restart"
description: "Restart the Alpamon agent on a server from the CLI. Skip confirmation for scripts, check why active work blocks a restart, and use the force flag when needed."
---

> Full documentation index: https://docs.alpacax.com/llms.txt

# alpacon agent restart

Restart the Alpamon agent on a server.

## Usage

`alpacon agent restart SERVER [flags]`

## Key facts

- Confirmation is required unless you pass `--yes`.
- Active Websh or WebFTP sessions and running commands block the action unless you pass `--force`.
- Exit code `5` means the server has active user work.

## Flags

| Flag | Type | Description | Default |
| --- | --- | --- | --- |
| `--force` | `bool` | Override the busy guard even when the server has active user work | `false` |
| `-h, --help` | `bool` | help for restart | `false` |
| `-y, --yes` | `bool` | Skip confirmation prompt | `false` |
| `--output` | `string` | Output format: table or json | `table` |

## Examples

Restart the agent

```bash
alpacon agent restart my-server
```

Skip confirmation

```bash
alpacon agent restart my-server --yes
```

Proceed despite active work

```bash
alpacon agent restart my-server --force
```

## Exit codes

Exit code `5` means the server has active user work; pass `--force` to override it, or wait until the work finishes.

Source: https://docs.alpacax.com/reference/cli/agent/restart/
