# 设置远程服务器

## 机器规格

{% tabs %}
{% tab title="最低配置" %}
4 核，8GB 内存，1TB 存储，8MBit/秒网络带宽

Ubuntu，x86\_64，1 TB SSD
{% endtab %}

{% tab title="推荐配置" %}
8 核，16GB 内存，1 TB SSD，25 MBit/秒网络带宽

Ubuntu，x86\_64，1 TB SSD
{% endtab %}
{% endtabs %}

## 添加 Docker 的官方 GPG 密钥

```bash
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
```

## 将仓库添加到 APT 源

```bash
echo \\
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \\
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \\
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
```

```bash
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# 虽然不是必须的，但用于检查 Docker 是否正常工作
sudo docker run hello-world
```

## 安装 docker-compose

```bash
sudo snap install docker
sudo apt install -y docker-compose
```

## 安装 Solana

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
export PATH="/home/ubuntu/.local/share/solana/install/active_release/bin:$PATH"
```

## 更新 Docker 权限

```bash
sudo groupadd docker
sudo usermod -aG docker $USER
sudo chown root:docker /var/run/docker.sock
sudo chmod 660 /var/run/docker.sock
```

## 退出 SSH 会话

```bash
logout
```

这将使你退出 SSH 会话。需要这样做以重新应用权限更新。

## 打开下方的 EC2 端口

使用 EC2 安全组打开下方端口。

* HTTP：80
* HTTPS：443
* 存款 UI：3000
* 区块浏览器：1000


---

# 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://docs.rome.builders/zh/legacy/rome-l2-setup/setup-your-l2/prep-remote-server/setup-remote-server.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.
