# Run Node Testnet

## Run a SATUCHAIN Node (Testnet) — RPC Node

This guide sets up a **SATUCHAIN Testnet RPC node** on a Linux server (Ubuntu recommended). It covers install, run, and basic health checks.

SATUCHAIN Testnet\
RPC: [https://rpc-testnet.satuchain.com](https://rpc-testnet.satuchain.com/)\
Chain ID: 17081945

***

### 1) Server Requirements

Minimum (testnet / light usage)

* CPU: 4 vCPU
* RAM: 8 GB
* Disk: 200 GB SSD
* OS: Ubuntu 22.04

Recommended (stable RPC)

* CPU: 8 vCPU
* RAM: 16–32 GB
* Disk: 500 GB+ NVMe SSD

***

### 2) Install System Packages

```bash
sudo apt update && sudo apt -y upgrade
sudo apt -y install curl wget jq unzip ca-certificates gnupg lsb-release
```

***

### 3) Create a Dedicated User

```bash
sudo useradd -r -m -s /bin/bash satuchain
sudo mkdir -p /var/lib/satuchain
sudo chown -R satuchain:satuchain /var/lib/satuchain
```

***

### 4) Download Node Binary

Replace the URL below with your official release link (Linux amd64).\
(If you already have the binary name, keep it consistent.)

```bash
sudo -u satuchain bash -c '
cd /home/satuchain
wget -O satuchain-node.tar.gz <YOUR_NODE_RELEASE_URL>
tar -xzf satuchain-node.tar.gz
chmod +x satuchain
'
```

Move binary to PATH:

```bash
sudo mv /home/satuchain/satuchain /usr/local/bin/satuchain
sudo chmod +x /usr/local/bin/satuchain
```

Check:

```bash
satuchain --version
```

***

### 5) Create a Node Config Directory

```bash
sudo -u satuchain mkdir -p /var/lib/satuchain/data
```

***

### 6) Run the Node (Testnet)

Example command (standard RPC + WS). Adjust flags to match your node client:

```bash
sudo -u satuchain /usr/local/bin/satuchain \
  --network testnet \
  --datadir /var/lib/satuchain/data \
  --http --http.addr 0.0.0.0 --http.port 8545 \
  --ws --ws.addr 0.0.0.0 --ws.port 8546
```

If your node requires bootnodes / seeds / genesis, add the flags from your SATUCHAIN release notes.

***

### 7) Run as a Service (systemd)

Create file:

```bash
sudo nano /etc/systemd/system/satuchain.service
```

Paste:

```ini
[Unit]
Description=SATUCHAIN Node (Testnet)
After=network-online.target
Wants=network-online.target

[Service]
User=satuchain
Group=satuchain
Type=simple
Restart=always
RestartSec=3
LimitNOFILE=1048576

ExecStart=/usr/local/bin/satuchain \
  --network testnet \
  --datadir /var/lib/satuchain/data \
  --http --http.addr 0.0.0.0 --http.port 8545 \
  --ws --ws.addr 0.0.0.0 --ws.port 8546

WorkingDirectory=/var/lib/satuchain
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target
```

Enable + start:

```bash
sudo systemctl daemon-reload
sudo systemctl enable satuchain
sudo systemctl start satuchain
```

Logs:

```bash
sudo journalctl -u satuchain -f --no-pager
```

***

### 8) Basic Health Checks

Check block number:

```bash
curl -s -X POST http://127.0.0.1:8545 \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}' | jq
```

Check chain ID:

```bash
curl -s -X POST http://127.0.0.1:8545 \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}' | jq
```

Expected chain ID (hex) for 17081945 is:

* `0x104a4e9`

***

### 9) Secure Your RPC (Required)

Do not expose `8545/8546` publicly without protection.

Minimum firewall example (allow only your IP):

```bash
sudo ufw allow OpenSSH
sudo ufw allow from <YOUR_PUBLIC_IP> to any port 8545
sudo ufw allow from <YOUR_PUBLIC_IP> to any port 8546
sudo ufw enable
```

***

### 10) Update the Node

When a new release is published:

* Stop service
* Replace binary
* Start service again

```bash
sudo systemctl stop satuchain
# replace /usr/local/bin/satuchain
sudo systemctl start satuchain
```

***


---

# 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://satuchain.gitbook.io/satuchain-docs/developer/run-node-testnet.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.
