Skip to content

sugarufc/tempo_node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

wordmark-black

Tempo Node (Moderato) — Ubuntu 24.04

This guide installs and runs a Tempo RPC node on Ubuntu 24.04 and keeps it stable with systemd.

Official docs: https://docs.tempo.xyz/


1) System requirements

Recommended (RPC node):

  • CPU: 16+ cores
  • RAM: 32+ GB
  • Disk: 1 TB NVMe+
  • Network: 1 Gbps+

Ports:

  • 30303 TCP/UDP — P2P (required)
  • 8545 TCP — HTTP RPC (optional/public)

2) Install Tempo (prebuilt binary)

curl -L https://tempo.xyz/install | bash
tempo --version

Find the binary path (used in systemd):

which tempo

3) Download the Moderato snapshot (IMPORTANT)

Always specify chain moderato:

tempo download --chain moderato --datadir /root/.local/share/reth/tempo

4) Create systemd service

Adjust ExecStart path if your which tempo is different.

sudo tee /etc/systemd/system/tempo.service > /dev/null <<'EOF'
[Unit]
Description=Tempo RPC Node
After=network.target
Wants=network.target

[Service]
Type=simple
User=root
Group=root
Environment=RUST_LOG=info
WorkingDirectory=/root
ExecStart=/root/.tempo/bin/tempo node \
  --chain moderato \
  --datadir /root/.local/share/reth/tempo \
  --follow \
  --port 30303 \
  --discovery.addr 0.0.0.0 \
  --discovery.port 30303 \
  --http \
  --http.addr 0.0.0.0 \
  --http.port 8545 \
  --http.api eth,net,web3,txpool,trace \
  --metrics 9000
Restart=always
RestartSec=10
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target
EOF

Start and enable:

sudo systemctl daemon-reload
sudo systemctl enable tempo
sudo systemctl start tempo

Check status and logs:

sudo systemctl status tempo
sudo journalctl -u tempo -f

5) Open ports (if UFW is enabled)

sudo ufw allow 30303/tcp
sudo ufw allow 30303/udp
sudo ufw allow 8545/tcp

6) Check node health

Install Foundry (for cast):

curl -L https://foundry.paradigm.xyz | bash
source ~/.bashrc
foundryup

Check block height and peers:

cast block-number --rpc-url http://localhost:8545
cast rpc net_peerCount --rpc-url http://localhost:8545

If you don’t want cast, use curl:

curl -s -X POST http://localhost:8545 \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}'

7) Troubleshooting

Genesis mismatch

Error like:

genesis hash in the storage does not match the specified chainspec

Fix:

sudo systemctl stop tempo
rm -rf /root/.local/share/reth/tempo
tempo download --chain moderato --datadir /root/.local/share/reth/tempo
sudo systemctl start tempo

Low peers

  • Wait 10–30 minutes after start
  • Check port is listening:
ss -tulpn | grep 30303

8) Optional monitoring (Prometheus + Grafana)

Tempo exposes metrics on 127.0.0.1:9000.

Node Exporter

sudo useradd --no-create-home --shell /usr/sbin/nologin node_exporter
curl -L https://github.com/prometheus/node_exporter/releases/download/v1.8.2/node_exporter-1.8.2.linux-amd64.tar.gz -o /tmp/node_exporter.tar.gz
tar -xzf /tmp/node_exporter.tar.gz -C /tmp
sudo mv /tmp/node_exporter-1.8.2.linux-amd64/node_exporter /usr/local/bin/
sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
sudo tee /etc/systemd/system/node_exporter.service > /dev/null <<'EOF'
[Unit]
Description=Node Exporter
After=network.target

[Service]
User=node_exporter
Group=node_exporter
Type=simple
ExecStart=/usr/local/bin/node_exporter

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now node_exporter

Prometheus

sudo useradd --no-create-home --shell /usr/sbin/nologin prometheus
curl -L https://github.com/prometheus/prometheus/releases/download/v2.53.0/prometheus-2.53.0.linux-amd64.tar.gz -o /tmp/prometheus.tar.gz
tar -xzf /tmp/prometheus.tar.gz -C /tmp
sudo mkdir -p /etc/prometheus /var/lib/prometheus
sudo mv /tmp/prometheus-2.53.0.linux-amd64/prometheus /usr/local/bin/
sudo mv /tmp/prometheus-2.53.0.linux-amd64/promtool /usr/local/bin/
sudo mv /tmp/prometheus-2.53.0.linux-amd64/consoles /etc/prometheus/
sudo mv /tmp/prometheus-2.53.0.linux-amd64/console_libraries /etc/prometheus/
sudo chown -R prometheus:prometheus /etc/prometheus /var/lib/prometheus /usr/local/bin/prometheus /usr/local/bin/promtool
sudo tee /etc/prometheus/prometheus.yml > /dev/null <<'EOF'
global:
  scrape_interval: 15s

scrape_configs:
  - job_name: "tempo"
    static_configs:
      - targets: ["127.0.0.1:9000"]
  - job_name: "node"
    static_configs:
      - targets: ["127.0.0.1:9100"]
EOF
sudo tee /etc/systemd/system/prometheus.service > /dev/null <<'EOF'
[Unit]
Description=Prometheus
After=network.target

[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/bin/prometheus \
  --config.file=/etc/prometheus/prometheus.yml \
  --storage.tsdb.path=/var/lib/prometheus \
  --web.listen-address=127.0.0.1:9090

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now prometheus

Grafana

sudo apt update
sudo apt install -y apt-transport-https software-properties-common wget
wget -q -O - https://packages.grafana.com/gpg.key | sudo tee /etc/apt/trusted.gpg.d/grafana.asc > /dev/null
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
sudo apt update
sudo apt install -y grafana
sudo systemctl enable --now grafana-server

Access Grafana locally:

  • SSH tunnel from your PC:
ssh -L 3000:127.0.0.1:3000 root@<SERVER_IP>
  • Open: http://127.0.0.1:3000
  • Login: admin / admin

Recommended dashboards:

  • Node Exporter: ID 1860
  • Reth: ID 20638

9) Updating Tempo

tempoup
sudo systemctl restart tempo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published