# 运行区块浏览器

{% tabs %}
{% tab title="本地服务器设置" %}

```bash
git clone --branch local https://github.com/rome-labs/romescout.git
```

{% endtab %}

{% tab title="远程服务器设置" %}

```bash
git clone --branch v1.0.1 https://github.com/rome-labs/romescout.git
```

{% endtab %}
{% endtabs %}

## 导航到 docker-compose 目录 <a href="#navigate-to-docker-compose-directory" id="navigate-to-docker-compose-directory"></a>

```bash
cd romescout/docker-compose
```

## 设置环境变量

```bash
export FRONTEND_DOCKER_TAG=v1.36.2
export DOCKER_TAG=6.9.2
export STATS_DOCKER_TAG=v2.2.3
export VISUALIZER_DOCKER_TAG=v0.2.1
export SIG_PROVIDER_DOCKER_TAG=v1.1.1
export SMART_CONTRACT_VERIFIER_DOCKER_TAG=v1.9.2
export USER_OPS_INDEXER_DOCKER_TAG=v1.3.0
```

## 复制 Nginx 证书

如果在远程服务器上设置，请将 nginx 证书复制到您的本地目录。如果在本地设置，则跳过此步骤。

**注意：将下面的文件路径替换为您证书的实际位置。**

<pre class="language-bash"><code class="lang-bash">mkdir -p ./nginx/ssl
<strong>sudo cp /etc/letsencrypt/live/caesar.internal.romeprotocol.xyz/fullchain.pem ./nginx/ssl/
</strong><strong>sudo cp /etc/letsencrypt/live/caesar.internal.romeprotocol.xyz/privkey.pem ./nginx/ssl/
</strong></code></pre>

## 更新域名

如果在远程服务器上运行您的 L2，请替换下面两个文件中的域名。

* `services/nginx1.yml`
* `envs/common-frontend1.env`&#x20;

**注意：如果本地运行，请跳过修改域名。**

## 更新命名与品牌 <a href="#update-configuration-to-use-your-naming-and-branding" id="update-configuration-to-use-your-naming-and-branding"></a>

更新前端的环境文件以使用您的 L2 详细信息，例如链 ID、名称、货币、徽标和颜色。

{% tabs %}
{% tab title="本地服务器设置" %}
编辑 `envs/common-frontend.env`&#x20;
{% endtab %}

{% tab title="远程服务器设置" %}
编辑 `envs/common-frontend1.env`&#x20;
{% endtab %}
{% endtabs %}

```bash
NEXT_PUBLIC_NETWORK_NAME=Caesar
NEXT_PUBLIC_NETWORK_SHORT_NAME=Caesar
NEXT_PUBLIC_NETWORK_ID=98989897
NEXT_PUBLIC_NETWORK_CURRENCY_NAME=RSOL
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=RSOL

NEXT_PUBLIC_NETWORK_LOGO=http://rome-public-assets.s3.us-east-1.amazonaws.com/rome-banner.png
NEXT_PUBLIC_NETWORK_ICON=http://rome-public-assets.s3.us-east-1.amazonaws.com/rome-logo.png
NEXT_PUBLIC_HOMEPAGE_PLATE_TEXT_COLOR=white
NEXT_PUBLIC_HOMEPAGE_PLATE_BACKGROUND=#5E0A60
```

## 运行 docker 容器

删除旧数据，首次运行请跳过。

```bash
sudo rm -rf services/blockscout-db-data
sudo rm -rf services/stats-db-data
```

在本地构建并运行 docker 容器。

```bash
docker compose up -d
```

访问 Rome Scout 浏览器：

{% tabs %}
{% tab title="本地服务器设置" %}
[http://localhost:1000](http://localhost:1000/)
{% endtab %}

{% tab title="远程服务器设置" %}
[https://caesar.internal.romeprotocol.xyz:1000（替换为您的域名）](https://docs.rome.builders/zh/legacy/rome-l2-setup/setup-your-l2/https:/caesar.internal.romeprotocol.xyz:1000（替换为您的域名）)
{% endtab %}
{% endtabs %}

## Solana 浏览器

可以访问 Solana 区块浏览器： <https://explorer.solana.com/?cluster=devnet>

无需设置。


---

# 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/run-block-explorer.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.
