> For the complete documentation index, see [llms.txt](https://docs.chiliz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chiliz.com/ko/gaebal/gibon/chiliz-chain-yeongyeol/node-silhaeng.md).

# Chiliz Chain 노드 실행

직접 Chiliz Chain 노드를 실행하면 제어권, 프라이버시, 안정성이 향상되지만, 기존 RPC 엔드포인트를 사용하는 것보다 더 많은 기술 전문 지식과 리소스가 필요합니다.

이를 통해 Chiliz Chain의 스마트 컨트랙트와 트랜잭션을 처리하고 통신할 수 있습니다.

{% hint style="info" %}
검증자 전용 노드 실행 문서 페이지도 있습니다: [검증자 노드 운영](/ko/baeuggi/geomjeungja/geomjeungja-node-unyeong.md)
{% endhint %}

## **사전 요구사항**

Chiliz Chain 노드를 실행하려면 머신 또는 서버에 [Docker](https://www.docker.com/)가 설치되어 있어야 합니다. 진행하기 전에 [Docker 설치](https://docs.docker.com/engine/install/)를 완료해 주세요.

### **사전 빌드된 Docker 이미지**

[Docker Hub의 Chiliz Chain 2.0 공개 저장소](https://hub.docker.com/repository/docker/chilizchain/ccv2-geth)에서 사전 빌드된 Docker 이미지를 사용할 수 있습니다.

## **노드 실행 및 동기화 시작**

Chiliz Chain 노드를 실행할 때 권장되는 시작점은 마운트된 데이터 볼륨을 사용하는 것입니다. 이 방법으로 Docker 컨테이너를 재생성하면 데이터가 디렉토리에 저장되어 쉽게 재사용하거나 다른 노드로 복제할 수 있습니다.

### **Step 1: 디렉토리 생성**

디렉토리를 생성하고 다음 명령의 `-v` 파라미터에 해당 경로를 지정합니다.

```bash
docker run \
-v $(pwd)/my-datadir:/datadir \
--name ccv2-node \
-p 8545:8545 \
-p 8546:8546 \
chilizchain/ccv2-geth:latest \
--chiliz # Chiliz Mainnet의 경우. Spicy Testnet은 --spicy를 사용합니다.
--datadir=/datadir \
--ipcdisable
```

### **Step 2: 클라이언트 연결**

노드에 클라이언트를 연결하려면 `--http` 및/또는 `--ws` 파라미터 그룹을 지정하여 RPC HTTP 및/또는 WebSocket 서버를 활성화해야 합니다.

예시:

```bash
docker run \
-v $(pwd)/my-datadir:/datadir \
--name ccv2-node \
-p 8545:8545 \
-p 8546:8546 \
chilizchain/ccv2-geth:latest \
--chiliz \ # Chiliz Mainnet의 경우. Spicy Testnet은 --spicy를 사용합니다.
--datadir=/datadir \
--ipcdisable \
--http \
--http.addr=0.0.0.0 \
--http.api=eth,net,web3,debug,txpool \
--http.port=8545 \
--http.corsdomain="*" \
--http.vhosts="*" \
--ws \
--ws.addr=0.0.0.0 \
--ws.api=eth,net,web3,debug,txpool \
--ws.port=8546 \
--ws.origins="*" \
```

{% hint style="warning" %}
**주의**

보안상의 이유로 다음 파라미터에 적절한 값을 설정해야 합니다.

`--http.corsdomain`

`--http.vhosts`

`--ws.origins`
{% endhint %}

## **노드 유지보수 정보**

### 디버깅 시 로그 상세도 변경

노드 또는 연결된 클라이언트를 디버깅해야 하는 경우 노드의 상세도(verbosity)를 높이고 싶을 수 있습니다.

`--verbosity` 파라미터를 사용하여 설정할 수 있습니다. 다음 옵션을 사용할 수 있습니다(기본값: 3):

* 0=silent
* 1=error
* 2=warn
* 3=info
* 4=debug
* 5=detail

### 노드 중지 및 정리

위의 명령 중 하나로 노드를 실행했다면 노드 프로세스가 포그라운드에서 계속 실행됩니다. 이 프로세스를 중지하려면 CTRL+C를 누르세요.

다음 명령을 실행하여 Docker 컨테이너를 제거합니다.

```bash
docker rm ccv2-node
```

### **디렉토리 삭제**

다음 명령을 실행하여 디렉토리를 삭제합니다.

```bash
rm my-datadir
```

## 노드 업데이트

Chiliz Chain 팀은 Chiliz Chain을 안전하고 최신 상태로 유지하기 위해 노력하며, Dragon8 하드포크와 같이 매년 몇 차례 하드포크를 진행할 예정입니다.

하드포크가 발생하면 노드가 네트워크와 동기화되지 않을 수 있습니다. 따라서 공지사항을 주의 깊게 확인하고 노드를 업데이트하는 것이 중요합니다.

노드를 최신 상태로 유지하려면 다음 단계를 따르세요.

**Docker를 사용하는 경우:**

1. 데이터베이스가 포함된 볼륨을 보존하면서 기존 Docker 컨테이너를 중지하고 삭제합니다.
2. [최신 사전 빌드 Docker 이미지](https://hub.docker.com/repository/docker/chilizchain/ccv2-geth)를 사용하여 노드를 실행합니다.

**자체 바이너리를 사용하는 경우:**

1. [GitHub 저장소에서 최신 릴리즈를 다운로드](https://github.com/chiliz-chain/v2/releases)합니다.
2. 사용하는 툴셋으로 빌드합니다.

## 아카이브 노드 실행

노드를 아카이브 모드로 실행하려면 위의 `ccv2-geth` 호출에 다음 2가지 파라미터를 추가합니다.

```bash
--syncmode=full \
--gcmode=archive \
```

## 스냅샷 또는 백업으로 Chiliz Chain 노드 실행

Chiliz Chain 노드의 동기화 속도를 높이려면 스냅샷(블록체인 데이터 디렉토리 `datadir`의 최근 복사본 또는 아카이브/백업)을 활용할 수 있습니다. 이 방법으로 노드를 처음부터 동기화하는 것보다 훨씬 빠르게 운영을 시작할 수 있습니다.

{% hint style="info" %}
새 노드 설정 시 스냅샷을 사용하는 것을 권장합니다.\
기존 datadir에 스냅샷을 덮어쓰면 데이터 불일치가 발생할 수 있습니다.
{% endhint %}

### 사용 가능한 스냅샷

각 네트워크에는 전용 스냅샷이 있습니다.

* Spicy Testnet: [chaindata\_snapshot.tar.gz](https://s3.eu-west-3.amazonaws.com/spicy-snapshots.chiliz.com/chaindata_snapshot.tar.gz)
* Chiliz Chain Mainnet: [chaindata\_snapshot.tar.gz](https://s3.eu-west-3.amazonaws.com/snapshots.chiliz.com/chaindata_snapshot.tar.gz)

{% hint style="info" %}
**기존 데이터 삭제**

기존 노드에 스냅샷을 적용하려면 노드를 재시작하기 전에 datadir 내의 다음 디렉토리 및 파일을 삭제해야 합니다.

```bash
rm -rf blobpool transactions.rlp LOCK lightchaindata triecache
```

이 단계를 통해 잔여 데이터로 인한 잠재적 충돌을 방지할 수 있습니다.
{% endhint %}

### 스냅샷으로 노드 실행하는 단계:

1. 데이터 디렉토리 생성:

```bash
mkdir -p ~/chiliz-node/my-datadir
```

2. 스냅샷 다운로드:

필요한 경우 URL을 Mainnet 스냅샷 URL로 교체하세요.

{% code overflow="wrap" lineNumbers="true" %}

```bash
cd ~/chiliz-node/my-datadir
nohup curl -L --retry 5 -o chaindata.tar.gz https://s3.eu-west-3.amazonaws.com/spicy-snapshots.chiliz.com/chaindata_snapshot.tar.gz > download.log 2>&1 &
```

{% endcode %}

{% hint style="info" %}
다운로드 진행 상황을 모니터링하려면:\
`tail -f download.log`
{% endhint %}

3. 스냅샷 압축 해제:

```bash
tar -xzf chaindata.tar.gz
```

4. Chiliz Chain 노드 실행:

{% code lineNumbers="true" %}

```bash
docker run \
  -v ~/chiliz-node/my-datadir:/datadir \
  --name ccv2-node \
  -p 8545:8545 \
  -p 8546:8546 \
  chilizchain/ccv2-geth:latest \
  --spicy \  # Mainnet은 --chiliz 사용
  --datadir=/datadir \
  --ipcdisable \
  --http \
  --http.addr=0.0.0.0 \
  --http.api=eth,net,web3,debug,txpool \
  --http.port=8545 \
  --http.corsdomain="*" \
  --http.vhosts="*" \
  --ws \
  --ws.addr=0.0.0.0 \
  --ws.api=eth,net,web3,debug,txpool \
  --ws.port=8546 \
  --ws.origins="*"
```

{% endcode %}

## 추가 Geth 정보

[명령줄 옵션](https://geth.ethereum.org/docs/fundamentals/command-line-options)에서 사용 가능한 전체 Geth 파라미터 목록을 확인하세요.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.chiliz.com/ko/gaebal/gibon/chiliz-chain-yeongyeol/node-silhaeng.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
