Movement Labs LogoMovement Docs
Nodes/Full Node/Run a Full Node/Deploy a Full Node

Using Source Code

Deploy a public fullnode (PFN) by building from aptos-core source code with complete configuration and setup instructions.

This guide describes how to deploy a PFN using the aptos-core source code maintained by Movement Labs.

Prerequisites

  • Rust toolchain installed
  • Sufficient storage space (~50-100GB)
  • Build dependencies installed

Install Build Dependencies (Linux)

sudo apt update
sudo apt install -y binutils build-essential lld pkg-config libdw-dev

Step 1: Clone and Build

# Clone the Movement aptos-core repository
git clone https://github.com/movementlabsxyz/aptos-core.git
cd aptos-core

# Check out the l1-migration branch
git checkout --track origin/l1-migration

# Build the release binary
cargo build -p aptos-node --release

Build Time

The initial build can take 15-30 minutes depending on your hardware. The release binary will be at target/release/aptos-node.

Step 2: Download Configuration Files

Download the fullnode configuration and genesis files for your network:

For Mainnet

curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/mainnet/configs/fullnode.yaml
curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/mainnet/genesis.blob
curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/mainnet/waypoint.txt
curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/mainnet/genesis_waypoint.txt

For Testnet

curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/testnet/configs/fullnode.yaml
curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/testnet/genesis.blob
curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/testnet/waypoint.txt
curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/testnet/genesis_waypoint.txt

Genesis files repository

All configuration and genesis files are maintained at https://github.com/movementlabsxyz/movement-networks

Step 3: Update Configuration Paths

Edit the fullnode.yaml to use local paths:

base:
  role: "full_node"
  data_dir: "./data"  # Local data directory
  waypoint:
    from_file: "./waypoint.txt"

execution:
  genesis_file_location: "./genesis.blob"
  genesis_waypoint:
    from_file: "./genesis_waypoint.txt"

Create the data directory:

mkdir -p data

Step 4: Run the Fullnode

Start the fullnode:

# Using the release binary
./target/release/aptos-node -f ./fullnode.yaml

# Or using cargo run
cargo run -p aptos-node --release -- -f ./fullnode.yaml

Debug vs Release

The release binary is substantially faster than debug builds but lacks debugging information. To build a debug binary for development, omit the --release flag.

Step 5: Verify the Node

Check that your node is running:

curl http://localhost:8080/v1

You should see a JSON response with the node's status including chain_id, epoch, and ledger_version.

Running as a Background Service

To run the node as a systemd service:

[Unit]
Description=Movement Full Node
After=network.target

[Service]
Type=simple
User=movement
WorkingDirectory=/home/movement/aptos-core
ExecStart=/home/movement/aptos-core/target/release/aptos-node -f /home/movement/aptos-core/fullnode.yaml
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable movement-fullnode
sudo systemctl start movement-fullnode

# Check status
sudo systemctl status movement-fullnode

# View logs
sudo journalctl -u movement-fullnode -f

Configuration Details

The downloaded fullnode.yaml contains the following key settings:

base:
  role: "full_node"
  data_dir: "/opt/aptos/data"
  waypoint:
    from_file: "/opt/aptos/waypoint.txt"

execution:
  genesis_file_location: "/opt/aptos/genesis.blob"
  genesis_waypoint:
    from_file: "/opt/aptos/genesis_waypoint.txt"

storage:
  rocksdb_configs:
    enable_storage_sharding: false

full_node_networks:
  - network_id: "public"
    discovery_method: "none"
    listen_address: "/ip4/0.0.0.0/tcp/6182"
    seeds:
      # Network-specific seed node
      ...

api:
  enabled: true
  address: 0.0.0.0:8080

state_sync:
  state_sync_driver:
    bootstrapping_mode: DownloadLatestStates
    continuous_syncing_mode: ApplyTransactionOutputs

Updating the Node

To update to a newer version:

# Stop the node
sudo systemctl stop movement-fullnode  # or kill the process

# Pull latest changes
cd aptos-core
git pull origin l1-migration

# Rebuild
cargo build -p aptos-node --release

# Restart
sudo systemctl start movement-fullnode

Troubleshooting

Build fails

  1. Ensure all build dependencies are installed
  2. Check Rust version: rustc --version
  3. Try cleaning and rebuilding: cargo clean && cargo build -p aptos-node --release

Node won't start

  1. Check configuration file syntax
  2. Verify all paths in the config are correct
  3. Ensure data directory exists and has correct permissions

Node is not syncing

  1. Check logs for connection errors
  2. Verify network connectivity to upstream peers
  3. Ensure port 6182 is open for outbound connections

Next Steps