> For the complete documentation index, see [llms.txt](https://service.block-pro.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://service.block-pro.net/testnet/monad/node-installation.md).

# Node Installation

Install a Monad Testnet full node on a dedicated server.

**Testnet · Chain ID `10143` · Ubuntu 24.04 / bare metal**

Use a fresh machine meeting the [requirements](https://service.block-pro.net/testnet/monad/introduction.md). These commands run in a root shell. Set up SSH access and identify your dedicated TrieDB disk before continuing.

## Prepare the machine

### Open a root shell

Use administrator access for package, service and raw-device setup.

```bash
sudo -i
```

### Refresh packages

Refresh the package index.

```bash
apt update
```

### Install utilities

Install disk, download and configuration tools.

```bash
apt install -y ca-certificates curl gnupg nvme-cli parted aria2 jq openssl nano ufw less
```

### Create the signing-key directory

Prepare APT’s keyring location.

```bash
install -m 0755 -d /etc/apt/keyrings
```

### Import the package key

Trust packages signed by the official Category Labs repository.

```bash
curl -fsSL https://pkg.category.xyz/keys/public-key.asc | gpg --dearmor --yes -o /etc/apt/keyrings/category-labs.gpg
```

### Verify the package key

Check for the Category Labs APT archive signing key with fingerprint `7C42 CFAB 84AB B23B 5040 082C DE2D ABCA 749E 2B10`.

```bash
gpg --show-keys --with-fingerprint /etc/apt/keyrings/category-labs.gpg
```

### Configure the repository

Add the Ubuntu Noble package source.

```bash
cat > /etc/apt/sources.list.d/category-labs.sources <<EOF
Types: deb
URIs: https://pkg.category.xyz/
Suites: noble
Components: main
Signed-By: /etc/apt/keyrings/category-labs.gpg
EOF
```

### Refresh package versions

Load the available Monad package versions.

```bash
apt update
```

### Inspect available versions

Check that the release announced for Testnet is available.

```bash
apt-cache madison monad
```

### Install the approved release

Install the announced Testnet package. Existing nodes should follow [Node Upgrade](https://service.block-pro.net/testnet/monad/node-upgrade.md).

```bash
apt install monad=0.16.7
```

### Hold the package

Prevent unattended system upgrades from changing the consensus version.

```bash
apt-mark hold monad
```

### Create the service user

Skip only if the monad account already exists.

```bash
useradd -m -s /bin/bash monad
```

### Create node directories

Prepare configuration, ledger and runtime metadata paths.

```bash
mkdir -p /home/monad/monad-bft/config/forkpoint /home/monad/monad-bft/config/validators /home/monad/monad-bft/ledger
```

## Prepare the TrieDB disk

{% hint style="warning" %}
The following formatting steps erase the selected disk. Choose an unused dedicated NVMe device, with no mounted partitions, swap, LVM or RAID. Never select the OS disk. These steps are for initial setup, not upgrades.
{% endhint %}

### List NVMe devices

Identify the model and capacity of the dedicated disk.

```bash
nvme list
```

### Inspect mounts and filesystems

Check every partition and confirm the target disk is unused.

```bash
lsblk -o NAME,PATH,SIZE,TYPE,FSTYPE,MOUNTPOINTS,MODEL
```

### Choose the disk

Enter its exact path after inspection; no disk is selected by default.

```bash
read -rp "Unused dedicated TrieDB disk path: " TRIEDB_DRIVE
```

### Inspect LBA formats

Identify a 512-byte LBA format and its index.

```bash
nvme id-ns -H "$TRIEDB_DRIVE"
```

If 512-byte sectors are not active, select the index shown for the 512-byte format. Formatting destroys this disk’s contents.

### Select the format index — only if needed

Use the index reported by your device. Do not assume index 0 on every disk.

```bash
read -rp "512-byte LBA format index: " LBA_INDEX
```

### Apply 512-byte format — only if needed

Format the verified unused device.

```bash
nvme format --lbaf="$LBA_INDEX" "$TRIEDB_DRIVE"
```

### Create the partition table

Create a fresh GPT on the selected empty disk.

```bash
parted "$TRIEDB_DRIVE" mklabel gpt
```

### Create the TrieDB partition

Allocate the disk to one raw database partition.

```bash
parted "$TRIEDB_DRIVE" mkpart triedb 0% 100%
```

### Read the partition UUID

Use the only partition created above.

```bash
PARTUUID=$(lsblk -nr -o PARTUUID "$TRIEDB_DRIVE" | awk 'NF {print; exit}')
```

### Create a stable device name

Allow only root and the monad group to access the raw partition.

```bash
printf 'ENV{ID_PART_ENTRY_UUID}=="%s", GROUP="monad", MODE="0660", SYMLINK+="triedb"\n' "$PARTUUID" > /etc/udev/rules.d/99-triedb.rules
```

### Reload device rules

Load the new rule.

```bash
udevadm control --reload-rules
```

### Apply the rule

Apply permissions and the triedb symlink.

```bash
udevadm trigger
```

### Wait for device setup

Wait for udev to finish.

```bash
udevadm settle
```

### Verify the target

Confirm /dev/triedb points to the dedicated partition.

```bash
ls -l /dev/triedb
```

### Initialize TrieDB

Run the package’s one-time database initializer.

```bash
systemctl start monad-mpt
```

### Check TrieDB arguments

The packaged units pass `/dev/triedb`. Custom launch configurations must point `--triedb-path` to the database block device.

```bash
systemctl cat monad-bft monad-rpc | grep -- '--triedb-path'
```

### Check initialization

Confirm the initializer completed successfully.

```bash
journalctl -u monad-mpt -n 30 --no-pager -o cat
```

## Configure Testnet

### Download the environment template

Use the Testnet configuration supplied by Monad Foundation.

```bash
curl -fL https://bucket.monadinfra.com/config/testnet/latest/.env.example -o /home/monad/.env
```

### Download the full-node template

Use the public full-node network configuration.

```bash
curl -fL https://bucket.monadinfra.com/config/testnet/latest/full-node-node.toml -o /home/monad/monad-bft/config/node.toml
```

### Protect the environment

Restrict the file before adding the keystore password.

```bash
chmod 0600 /home/monad/.env
```

### Set the password

On this fresh setup, generate the password when the template contains an empty KEYSTORE\_PASSWORD entry.

```bash
sed -i "s|^KEYSTORE_PASSWORD=$|KEYSTORE_PASSWORD='$(openssl rand -base64 32)'|" /home/monad/.env
```

### Load service variables

Load the template after reviewing it.

```bash
source /home/monad/.env
```

### Confirm a password is set

Continue only if this command succeeds.

```bash
test -n "$KEYSTORE_PASSWORD"
```

### Prepare private backups

Create a restricted backup location.

```bash
install -m 0700 -d /opt/monad/backup
```

### Restrict new private files

Keep newly generated backup files private.

```bash
umask 077
```

### Create the SECP identity

Run only on a new node with no existing id-secp file.

```bash
monad-keystore create --key-type secp --keystore-path /home/monad/monad-bft/config/id-secp --password "$KEYSTORE_PASSWORD" > /opt/monad/backup/secp-backup
```

### Create the BLS identity

Run only on a new node with no existing id-bls file.

```bash
monad-keystore create --key-type bls --keystore-path /home/monad/monad-bft/config/id-bls --password "$KEYSTORE_PASSWORD" > /opt/monad/backup/bls-backup
```

Securely back up both keystores, their password and the recovery files outside the node. Do not post recovery-file contents.

### Edit node settings

Set a unique node\_name. For a full node, beneficiary may be the zero address. Keep enable\_client=true under fullnode\_raptorcast, expand\_to\_group=true under statesync, and the public full-node blocksync\_override list empty.

```bash
nano /home/monad/monad-bft/config/node.toml
```

### Inspect name-record options

Use the flags supported by the installed release.

```bash
monad-sign-name-record --help
```

### Set the public IP

Enter the routable address assigned to this server.

```bash
read -rp "Node public IPv4: " NODE_PUBLIC_IP
```

### Sign the discovery record

Sign the Testnet record for TCP 8000, authenticated UDP 8001 and direct UDP 8002.

```bash
monad-sign-name-record --ip "$NODE_PUBLIC_IP" --tcp-port 8000 --direct-udp-port 8002 \
  --authenticated-udp-port 8001 --keystore-path /home/monad/monad-bft/config/id-secp \
  --password "$KEYSTORE_PASSWORD" --self-record-seq-num 1
```

Copy the generated fields into `[peer_discovery]`: `self_address` contains the IP without a port; set `self_tcp_port=8000`, `self_auth_port=8001`, `self_direct_udp_auth_port=8002`, the generated sequence number and signature. Preserve the rest of the downloaded Testnet template.

### Check remote metadata URLs

Confirm both variables use /testnet/, then save any missing values in .env.

```bash
nano /home/monad/.env
```

```ini
REMOTE_VALIDATORS_URL='https://bucket.monadinfra.com/validators/testnet/validators.toml'
REMOTE_FORKPOINT_URL='https://bucket.monadinfra.com/forkpoint/testnet/forkpoint.toml'
```

## Network access

Preserve your actual SSH port before enabling a firewall. Allow the consensus ports required by the selected template; keep RPC 8080 and metrics private.

### Allow SSH

Use this on hosts using standard SSH port 22; adapt it before proceeding if yours differs.

```bash
ufw allow 22/tcp
```

### Allow consensus traffic

Permit the ports used by the official node template.

```bash
ufw allow 8000:8002
```

### Enable the firewall

Review the rules and apply the firewall.

```bash
ufw enable
```

The upstream guide also recommends a UDP anti-spam rule on port 8000. Confirm your release’s networking requirements and persist the rule with your firewall tooling. See the [official networking section](https://docs.monad.xyz/node-ops/full-node-installation#configure-firewall-rules).

## Bootstrap and start

### Set file ownership

Give the service account access to its configuration and data.

```bash
chown -R monad:monad /home/monad
```

### Enable services

Enable startup on boot.

```bash
systemctl enable monad-bft monad-execution monad-rpc
```

Use the following official Testnet bootstrap utility on this **fresh node**. It resets local ledger/database state, so it is not a routine upgrade step. Existing nodes should follow [Node Upgrade](https://service.block-pro.net/testnet/monad/node-upgrade.md). Review each utility before running it.

### Inspect the workspace reset utility

Read the official packaged recovery helper.

```bash
less /opt/monad/scripts/reset-workspace.sh
```

### Reset the fresh workspace

Clear initial local state before bootstrap; this discards existing ledger/database state.

```bash
bash /opt/monad/scripts/reset-workspace.sh
```

### Download the Testnet snapshot utility

Save the official helper for review.

```bash
curl -fL https://bucket.monadinfra.com/scripts/testnet/restore-from-snapshot.sh -o /root/monad-testnet-restore.sh
```

### Review the restore utility

Inspect its source and paths.

```bash
less /root/monad-testnet-restore.sh
```

### Restore Testnet state

Run the reviewed utility and wait for successful completion.

```bash
bash /root/monad-testnet-restore.sh
```

For manual page-encoded TrieDB recovery, v2 binary snapshots support bounded restore memory. Both producing and restoring a v2 snapshot require v0.16.7 or newer. Check the snapshot format and the restoration procedure supplied by the provider. [Monad snapshot format notes](https://docs.monad.xyz/node-ops/upgrade-instructions/v0.16.7#upgrade-notes)

### Start the node

Start consensus, execution and RPC after restoration.

```bash
systemctl start monad-bft monad-execution monad-rpc
```

### Check services

All three should be active.

```bash
systemctl status monad-bft monad-execution monad-rpc --no-pager -l
```

### Verify Testnet

After statesync, RPC should return 0x279f (10143).

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

### Verify progress

Repeat to confirm the block number advances.

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

### Check cleanup

The package’s cleanup timer prevents old artifacts from accumulating.

```bash
systemctl status monad-cruft.timer --no-pager
```

The native metrics endpoint defaults to port 9143; keep it private or restrict access to your monitoring systems. The upstream [metrics migration page](https://docs.monad.xyz/node-ops/upgrade-instructions/prometheus-metrics-migration) currently asks operators to wait for a separate Foundation announcement before running that migration. Do not remove an existing collector as part of this package update.

## Validator registration

Once fully synchronized, follow the [official Testnet validator registration instructions](https://docs.monad.xyz/node-ops/validator-installation) and select Testnet in the staking CLI configuration. Reuse the node identity keys created above; keep private keys and recovery files out of command history and public logs. The full-node template alone does not register a validator.

[Installation source](https://docs.monad.xyz/node-ops/full-node-installation).
