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

# stackkit service

> 控制当前 StackKits 计划声明的服务

控制当前 StackKits 计划声明的服务。

```bash theme={null}
stackkit service [flags]
```

子命令：[`stackkit service logs`](#stackkit-service-logs), [`stackkit service manager`](#stackkit-service-manager), [`stackkit service restart`](#stackkit-service-restart), [`stackkit service start`](#stackkit-service-start), [`stackkit service stop`](#stackkit-service-stop)

## stackkit service logs

读取有界的、已脱敏的服务日志。

```bash theme={null}
stackkit service logs <service-key> [flags]
```

| 标志 | 类型 | 默认值 | 说明 |
| - | - | - | - |
| `--cursor` | string | — | 来自上一次结果的不透明游标 |
| `--json` | bool | — | 以 JSON 写出带版本的服务日志页 |
| `--tail` | int | `100` | 要返回的已脱敏日志条目数（1..200） |

**示例**

```bash theme={null}
# Read the last 50 redacted log entries of the TinyAuth login gateway
stackkit service logs auth --tail 50

# Read PocketID logs as JSON
stackkit service logs id --json

# Read the next page with the cursor the previous JSON result returned
stackkit service logs id --json --cursor <cursor>
```

## stackkit service manager

在 Compose 与 Komodo 之间转移已存在的、由节点拥有的工作负载。

```bash theme={null}
stackkit service manager <workload-ref> [flags]
```

| 标志 | 类型 | 默认值 | 说明 |
| - | - | - | - |
| `--json` | bool | — | 以 JSON 写出带版本的 manager 结果 |
| `--owner-approve` | bool | — | 显式批准与 Owner 绑定的 manager 转移 |
| `--resume` | string | — | 继续确切的待处理交接操作 |
| `--status` | bool | — | 只读取持久化的 manager 和交接结果，不做任何变更 |
| `--to` | string | — | 目标 manager：standalone-compose 或 komodo |

**示例**

```bash theme={null}
stackkit service manager media --to standalone-compose --owner-approve
stackkit service manager media --to komodo --owner-approve
stackkit service manager media --to komodo --resume handover-<operation-id> --owner-approve
```

## stackkit service restart

重启一个受管服务。

```bash theme={null}
stackkit service restart <service-key> [flags]
```

| 标志 | 类型 | 默认值 | 说明 |
| - | - | - | - |
| `--json` | bool | — | 以 JSON 写出带版本的服务操作结果 |
| `--owner-approve` | bool | — | 显式批准与 Owner 绑定的服务变更 |

**示例**

```bash theme={null}
# Restart the PocketID identity service
stackkit service restart id --owner-approve

# Restart the TinyAuth login gateway and print the result as JSON
stackkit service restart auth --owner-approve --json
```

## stackkit service start

启动一个受管服务。

```bash theme={null}
stackkit service start <service-key> [flags]
```

| 标志 | 类型 | 默认值 | 说明 |
| - | - | - | - |
| `--json` | bool | — | 以 JSON 写出带版本的服务操作结果 |
| `--owner-approve` | bool | — | 显式批准与 Owner 绑定的服务变更 |

**示例**

```bash theme={null}
# Start a stopped service again
stackkit service start coolify --owner-approve
```

## stackkit service stop

停止一个受管服务。

```bash theme={null}
stackkit service stop <service-key> [flags]
```

| 标志 | 类型 | 默认值 | 说明 |
| - | - | - | - |
| `--json` | bool | — | 以 JSON 写出带版本的服务操作结果 |
| `--owner-approve` | bool | — | 显式批准与 Owner 绑定的服务变更 |

**示例**

```bash theme={null}
# Stop a non-critical service; base, id and auth cannot be stopped
stackkit service stop coolify --owner-approve
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.