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-devStep 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 --releaseBuild 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.txtFor 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.txtGenesis 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 dataStep 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.yamlDebug 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/v1You 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.targetEnable 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 -fConfiguration 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: ApplyTransactionOutputsUpdating 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-fullnodeTroubleshooting
Build fails
- Ensure all build dependencies are installed
- Check Rust version:
rustc --version - Try cleaning and rebuilding:
cargo clean && cargo build -p aptos-node --release
Node won't start
- Check configuration file syntax
- Verify all paths in the config are correct
- Ensure data directory exists and has correct permissions
Node is not syncing
- Check logs for connection errors
- Verify network connectivity to upstream peers
- Ensure port 6182 is open for outbound connections
Next Steps
- Verify your PFN - Check that your node is running correctly
- Archival Node - If you need complete historical data
Deploy a PFN
Step-by-step guides for deploying a public fullnode (PFN) on Movement networks using various deployment methods including source code, Docker, and cloud platforms coming soon.
Using Docker
Deploy a public fullnode (PFN) using Docker containers with automated configuration download and container setup for x86-64 systems.