Using Docker
Deploy a public fullnode (PFN) using Docker containers with automated configuration download and container setup for x86-64 systems.
This section describes how to configure and run your PFN using Docker. You can either use pre-built Docker images or build your own from source.
Supported only on x86-64 CPUs
Running aptos-core via Docker is currently only supported on x86-64 CPUs. If you have an Apple M1/M2 (ARM64) Mac, use
the aptos-core source code approach (above). If M1/M2 support is important to you, comment on this
issue: https://github.com/aptos-labs/aptos-core/issues/1412
If you prefer to use the official pre-built images, follow these steps:
- First, install Docker.
- Next, run the following script to prepare your local configuration and data directory depending on the network you want to connect to. This will
download the
fullnode.yamlconfiguration file, thegenesis.blobandwaypoint.txtfiles for your PFN, and create adatadirectory to store the blockchain database:- for mainnet
mkdir mainnet && cd mainnet
mkdir data && \
curl -O https://raw.githubusercontent.com/movementlabsxyz/aptos-core/movement/docker/compose/aptos-node/fullnode.yaml && \
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.blob
curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/mainnet/genesis_waypoint.txt- for testnet
mkdir testnet && cd testnet
mkdir data && \
curl -O https://raw.githubusercontent.com/movementlabsxyz/aptos-core/movement/docker/compose/aptos-node/fullnode.yaml && \
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.blob
curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/testnet/genesis_waypoint.txtGenesis files repository
To connect to different networks (e.g., testnet, devnet and mainnet), you can find the genesis, waypoint and genesis_waypoint here ➜ https://github.com/movementlabsxyz/movement-networks.
Be sure to download the genesis.blob, waypoint.txt and genesis_waypoint.txt for those networks.
- Next, update the
fullnode.yamlconfiguration file that you downloaded above with the following content. This will ensure that this configuration is for a PFN and not for another node type (e.g., validator or VFN):
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:
-for mainnet
- network_id: "public"
discovery_method: "none"
listen_address: "/ip4/0.0.0.0/tcp/6182"
seeds:
9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F:
addresses:
- "/dns/consensus.mainnet.movementnetwork.xyz/tcp/6182/noise-ik/9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F/handshake/0"
role: "Upstream"
-for testnet
- network_id: "public"
discovery_method: "none"
listen_address: "/ip4/0.0.0.0/tcp/6182"
seeds:
9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F:
addresses:
- "/dns/consensus.testnet.movementnetwork.xyz/tcp/6182/noise-ik/9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F/handshake/0"
role: "Upstream"
api:
enabled: true
address: 0.0.0.0:8080
state_sync:
state_sync_driver:
bootstrapping_mode: DownloadLatestStates
continuous_syncing_mode: ApplyTransactionOutputs
- for mainnet
start_epoch: 10774941
- for testnet
start_epoch: 2111769Don't want to allow inbound connections?
Override the following if you do not want other PFNs connecting to yours: listen_address: "/ip4/127.0.0.1/tcp/6182".
- Next, run the following
dockercommand:
docker run --pull=always \
--rm -p 8080:8080 \
-p 9101:9101 -p 6180:6180 \
-v $(pwd):/opt/aptos -v $(pwd)/data:/opt/aptos/data \
--workdir /opt/aptos \
--name=aptos-fullnode ghcr.io/movementlabsxyz/aptos-node:f24a5bc \
-f /opt/aptos/fullnode.yamlSudo access
Note: you may need to prefix the docker command with sudo depending on your configuration.
Docker tags
The latest tag always refers to the latest official Docker image tag. You can find the latest hash for comparison at:
You have now successfully configured and started running a PFN of Movement network.
Verify your PFN If you want to verify that your PFN is running correctly, you can follow the instructions in the Verify a PFN guide.