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

#  

# `prefect server`

```command theme={null}
prefect server [OPTIONS] COMMAND [ARGS]...
```

> [!NOTE]
>
> Start a Prefect server instance and interact with the database.

## `prefect server database`

```command theme={null}
prefect server database [OPTIONS] COMMAND [ARGS]...
```

> [!NOTE]
>
> Interact with the database.

### `prefect server database reset`

```command theme={null}
prefect server database reset [OPTIONS]
```

> [!NOTE]
>
> Drop and recreate all Prefect database tables.

> **Options**
>
> **--yes**
>
> Skip confirmation.

### `prefect server database upgrade`

```command theme={null}
prefect server database upgrade [OPTIONS]
```

> [!NOTE]
>
> Upgrade the Prefect database.

> **Options**
>
> **--yes**
>
> Skip confirmation.
>
> **--revision**
>
> Alembic revision (default: head).
>
> **--dry-run**
>
> Show migrations without applying.

### `prefect server database downgrade`

```command theme={null}
prefect server database downgrade [OPTIONS]
```

> [!NOTE]
>
> Downgrade the Prefect database.

> **Options**
>
> **--yes**
>
> Skip confirmation.
>
> **--revision**
>
> Alembic revision (default: -1).
>
> **--dry-run**
>
> Show migrations without applying.

### `prefect server database revision`

```command theme={null}
prefect server database revision [OPTIONS]
```

> [!NOTE]
>
> Create a new migration for the Prefect database.

> **Options**
>
> **--message**
>
> Migration message.
>
> **--autogenerate**
>
> Auto-generate from models.

### `prefect server database stamp`

```command theme={null}
prefect server database stamp [OPTIONS] REVISION
```

> [!NOTE]
>
> Stamp the revision table with the given revision; don't run any migrations.

> **Arguments**
>
> **REVISION** `string` *required*

## `prefect server services`

```command theme={null}
prefect server services [OPTIONS] COMMAND [ARGS]...
```

> [!NOTE]
>
> Interact with server loop services.

### `prefect server services ls`

```command theme={null}
prefect server services ls [OPTIONS]
```

> [!NOTE]
>
> List all available services and their status.

> **Options**
>
> **--output**
>
> Specify an output format. Currently supports: json

### `prefect server services list`

```command theme={null}
prefect server services list [OPTIONS]
```

> [!NOTE]
>
> List all available services and their status.

> **Options**
>
> **--output**
>
> Specify an output format. Currently supports: json

### `prefect server services start`

```command theme={null}
prefect server services start [OPTIONS]
```

> [!NOTE]
>
> Start all enabled Prefect services in one process.

> **Options**
>
> **--background**
>
> Run the services in the background.

### `prefect server services enable`

```command theme={null}
prefect server services enable [OPTIONS]
```

> [!NOTE]
>
> Start all enabled Prefect services in one process.

> **Options**
>
> **--background**
>
> Run the services in the background.

### `prefect server services stop`

```command theme={null}
prefect server services stop [OPTIONS]
```

> [!NOTE]
>
> Stop any background Prefect services that were started.

### `prefect server services disable`

```command theme={null}
prefect server services disable [OPTIONS]
```

> [!NOTE]
>
> Stop any background Prefect services that were started.

### `prefect server services manager`

```command theme={null}
prefect server services manager [OPTIONS]
```

> [!NOTE]
>
> Internal entrypoint for background services.

## `prefect server start`

```command theme={null}
prefect server start [OPTIONS]
```

> [!NOTE]
>
> Start a Prefect server instance.

> **Options**
>
> **--host**
>
> Server host address. \[from PREFECT\_SERVER\_API\_HOST]
>
> **--port**
>
> Server port. \[from PREFECT\_SERVER\_API\_PORT]
>
> **--keep-alive-timeout**
>
> Keep-alive timeout seconds. \[from PREFECT\_SERVER\_API\_KEEPALIVE\_TIMEOUT]
>
> **--log-level**
>
> Server logging level. \[from PREFECT\_SERVER\_LOGGING\_LEVEL]
>
> **--scheduler**
>
> Enable scheduler. \[from PREFECT\_SERVER\_SERVICES\_SCHEDULER\_ENABLED]
>
> **--analytics-on**
>
> Toggle analytics. \[from PREFECT\_SERVER\_ANALYTICS\_ENABLED]
>
> **--late-runs**
>
> Enable late runs. \[from PREFECT\_SERVER\_SERVICES\_LATE\_RUNS\_ENABLED]
>
> **--ui**
>
> Enable the UI. \[from PREFECT\_SERVER\_UI\_ENABLED]
>
> **--no-services**
>
> Only run the webserver API and UI.
>
> **--background**
>
> Run in the background.
>
> **--workers**
>
> Number of worker processes.

## `prefect server status`

```command theme={null}
prefect server status [OPTIONS]
```

> [!NOTE]
>
> Check the status of the Prefect server.

> **Options**
>
> **--wait**
>
> Wait for the server to become available before returning.
>
> **--timeout**
>
> Maximum number of seconds to wait when using --wait. A value of 0 means wait indefinitely.
>
> **--output**
>
> Specify an output format. Currently supports: json

## `prefect server stop`

```command theme={null}
prefect server stop [OPTIONS]
```

> [!NOTE]
>
> Stop a Prefect server instance running in the background.
