Lighthouse Cloud Server Operations
Manage Tencent Cloud Lighthouse instances via tccli CLI.
Your knowledge of tccli parameters and API limits may be outdated.
Always use tccli <service> <action> --help to verify parameters before execution.
Prerequisites
tccli --version
If not installed: pip install tccli
Credential Setup
| Method |
Security |
Expiry |
Recommendation |
| OAuth browser login |
High |
Temporary, expires in 2 hours |
Recommended |
| AK/SK key pair |
Low |
Permanent unless revoked |
Special cases only |
When the user has not chosen a method, default to OAuth.
OAuth Login (Recommended)
Use script/tccli-oauth-helper.sh for non-interactive OAuth login:
# Step 1: Check credential status
bash script/tccli-oauth-helper.sh --status
# Step 2: Generate authorization URL (if credentials are missing or expired)
bash script/tccli-oauth-helper.sh --get-url
# Step 3: User opens the URL in browser, completes login, and gets a base64 code
# Step 4: Complete login with the code
bash script/tccli-oauth-helper.sh --code "base64_code_from_browser"
# Step 5: Verify
tccli lighthouse DescribeRegions
Workflow:
- Run
--status to check existing credentials
- If expired/missing, run
--get-url — show the URL to user
- User opens URL → logs in → copies the base64 code from browser
- Run
--code with the base64 code to complete login
- Verify with
tccli lighthouse DescribeRegions
Notes:
- Credentials are temporary (expires in ~2 hours)
- State is valid for 10 minutes after
--get-url
- Do NOT use
tccli sts GetCallerIdentity to verify — it does not support OAuth credentials
AK/SK Setup
Only if the user explicitly provides SecretId and SecretKey:
tccli configure set secretId <SecretId>
tccli configure set secretKey <SecretKey>
tccli configure set region ap-guangzhou
Logout
tccli auth logout
Quick Reference
| Task |
Command |
| List instances |
tccli lighthouse DescribeInstances --region <region> |
| Instance details |
tccli lighthouse DescribeInstances --region <region> --InstanceIds '["lhins-xxx"]' |
| Firewall rules |
tccli lighthouse DescribeFirewallRules --region <region> --InstanceId lhins-xxx |
| Monitoring data |
tccli monitor GetMonitorData --Namespace QCE/LIGHT_HOUSE ... |
| Run remote command |
tccli tat RunCommand --region <region> --InstanceIds '["lhins-xxx"]' --Content "..." |
| Snapshots |
tccli lighthouse DescribeSnapshots --region <region> |
| Traffic packages |
tccli lighthouse DescribeInstancesTrafficPackages --region <region> --InstanceIds '["lhins-xxx"]' |
| Available regions |
tccli lighthouse DescribeRegions |
| Help for any action |
tccli lighthouse <Action> --help |
| Get current instance ID |
bash script/whoami.sh or bash script/whoami.sh --id |
Scenario Routing
Read the corresponding reference file before executing:
User wants to...
├─ Query / start / stop / reboot instances -> references/instance-management.md
├─ Reset password / view blueprints -> references/instance-management.md
├─ Deploy applications / verify deployment -> references/application-deployment.md
├─ View CPU / memory / bandwidth metrics -> references/monitoring-alerting.md
├─ Set up alarm policies -> references/monitoring-alerting.md
├─ Manage firewall rules -> references/firewall-management.md
├─ Execute commands on instance -> references/remote-command-tat.md
├─ Create / restore snapshots -> references/snapshot-blueprint.md
├─ Create custom images -> references/snapshot-blueprint.md
├─ Check traffic usage -> references/traffic-package.md
├─ Identify current instance (ID / IP) -> bash script/whoami.sh [--id | --ip]
└─ Other operations -> tccli lighthouse --help
Operation Safety
| Risk |
Operations |
Confirmation |
| High |
Delete instance, apply snapshot, delete snapshot/blueprint |
Double confirm, state irreversibility |
| Medium |
Stop/reboot instance, modify firewall, run commands |
Single confirm |
| Low |
Query, list, describe, help |
Execute directly |
Rules:
- Region is required for all operations except
DescribeRegions
- Query before modify — always
Describe first, never blind Create / Delete
- Use real IDs — get InstanceId from
DescribeInstances, never use placeholders
- Verify parameters — run
--help when unsure about parameter names or formats
- Lighthouse and CVM are separate products — do NOT mix their APIs
- Create means new — when user asks to "create" / "deploy" / "set up" something (e.g., "create a server", "deploy an app"), create a NEW instance by default. Do NOT use existing instances unless the user explicitly specifies an existing instance ID.
Common Regions
| Code |
Location |
| ap-beijing |
Beijing |
| ap-shanghai |
Shanghai |
| ap-guangzhou |
Guangzhou |
| ap-chengdu |
Chengdu |
| ap-chongqing |
Chongqing |
| ap-nanjing |
Nanjing |
| ap-hongkong |
Hong Kong |
Run tccli lighthouse DescribeRegions for the full list.
Channel Output Compatibility
Many messaging channels (WeChat, 企业微信, Slack, Teams, Telegram, etc.) apply Markdown rendering or Markdown-to-plain-text conversion before displaying messages. Common transformations that silently corrupt output:
- Paired underscores stripped:
_xxx_ → xxx (italic markers)
- Paired asterisks stripped:
*xxx* → xxx (bold/italic markers)
- Backslash escapes consumed or displayed literally
- URLs with special characters mangled or truncated
This corrupts:
- URLs containing underscores (e.g.,
redirect_url, app_id in OAuth links)
- CLI output with underscored identifiers (e.g.,
instance_name, secret_id)
- Script output containing underscored fields or special characters
Rules for all channel output:
- URLs: Replace
_ (underscore) with %5F in any URL shown to the user. For example, the OAuth authorization URL parameters like redirect_url, app_id must use %5F instead of _.
- CLI / script output: Always wrap output in code blocks (triple backticks) to prevent Markdown interpretation. Prefer code blocks for any multi-line output containing underscores, asterisks, or other Markdown-sensitive characters.
- General text: Avoid bare underscores and asterisks in plain text. Use backtick-wrapped inline code for any identifier containing these characters (e.g.,
instance_name, secret_id).
- Links: When providing clickable links, ensure the full URL is inside a code block or use URL-encoding for special characters. Do not rely on Markdown link syntax
[text](url) — the URL may be altered by the channel.
Error Handling
- Check credentials:
tccli lighthouse DescribeRegions
- Verify the region parameter
- Run
tccli lighthouse <Action> --help to confirm parameter format
- Check instance status:
tccli lighthouse DescribeInstances --region <region>
1---2name: tencentcloud-lighthouse-skill3description: Load when: user mentions Lighthouse, 轻量应用服务器, 轻量服务器, or asks to check/create/manage/deploy Lighthouse instances, deploy applications to Lighthouse, manage Lighthouse firewall rules, reset Lighthouse password, view Lighthouse snapshots/images/traffic, monitor Lighthouse metrics, run commands on Lighthouse via TAT, or asks to get/identify the current instance ID. Trigger phrases: "查看轻量服务器", "Lighthouse实例", "轻量应用服务器", "部署应用", "部署程序", "部署到Lighthouse", "管理防火墙规则", "重置密码", "查看快照", "查看流量包", "获取实例ID", "查看实例ID", "当前实例", "实例IP", "check Lighthouse", "create Lighthouse", "deploy app", "deploy application", "Lighthouse firewall", "Lighthouse snapshot", "instance ID", "whoami". NOT for CVM, CBS, VPC, or other non-Lighthouse products.4---56# Lighthouse Cloud Server Operations78Manage Tencent Cloud Lighthouse instances via tccli CLI.910Your knowledge of tccli parameters and API limits may be outdated.11**Always use `tccli <service> <action> --help` to verify parameters before execution.**1213## Prerequisites1415```bash16tccli --version17```1819If not installed: `pip install tccli`2021## Credential Setup2223| Method | Security | Expiry | Recommendation |24|--------|----------|--------|----------------|25| OAuth browser login | High | Temporary, expires in 2 hours | Recommended |26| AK/SK key pair | Low | Permanent unless revoked | Special cases only |2728When the user has not chosen a method, default to OAuth.2930### OAuth Login (Recommended)3132Use `script/tccli-oauth-helper.sh` for non-interactive OAuth login:3334```bash35# Step 1: Check credential status36bash script/tccli-oauth-helper.sh --status3738# Step 2: Generate authorization URL (if credentials are missing or expired)39bash script/tccli-oauth-helper.sh --get-url4041# Step 3: User opens the URL in browser, completes login, and gets a base64 code4243# Step 4: Complete login with the code44bash script/tccli-oauth-helper.sh --code "base64_code_from_browser"4546# Step 5: Verify47tccli lighthouse DescribeRegions48```4950**Workflow:**511. Run `--status` to check existing credentials522. If expired/missing, run `--get-url` — show the URL to user533. User opens URL → logs in → copies the base64 code from browser544. Run `--code` with the base64 code to complete login555. Verify with `tccli lighthouse DescribeRegions`5657**Notes:**58- Credentials are temporary (expires in ~2 hours)59- State is valid for 10 minutes after `--get-url`60- Do NOT use `tccli sts GetCallerIdentity` to verify — it does not support OAuth credentials6162### AK/SK Setup6364Only if the user explicitly provides SecretId and SecretKey:6566```bash67tccli configure set secretId <SecretId>68tccli configure set secretKey <SecretKey>69tccli configure set region ap-guangzhou70```7172### Logout7374```bash75tccli auth logout76```7778## Quick Reference7980| Task | Command |81|------|---------|82| List instances | `tccli lighthouse DescribeInstances --region <region>` |83| Instance details | `tccli lighthouse DescribeInstances --region <region> --InstanceIds '["lhins-xxx"]'` |84| Firewall rules | `tccli lighthouse DescribeFirewallRules --region <region> --InstanceId lhins-xxx` |85| Monitoring data | `tccli monitor GetMonitorData --Namespace QCE/LIGHT_HOUSE ...` |86| Run remote command | `tccli tat RunCommand --region <region> --InstanceIds '["lhins-xxx"]' --Content "..."` |87| Snapshots | `tccli lighthouse DescribeSnapshots --region <region>` |88| Traffic packages | `tccli lighthouse DescribeInstancesTrafficPackages --region <region> --InstanceIds '["lhins-xxx"]'` |89| Available regions | `tccli lighthouse DescribeRegions` |90| Help for any action | `tccli lighthouse <Action> --help` |91| Get current instance ID | `bash script/whoami.sh` or `bash script/whoami.sh --id` |9293## Scenario Routing9495Read the corresponding reference file before executing:9697```98User wants to...99├─ Query / start / stop / reboot instances -> references/instance-management.md100├─ Reset password / view blueprints -> references/instance-management.md101├─ Deploy applications / verify deployment -> references/application-deployment.md102├─ View CPU / memory / bandwidth metrics -> references/monitoring-alerting.md103├─ Set up alarm policies -> references/monitoring-alerting.md104├─ Manage firewall rules -> references/firewall-management.md105├─ Execute commands on instance -> references/remote-command-tat.md106├─ Create / restore snapshots -> references/snapshot-blueprint.md107├─ Create custom images -> references/snapshot-blueprint.md108├─ Check traffic usage -> references/traffic-package.md109├─ Identify current instance (ID / IP) -> bash script/whoami.sh [--id | --ip]110└─ Other operations -> tccli lighthouse --help111```112113## Operation Safety114115| Risk | Operations | Confirmation |116|------|-----------|--------------|117| High | Delete instance, apply snapshot, delete snapshot/blueprint | Double confirm, state irreversibility |118| Medium | Stop/reboot instance, modify firewall, run commands | Single confirm |119| Low | Query, list, describe, help | Execute directly |120121Rules:1221. **Region is required** for all operations except `DescribeRegions`1232. **Query before modify** — always `Describe` first, never blind `Create` / `Delete`1243. **Use real IDs** — get InstanceId from `DescribeInstances`, never use placeholders1254. **Verify parameters** — run `--help` when unsure about parameter names or formats1265. Lighthouse and CVM are separate products — do NOT mix their APIs1276. **Create means new** — when user asks to "create" / "deploy" / "set up" something (e.g., "create a server", "deploy an app"), create a NEW instance by default. Do NOT use existing instances unless the user explicitly specifies an existing instance ID.128129## Common Regions130131| Code | Location |132|------|----------|133| ap-beijing | Beijing |134| ap-shanghai | Shanghai |135| ap-guangzhou | Guangzhou |136| ap-chengdu | Chengdu |137| ap-chongqing | Chongqing |138| ap-nanjing | Nanjing |139| ap-hongkong | Hong Kong |140141Run `tccli lighthouse DescribeRegions` for the full list.142143## Channel Output Compatibility144145Many messaging channels (WeChat, 企业微信, Slack, Teams, Telegram, etc.) apply Markdown rendering or Markdown-to-plain-text conversion before displaying messages. Common transformations that **silently corrupt output**:146147- **Paired underscores** stripped: `_xxx_` → `xxx` (italic markers)148- **Paired asterisks** stripped: `*xxx*` → `xxx` (bold/italic markers)149- **Backslash escapes** consumed or displayed literally150- **URLs** with special characters mangled or truncated151152This corrupts:153154- **URLs** containing underscores (e.g., `redirect_url`, `app_id` in OAuth links)155- **CLI output** with underscored identifiers (e.g., `instance_name`, `secret_id`)156- **Script output** containing underscored fields or special characters157158**Rules for all channel output:**1591601. **URLs**: Replace `_` (underscore) with `%5F` in any URL shown to the user. For example, the OAuth authorization URL parameters like `redirect_url`, `app_id` must use `%5F` instead of `_`.1612. **CLI / script output**: Always wrap output in code blocks (triple backticks) to prevent Markdown interpretation. Prefer code blocks for any multi-line output containing underscores, asterisks, or other Markdown-sensitive characters.1623. **General text**: Avoid bare underscores and asterisks in plain text. Use backtick-wrapped inline code for any identifier containing these characters (e.g., `instance_name`, `secret_id`).1634. **Links**: When providing clickable links, ensure the full URL is inside a code block or use URL-encoding for special characters. Do not rely on Markdown link syntax `[text](url)` — the URL may be altered by the channel.164165## Error Handling1661671. Check credentials: `tccli lighthouse DescribeRegions`1682. Verify the region parameter1693. Run `tccli lighthouse <Action> --help` to confirm parameter format1704. Check instance status: `tccli lighthouse DescribeInstances --region <region>`