# VPS 云主机

{% hint style="warning" %}
**⚠️ 重要提示 - 在开始部署之前，请仔细阅读以下注意事项：**

🛜网络提醒：

建议Nat1 类型的网络。若是Nat3、Nat4网络，请务必开启ipv6。\
\
🛑 **安全风险提醒**

* 此部署方式会获取您VPS的最高权限(Root)，可能影响您对VPS的控制权。
* 资源直接在您的VPS上运行，可能影响系统配置，在运行过程中，<mark style="color:red;">**系统密码可能会被修改**</mark>
* 仅推荐在完全可控的VPS上使用，如有安全顾虑，请选择其他部署方案。

#### 👤 适用用户

* 熟悉Linux命令行操作的用户
* 理解每个操作步骤的作用
* 了解Root权限的影响范围
* ⚠️ 如果您不熟悉以上内容，强烈建议寻求技术人员协助。
  {% endhint %}

{% hint style="success" %}
高收益攻略：

1. 新上机的节点有3-7天部署期，请耐心等待，之后收益将逐渐稳定。
2. 请保持设备24小时在线，尤其是晚高峰（18:00-24:00）时段。
3. 请确保节点的Agent状态和服务状态均为正常，若出现异常请及时联系客服。

[<mark style="color:blue;">→点击查看更多攻略</mark>](https://titannet.gitbook.io/titan-network-cn/4-ce-jia-li-le-ce-shi-wang/chang-jian-wen-ti/xin-jie-dian-shang-ji-gong-le-cong-cheng-gong-yun-xing-dao-shou-yi-ti-sheng)
{% endhint %}

## 环境要求

* 可访问互联网的VPS服务器
* 系统管理员(Root)权限
* 确保系统已安装 wget 和 unzip 命令
  * 如果没有安装，您需要先运行: `sudo apt-get install wget unzip`（Ubuntu/Debian系统）
  * 或运行: `sudo yum install wget unzip`（CentOS系统）

## 部署步骤

### 1. 下载并解压安装包

```bash
# 进入终端后，依次输入以下命令（每行命令输入完后按回车键）：

# 下载安装包
wget https://pcdn.titannet.io/test4/bin/agent-linux.zip
# 如果下载失败，请检查网络连接是否正常

# 创建安装目录（如果提示权限不足，需要在命令前加上 sudo）
mkdir -p /opt/titanagent

# 解压安装包到指定目录
unzip agent-linux.zip -d /opt/titanagent
# 如果提示 unzip 命令未找到，请先安装 unzip
```

⚠️ 注意：

* 每条命令都需要等待执行完成后，再执行下一条
* 如果看到类似 "Permission denied" 的提示，需要在命令前加上 sudo
* 确保每个命令都执行成功，如果有错误提示，请不要继续执行后续步骤

### [2.获取Key](https://titannet.gitbook.io/titan-network-cn/4-ce-jia-li-le-ce-shi-wang/ru-he-huo-qu-key)

### 3. 启动服务

{% code overflow="wrap" %}

```bash
# 进入安装目录
cd /opt/titanagent

# 运行 Agent（注意替换下面两处内容）
./agent --working-dir=/opt/titanagent --server-url=https://test4-api.titannet.io --channel=vps --key=您复制的密钥
```

{% endcode %}

### 常见问题解决

<details>

<summary>如果提示 "command not found"</summary>

* 确认是否在正确的目录下运行命令
* 使用 `ls` 命令查看当前目录下的文件
* 确保文件名输入正确，注意大小写

</details>

<details>

<summary>如果提示 "Permission denied"</summary>

* 在命令前加上 `sudo`，例如：`sudo ./agent ...`
* 系统会要求输入密码，这是正常的
* 输入密码时不会显示字符，输完直接按回车即可

</details>

<details>

<summary>如果提示网络错误：</summary>

* 检查电脑是否连接到网络
* 尝试访问其他网站，确认网络正常
* 如果使用代理，请检查代理设置

</details>

<details>

<summary>如果key提示错误：</summary>

* 检查key是否完整复制
* 确认key中没有多余的空格

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://titannet.gitbook.io/titan-network-cn/4-ce-jia-li-le-ce-shi-wang/titan-agent-an-zhuang-jiao-cheng/vps-yun-zhu-ji.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
