Citrea Node Setup

Servers :

Contabo : https://bit.ly/contabourl InterServer : https://bit.ly/interserverurl Digital Ocean : https://bit.ly/4cKNFco

Hardware Requirements

  • 8 GB Ram

  • 256 GB SSD (NVMe recommended)

  • 4 core CPU

  • 25+ Mbps network connection

satisfies the minimum requirements to run a Citrea node.

Update :

sudo apt update -y && sudo apt upgrade -y

Install Curl :

sudo apt install -y curl

Install Make :

sudo apt-get -y install make

Install Rust - Cargo :

curl https://sh.rustup.rs -sSf | sh

Type : 1

source "$HOME/.cargo/env"
rustup update
rustup default stable

Install Clang :

sudo apt-get update
sudo apt install make clang pkg-config libssl-dev -y

Install Docker :

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
docker version

Install Docker-Compose :

VER=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep tag_name | cut -d '"' -f 4)
curl -L "https://github.com/docker/compose/releases/download/"$VER"/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version

Docker Permission to User :

sudo groupadd docker
sudo usermod -aG docker $USER

Setup Bitcoin Signet :

git clone https://github.com/chainwayxyz/bitcoin_signet && cd bitcoin_signet

Build Signet Container :

docker build -t bitcoin-signet .

Run Signet Container :

docker run -d --name bitcoin-signet-client-instance \
--env MINERENABLED=0 \
--env SIGNETCHALLENGE=512102653734c749d5f7227d9576b3305574fd3b0efdeaa64f3d500f121bf235f0a43151ae \
--env BITCOIN_DATA=/mnt/task/btc-data \
--env ADDNODE=signet.citrea.xyz:38333 -p 38332:38332 \
bitcoin-signet

Clone Source Code :

git clone https://github.com/chainwayxyz/citrea --branch=v0.4.1 && cd citrea

Edit rollup config file :

nano configs/devnet/rollup_config.toml
# DA Config
[da] 
node_url = "http://0.0.0.0:38332"
node_username = "bitcoin"                                     
node_password = "bitcoin"
network = "signet"

# Full Node RPC - The host & port here are the host & port that your full node RPC uses, do not change if you're not sure how it works.
[rpc] 
bind_host = "127.0.0.1"
bind_port = 12345

[runner]
sequencer_client_url = "https://rpc.devnet.citrea.xyz"
include_tx_body = false # Setting false to save space by not saving Soft Batches locally. 

Build Project :

SKIP_GUEST_BUILD=1 make build-release

Screen :

apt install screen
screen -S citrea

RUN :

./target/release/citrea --da-layer bitcoin --rollup-config-path configs/devnet/rollup_config.toml --genesis-paths configs/devnet/genesis-files

Last updated