---
title: Running a V1 Node
slug: running-a-v1-node
docTags: 
createdAt: 2022-07-29T17:00:02.000Z
---

## Supported Platforms

We support running a full node on Ubuntu 22.04 LTS.

## Minimum hardware requirements

- 8 cores of CPU and 16 gigabytes of memory (RAM).
- fixed size hard disk, 2TB or elastic volumes, 2TB.

## Software prerequisites

- install docker

[https://docs.docker.com/engine/install/#server](https://docs.docker.com/engine/install/#server)

- install docker compose-plugin

[https://docs.docker.com/compose/install/compose-plugin/#installing-compose-on-linux-systems](https://docs.docker.com/compose/install/compose-plugin/#installing-compose-on-linux-systems)

## Storing the node data in a different directory (optional)

The default node data directory(`./node-data`) is in the same directory as the `docker-compose.yml` file. Mount a new host folder, replace the path `./node-data` in `docker-compose.yml` with the new directory.

## Running a full node

- Build docker image locally(optional)

```shell
make build 
```

- Run node(If the docker image does not exist, pull the image from Docker Hub automaticlly.)

```shell
docker-compose up -d
```

- Stop the full node

```shell
docker-compose down
```

- Download the node data archive file(recommend).&#x20;
- Note that this process may take several hours due to the size of the blockchain.&#x20;

```shell
nohup sudo curl -SL https://caduceus.foundation/downloads/node-data.tar.gz -O ./node-data.tar.gz &
```

```shell
sudo tar -xzvf ./node-data.tar.gz
```

```shell
docker-compose down
```

```shell
sudo cp -r ./node-data/node0 ./node-data/node0.bak
```

```shell
sudo mv ./data/*.db ./node-data/node0/data/
```

```shell
docker-compose up -d
```

## Checking the last synced block

If you change the default data directory for node, replace the path "./node-data" with your new directory. or run the command in the same directory as the docker-compose.yml file. You maybe need to wait about serval minutes, and then the node will sync blocks and generate committed logs.

```shell
tail ./node-data/node0/stdout-cmpd.txt -f | grep Committed
```

## Restarting a node

Sometimes a node can get stuck. You can restart the node by finding the docker container name by doing&#x20;

```shell
docker ps
```

And then copying the name (in our case the name was `cmp_mainnet_node` and doing:

```shell
docker restart cmp_mainnet_node
```

## Testing the RPC

```curl
curl -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", true],"id":1}' http://127.0.0.1:26658

```

