Installing Avalanche node in the MIPs program

Olga L
Apr 30, 2023

--

Installing Dependencies

sudo apt install -y golang build-essential bsdmainutils clang cmake git
cd /root/git clone <https://github.com/ava-labs/avalanchego>cd avalanchego./scripts/build.shmkdir -p /root/avalanchego/configs/chains/C

save service file: nano /etc/systemd/system/avalanchego.service

[Unit]
Description=Avalanche Node Documentation=https://docs.avax.network/nodes/maintain/avalanchego-config-flags
After=network.target
[Service]
User=root
WorkingDirectory=/root/avalanchego/
ExecStart=/root/avalanchego/build/avalanchego \\\\
--chain-config-dir=/root/avalanchego/configs/chains \\\\
--config-file=/root/avalanchego/configs/chains/C/config.json \\\\
--api-metrics-enabled \\\\
--db-dir=/root/.local/share/avalanche/datadir \\\\
--http-host=0.0.0.0 \\\\ --http-port=9656 \\\\
--log-level=info \\\\
--log-dir=/root/.local/share/avalanche/logs \\\\
--network-id=mainnet \\\\
--public-ip-resolution-service=opendns \\\\
--network-allow-private-ips=false
Restart=on-failure
LimitNOFILE=1000000
[Install]
WantedBy=default.target"

Download snapshot from ftp

<ftp://mips:thegraph@dropbox.pinax.network/avalanche-datadir/part1/>
<ftp://mips:thegraph@dropbox.pinax.network/avalanche-datadir/part2/>

Create the json config: nano /root/avalanchego/configs/chains/C/config.json

{
"snowman-api-enabled": false,
"eth-apis": [
"eth",
"eth-filter",
"net",
"web3",
"internal-eth",
"internal-blockchain",
"internal-transaction",
"internal-tx-pool",
"internal-account"
],
"metrics-enabled": true,
"pruning-enabled": false,
"state-sync-enabled": false
}

Start AvalancheGo service:

--

--

Olga L
Olga L

No responses yet