# Setup Aptos Node **Published by:** [QuantumValkyrie](https://paragraph.com/@quantumvalkyrie/) **Published on:** 2024-11-27 **URL:** https://paragraph.com/@quantumvalkyrie/setup-aptos-node ## Content PrerequisitesBefore proceeding, ensure you have the following:Server Requirements:CPU: 4+ coresRAM: 8GB or moreStorage: 100GB SSD or higherOS: Ubuntu 20.04 or higherTools Installed:curlgitdockerdocker-composeTo install these tools, run:sudo apt update && sudo apt upgrade -y sudo apt install -y curl git docker.io docker-compose sudo systemctl enable docker --now Step 1: Clone the Aptos RepositoryClone the Aptos Networks repository:git clone https://github.com/aptos-labs/aptos-networks.git cd aptos-networks Step 2: Install Aptos CLIThe Aptos CLI is necessary to interact with the network. Install it by running:# Download the Aptos CLI binary curl -sSfL https://aptos.dev/cli-tools/install-cli.sh | sh # Verify installation aptos --version Step 3: Generate Keys and ConfigurationGenerate a key pair and configuration file for your node:aptos genesis generate-keys --output-dir $HOME/aptos aptos genesis set-validator-configuration \ --keys-dir $HOME/aptos \ --validator-host <YOUR_VALIDATOR_IP>:6180 \ --full-node-host <YOUR_VALIDATOR_IP>:6182 \ --output-dir $HOME/aptos Replace with your server's public IP address.Step 4: Join the Aptos NetworkFetch the latest configuration files from the Aptos testnet or mainnet (depending on your goal):# Example: For testnet wget -qO $HOME/aptos/testnet.yaml https://testnet.aptos.dev/genesis.yaml Step 5: Run Your NodeUse Docker to launch your Aptos node:Create a docker-compose.yml file in the aptos-networks directory:version: "3.8" services: aptos-node: image: aptoslab/validator:latest container_name: aptos-node restart: always ports: - "6180:6180" # Validator communication - "6182:6182" # Full node communication volumes: - $HOME/aptos:/opt/aptos command: [ "--config", "/opt/aptos/testnet.yaml", "--genesis", "/opt/aptos/genesis.blob", ] Start the node:docker-compose up -d Verify that your node is running:docker logs -f aptos-node Step 6: Monitor Your NodeCheck Sync StatusUse the CLI to check the node's sync status:curl http://<YOUR_VALIDATOR_IP>:6180/metrics | grep aptos_state_sync_version LogsFor real-time logs:docker logs -f aptos-node Step 7: Update Your NodeRegular updates ensure compatibility with the Aptos network:Pull the latest Docker image:docker pull aptoslab/validator:latest Restart your node:docker-compose down && docker-compose up -d TroubleshootingNode Is Not SyncingEnsure your ports 6180 and 6182 are open:sudo ufw allow 6180/tcp sudo ufw allow 6182/tcp Verify connectivity to peers.Logs Show ErrorsCheck Docker logs for specific issues:docker logs aptos-node ## Publication Information - [QuantumValkyrie](https://paragraph.com/@quantumvalkyrie/): Publication homepage - [All Posts](https://paragraph.com/@quantumvalkyrie/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@quantumvalkyrie): Subscribe to updates - [Twitter](https://twitter.com/QuantmValkyrie): Follow on Twitter