(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[47966],{23525:function(i,e,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/en/network/nodes/full-node/fullnode-source-code-or-docker",function(){return s(13433)}])},13433:function(i,e,s){"use strict";s.r(e),s.d(e,{useTOC:function(){return d}});var n=s(31549),t=s(82910),r=s(1117),l=s(46977),h=s(13844),a=s(83185);function d(i){return[{value:"Hardware requirements",id:"hardware-requirements",depth:2},{value:"Network requirements and ports",id:"network-requirements-and-ports",depth:2},{value:"Port settings",id:"port-settings",depth:3},{value:"Running a PFN:",id:"running-a-pfn",depth:4},{value:"Storage requirements",id:"storage-requirements",depth:3},{value:"Deploying a PFN",id:"deploying-a-pfn",depth:2},{value:"Method 1: Building and running from source",id:"method-1-building-and-running-from-source",depth:3},{value:"Method 2: Using Docker",id:"method-2-using-docker",depth:3},{value:"Verify the correctness of your PFN",id:"verify-the-correctness-of-your-pfn",depth:2},{value:"Verify initial synchronization",id:"verify-initial-synchronization",depth:3},{value:"(Optional) Verify outbound network connections",id:"optional-verify-outbound-network-connections",depth:3},{value:"(Optional) Examine Docker ledger size",id:"optional-examine-docker-ledger-size",depth:3}]}e.default=(0,t.c)(function(i){let{toc:e=d(i)}=i,s={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",span:"span",strong:"strong",ul:"ul",...(0,l.a)(),...i.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{children:"Run a PFN from Source Code or Docker"}),"\n",(0,n.jsx)(s.p,{children:"You can run your own public fullnode (PFN) to synchronize the state of the Aptos blockchain and stay\nup-to-date. PFNs replicate the entire state of the blockchain by syncing from other Aptos VFNs and PFNs. PFNs\ncan be run by anyone. This tutorial explains how to deploy a PFN and connect to an Aptos network."}),"\n",(0,n.jsx)(h.U,{type:"info",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Do I have to run a PFN?"}),(0,n.jsx)("br",{}),"\nIf you do not wish to run a PFN, but still want to interact with the Aptos blockchain, you can use the REST API\nprovided by the Aptos Labs’ PFNs (see ",(0,n.jsx)(s.a,{href:"../../../build/apis",children:"Aptos APIs"}),"). Note, however, that Aptos Labs-provided PFNs have rate\nlimits, which can impede your development. If you want to avoid such rate limits, you can deploy your own PFN\nand synchronize with the Aptos blockchain directly."]})}),"\n",(0,n.jsx)(h.U,{type:"warning",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Choose a network"}),(0,n.jsx)("br",{}),"\nThis document describes how to start a public fullnode in the Aptos mainnet network, but it can easily be used to do\nthe same in the devnet or testnet networks. To do so, check out the desired network branch and use\nthe ",(0,n.jsx)(s.code,{children:"genesis.blob"})," and ",(0,n.jsx)(s.code,{children:"waypoint.txt"})," node files for the respective branches:\n",(0,n.jsx)(s.a,{href:"../configure/node-files-all-networks/node-files-mainnet",children:"mainnet"}),",\n",(0,n.jsx)(s.a,{href:"../configure/node-files-all-networks/node-files-devnet",children:"devnet"}),", and\n",(0,n.jsx)(s.a,{href:"../configure/node-files-all-networks/node-files-testnet",children:"testnet"}),"."]})}),"\n",(0,n.jsx)(s.h2,{id:e[0].id,children:e[0].value}),"\n",(0,n.jsxs)(s.p,{children:["For running a production-grade PFN, we recommend that your hardware meet the same requirements as a\nvalidator or VFN. You can see the hardware requirements for these nodes, here: ",(0,n.jsx)(s.a,{href:"../validator-node/node-requirements#hardware-requirements",children:"validator and VFN hardware requirements"}),"."]}),"\n",(0,n.jsx)(s.p,{children:"If you wish to run a PFN for development or testing only, lower hardware specs can be used. But, it should not be\nused in production. For example:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.strong,{children:"CPU"}),": 8 cores, 16 threads (Intel Xeon Skylake or newer)."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.strong,{children:"Memory"}),": 32GB RAM."]}),"\n"]}),"\n",(0,n.jsx)(h.U,{type:"warning",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Minimum hardware requirements"}),(0,n.jsx)("br",{}),"\nFailing to meet the minimum hardware requirements for a production-grade PFN mean that your\nPFN will likely experience degradation under load and general instability in production environments."]})}),"\n",(0,n.jsx)(s.h2,{id:e[1].id,children:e[1].value}),"\n",(0,n.jsx)(s.p,{children:"When you are running a PFN, you are required to open network ports on your nodes to allow other nodes (i.e., peers)\nto connect to you. There are different Aptos network types, and each network type uses a different port. However,\nthe only network type that a PFN uses is the public network, where PFNs to connect to other PFNs and VFNs."}),"\n",(0,n.jsxs)(s.p,{children:["Your PFN can be configured so that the public network operates using a specific port on your node. You can configure\nthe port settings using the node configuration YAML file. Here is an ",(0,n.jsx)(s.a,{href:"https://github.com/aptos-labs/aptos-core/blob/main/config/src/config/test_data/public_full_node.yaml#L16",children:"example\nconfiguration file"})," for a PFN\nthat configures the public network to use port ",(0,n.jsx)(s.code,{children:"6180"}),"."]}),"\n",(0,n.jsx)(s.h3,{id:e[2].id,children:e[2].value}),"\n",(0,n.jsx)(s.p,{children:"The recommendations described below assume the default port settings used by PFNs. If you have\nchanged the default port settings in your configuration file, then you should adjust the recommendations accordingly."}),"\n",(0,n.jsx)(h.U,{type:"warning",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Exposing ports"}),(0,n.jsx)("br",{}),"\nUnless explicitly required, we recommend that you do not expose any other ports while operating a PFN. This is because\nexposing additional ports can increase the attack surface of your node and make it more vulnerable to adversaries."]})}),"\n",(0,n.jsx)(s.h4,{id:e[3].id,children:e[3].value}),"\n",(0,n.jsx)(s.p,{children:"Assuming default ports are used, the following should be configured for PFNs:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Open the following TCP ports:","\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"6182"})," – ",(0,n.jsx)(s.strong,{children:"Public network"}),": Open this port publicly to enable PFNs to connect to your VFN."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["Close the following TCP ports:","\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"9101"})," – ",(0,n.jsx)(s.strong,{children:"Inspection service"}),": Close this port to prevent unauthorized metric inspection."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"9102"})," – ",(0,n.jsx)(s.strong,{children:"Admin service"}),": Close this port to prevent unauthorized admin service interaction."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"80/8080"})," ",(0,n.jsx)(s.strong,{children:"REST API"}),": Close this port to prevent unauthorized REST API access."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(h.U,{type:"warning",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Exposing services"}),(0,n.jsx)("br",{}),"\nWe note that the inspection service port (",(0,n.jsx)(s.code,{children:"9101"}),"), admin service port (",(0,n.jsx)(s.code,{children:"9102"}),") and the REST API port (",(0,n.jsx)(s.code,{children:"80"})," or ",(0,n.jsx)(s.code,{children:"8080"}),")\nare likely useful for your internal network, e.g., application development and debugging. However, the inspection service\nport and the admin service port should never be exposed publicly as they can be easily abused. Similarly, if you choose\nto expose the REST API endpoint publicly, you should deploy an additional authentication or rate-limiting mechanism to\nprevent abuse."]})}),"\n",(0,n.jsx)(h.U,{type:"info",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Default network settings"}),(0,n.jsx)("br",{}),"\nYou may also need to update the 127.0.0.1 with 0.0.0.0 in the ",(0,n.jsx)(s.code,{children:"fullnode.yaml"})," for the fields ",(0,n.jsx)(s.code,{children:"listen_address"})," and ",(0,n.jsx)(s.code,{children:"address"})," field in the ",(0,n.jsx)(s.code,{children:"api"})," list."]})}),"\n",(0,n.jsx)(s.h3,{id:e[4].id,children:e[4].value}),"\n",(0,n.jsx)(s.p,{children:"The amount of data stored by Aptos depends on the ledger history (length) of the blockchain and the number of\non-chain states (e.g., accounts and resources). Both the ledger history and the number of\non-chain states depend on several additional factors, including the age of the blockchain, the average transaction\nrate over time, and the configuration of the ledger database pruner."}),"\n",(0,n.jsx)(s.p,{children:"Note that because archival nodes store the entire history of the blockchain, the database size on archival nodes\nwill continue to grow unbounded. As a result, we cannot provide a recommendation for archival node storage sizes."}),"\n",(0,n.jsx)(h.U,{type:"info",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Devnet blockchain storage"}),(0,n.jsx)("br",{}),"\nThe Aptos devnet is currently reset on a weekly basis. If you are deploying a devnet PFN, this means that the storage\nwill be reset (i.e., wiped) every week. See the ",(0,n.jsx)(s.code,{children:"#devnet-release"})," channel on the Aptos Discord."]})}),"\n",(0,n.jsx)(s.h2,{id:e[5].id,children:e[5].value}),"\n",(0,n.jsxs)(s.p,{children:["You can deploy a PFN in one of two ways: (i) building and running\n",(0,n.jsx)(s.a,{href:"https://github.com/aptos-labs/aptos-core",children:"aptos-core"})," from source code; or (ii) using Docker. This document describes\nhow to deploy your PFN using both methods."]}),"\n",(0,n.jsx)(s.h3,{id:e[6].id,children:e[6].value}),"\n",(0,n.jsxs)(s.p,{children:["First, see ",(0,n.jsx)(s.a,{href:"../building-from-source",children:"Building Aptos From Source"})," for instructions on how to download the ",(0,n.jsx)(s.code,{children:"aptos-core"})," repository and build the binary.\nThen, follow the steps below:"]}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Make sure your current working directory is ",(0,n.jsx)(s.code,{children:"aptos-core"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Check out the ",(0,n.jsx)(s.code,{children:"mainnet"})," branch using ",(0,n.jsx)(s.code,{children:"git checkout --track origin/mainnet"}),"; remember, you may instead use ",(0,n.jsx)(s.code,{children:"devnet"})," or ",(0,n.jsx)(s.code,{children:"testnet"}),"\nif you wish to run your PFN in a different network."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Next, download the ",(0,n.jsx)(s.code,{children:"genesis.blob"})," and ",(0,n.jsx)(s.code,{children:"waypoint.txt"})," files for the network your PFN will connect to:"]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsx)(s.p,{children:"Run this command to download the genesis blob (for mainnet):"}),"\n",(0,n.jsx)(s.pre,{icon:a.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-filename":"Terminal","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"curl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -O"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" https://raw.githubusercontent.com/aptos-labs/aptos-networks/main/mainnet/genesis.blob"})]})})}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsx)(s.p,{children:"Run this command to download the waypoint file (for mainnet):"}),"\n",(0,n.jsx)(s.pre,{icon:a.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-filename":"Terminal","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"curl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -O"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" https://raw.githubusercontent.com/aptos-labs/aptos-networks/main/mainnet/waypoint.txt"})]})})}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(h.U,{type:"warning",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Don’t want to connect to mainnet?"}),(0,n.jsx)("br",{}),"\nTo connect to other networks (e.g., ",(0,n.jsx)(s.code,{children:"devnet"})," and ",(0,n.jsx)(s.code,{children:"testnet"}),"), you can find the genesis and waypoint here ➜ ",(0,n.jsx)(s.a,{href:"https://github.com/aptos-labs/aptos-networks",children:"https://github.com/aptos-labs/aptos-networks"}),".\nBe sure to download the ",(0,n.jsx)(s.code,{children:"genesis.blob"})," and ",(0,n.jsx)(s.code,{children:"waypoint.txt"})," for those networks, instead of using the genesis\nand waypoint pointed to by the ",(0,n.jsx)(s.code,{children:"curl"})," commands above."]})}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsx)(s.p,{children:"Next, run the command below to create a copy of the PFN configuration YAML template:"}),"\n",(0,n.jsx)(s.pre,{icon:a.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-filename":"Terminal","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"cp"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" config/src/config/test_data/public_full_node.yaml"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" fullnode.yaml"})]})})}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Finally, edit the ",(0,n.jsx)(s.code,{children:"fullnode.yaml"})," configuration file to ensure that your PFN: (i) contains the genesis blob\nand waypoint file you just downloaded; and (ii) saves the synchronized blockchain data to the location of your\nchoice (on your local machine). To do this:"]}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsxs)(s.li,{children:["Specify the correct path to the ",(0,n.jsx)(s.code,{children:"genesis.blob"})," file you just downloaded by editing ",(0,n.jsx)(s.code,{children:"execution.genesis_file_location"})," in the ",(0,n.jsx)(s.code,{children:"fullnode.yaml"})," configuration. By default, it points to ",(0,n.jsx)(s.code,{children:"genesis.blob"})," in the current working directory.","\n",(0,n.jsx)(s.pre,{tabIndex:"0","data-language":"yaml","data-word-wrap":"","data-filename":"fullnode.yaml","data-copy":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"execution"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"  genesis_file_location"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"./genesis.blob"'})]})]})}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["Specify the correct path to the ",(0,n.jsx)(s.code,{children:"waypoint.txt"})," file you just downloaded by editing ",(0,n.jsx)(s.code,{children:"base.waypoint.from_file"})," in the ",(0,n.jsx)(s.code,{children:"fullnode.yaml"})," configuration. By default, it points to ",(0,n.jsx)(s.code,{children:"waypoint.txt"})," in the current working directory. For example:","\n",(0,n.jsx)(s.pre,{tabIndex:"0","data-language":"yaml","data-word-wrap":"","data-filename":"fullnode.yaml","data-copy":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"base"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"  waypoint"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"    from_file"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"./waypoint.txt"'})]})]})}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["Specify the directory on your local machine that you want to store the blockchain database by editing the ",(0,n.jsx)(s.code,{children:"base.data_dir"})," in the ",(0,n.jsx)(s.code,{children:"fullnode.yaml"})," configuration. For example, you can create a directory ",(0,n.jsx)(s.code,{children:"my-full-node/data"})," in your home directory and specify it as:","\n",(0,n.jsx)(s.pre,{tabIndex:"0","data-language":"yaml","data-word-wrap":"","data-filename":"fullnode.yaml","data-copy":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"base"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"  data_dir"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"</path/to/my/homedir/my-full-node/data>"'})]})]})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsx)(s.p,{children:"Start your local public fullnode by running the below command:"}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.pre,{icon:a.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-filename":"Terminal","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"cargo"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" run"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -p"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" aptos-node"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --release"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -f"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" ./fullnode.yaml"})]})})}),"\n",(0,n.jsx)(s.p,{children:"You have now successfully configured and started running a PFN in the Aptos mainnet."}),"\n",(0,n.jsx)(h.U,{type:"info",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Debugging?"}),(0,n.jsx)("br",{}),"\nThe command above will build a release binary for ",(0,n.jsx)(s.code,{children:"aptos-node"})," at: ",(0,n.jsx)(s.code,{children:"aptos-core/target/release/aptos-node"}),". The release\nbinaries tend to be substantially faster than debug binaries but lack debugging information useful for development.\nTo build a debug binary, omit the ",(0,n.jsx)(s.code,{children:"--release"})," flag from the command above."]})}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.h3,{id:e[7].id,children:e[7].value}),"\n",(0,n.jsx)(s.p,{children:"This section describes how to configure and run your PFN using Docker."}),"\n",(0,n.jsx)(h.U,{type:"warning",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Supported only on x86-64 CPUs"}),(0,n.jsx)("br",{}),"\nRunning aptos-core via Docker is currently only supported on x86-64 CPUs. If you have an Apple M1/M2 (ARM64) Mac, use\nthe aptos-core source code approach (above). If M1/M2 support is important to you, comment on this\nissue: ",(0,n.jsx)(s.a,{href:"https://github.com/aptos-labs/aptos-core/issues/1412",children:"https://github.com/aptos-labs/aptos-core/issues/1412"})]})}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsxs)(s.li,{children:["First, install ",(0,n.jsx)(s.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"}),"."]}),"\n",(0,n.jsxs)(s.li,{children:["Next, run the following script to prepare your local configuration and data directory for mainnet. This will\ndownload the ",(0,n.jsx)(s.code,{children:"fullnode.yaml"})," configuration file, the ",(0,n.jsx)(s.code,{children:"genesis.blob"})," and ",(0,n.jsx)(s.code,{children:"waypoint.txt"})," files for your PFN, and\ncreate a ",(0,n.jsx)(s.code,{children:"data"})," directory to store the blockchain database:"]}),"\n"]}),"\n",(0,n.jsx)(s.pre,{icon:a.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-filename":"Terminal","data-copy":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"mkdir"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" mainnet"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" && "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"cd"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" mainnet"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"mkdir"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" data"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" && "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"\\"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"curl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -O"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" https://raw.githubusercontent.com/aptos-labs/aptos-core/mainnet/docker/compose/aptos-node/fullnode.yaml"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" && "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"\\"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"curl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -O"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" https://raw.githubusercontent.com/aptos-labs/aptos-networks/main/mainnet/waypoint.txt"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" && "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"\\"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"curl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -O"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" https://raw.githubusercontent.com/aptos-labs/aptos-networks/main/mainnet/genesis.blob"})]})]})}),"\n",(0,n.jsx)(h.U,{type:"warning",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Don’t want to connect to mainnet?"}),(0,n.jsx)("br",{}),"\nTo connect to other networks (e.g., ",(0,n.jsx)(s.code,{children:"devnet"})," and ",(0,n.jsx)(s.code,{children:"testnet"}),"), you can find the genesis and waypoint here ➜ ",(0,n.jsx)(s.a,{href:"https://github.com/aptos-labs/aptos-networks",children:"https://github.com/aptos-labs/aptos-networks"}),".\nBe sure to download the ",(0,n.jsx)(s.code,{children:"genesis.blob"})," and ",(0,n.jsx)(s.code,{children:"waypoint.txt"})," for those networks, instead of using the genesis\nand waypoint pointed to by the ",(0,n.jsx)(s.code,{children:"curl"})," commands above."]})}),"\n",(0,n.jsxs)(s.ol,{start:"3",children:["\n",(0,n.jsxs)(s.li,{children:["Next, make sure that the ",(0,n.jsx)(s.code,{children:"fullnode.yaml"})," configuration file that you downloaded above contains only the following content.\nThis will ensure that this configuration is for a PFN and not for another node type (e.g., validator or VFN):"]}),"\n"]}),"\n",(0,n.jsx)(s.pre,{tabIndex:"0","data-language":"yaml","data-word-wrap":"","data-filename":"fullnode.yaml","data-copy":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"base"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"  role"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"full_node"'})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"  data_dir"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"/opt/aptos/data"'})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"  waypoint"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"    from_file"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"/opt/aptos/etc/waypoint.txt"'})]}),"\n",(0,n.jsx)(s.span,{children:" "}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"execution"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"  genesis_file_location"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"/opt/aptos/etc/genesis.blob"'})]}),"\n",(0,n.jsx)(s.span,{children:" "}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"full_node_networks"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"  - "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"network_id"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"public"'})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"    discovery_method"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"onchain"'})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"    listen_address"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"/ip4/0.0.0.0/tcp/6182"'})]}),"\n",(0,n.jsx)(s.span,{children:" "}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"api"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:":"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"  enabled"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"true"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#22863A","--shiki-dark":"#85E89D"},children:"  address"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:": "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"0.0.0.0:8080"'})]})]})}),"\n",(0,n.jsx)(h.U,{type:"warning",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Don’t want to allow inbound connections?"}),(0,n.jsx)("br",{}),"\nOverride the following if you do not want other PFNs connecting to yours: ",(0,n.jsx)(s.code,{children:'listen_address: "/ip4/127.0.0.1/tcp/6182"'}),". Also see the note, below."]})}),"\n",(0,n.jsxs)(s.ol,{start:"4",children:["\n",(0,n.jsxs)(s.li,{children:["Next, run the following ",(0,n.jsx)(s.code,{children:"docker"})," command:"]}),"\n"]}),"\n",(0,n.jsx)(s.pre,{icon:a.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-filename":"Terminal","data-copy":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"docker"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" run"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" --pull=always"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" \\"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"    --rm"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -p"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" 8080:8080"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" \\"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"    -p"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" 9101:9101"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -p"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" 6180:6180"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" \\"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"    -v"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"pwd"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:")"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:":/opt/aptos/etc"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -v"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"pwd"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:")"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"/data:/opt/aptos/data"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" \\"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"    --workdir"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" /opt/aptos/etc"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" \\"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"    --name=aptos-fullnode"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" aptoslabs/validator:mainnet"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" aptos-node"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" \\"})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"    -f"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" /opt/aptos/etc/fullnode.yaml"})]})]})}),"\n",(0,n.jsx)(h.U,{type:"warning",children:(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Sudo access"}),(0,n.jsx)("br",{}),"\nNote: you may need to prefix the docker command with ",(0,n.jsx)(s.code,{children:"sudo"})," depending on your configuration."]})}),"\n",(0,n.jsx)(h.U,{type:"info",children:(0,n.jsxs)(s.p,{children:["Docker tags\nThe ",(0,n.jsx)(s.code,{children:"mainnet"})," tag always refers to the latest official Docker image tag. You can find the latest hash for comparison at:\n",(0,n.jsx)(s.a,{href:"https://github.com/aptos-labs/aptos-networks/tree/main/mainnet",children:"https://github.com/aptos-labs/aptos-networks/tree/main/mainnet"})]})}),"\n",(0,n.jsx)(s.h2,{id:e[8].id,children:e[8].value}),"\n",(0,n.jsx)(s.h3,{id:e[9].id,children:e[9].value}),"\n",(0,n.jsxs)(s.p,{children:["During the initial synchronization of your PFN, there may be a lot of data to transfer (read more about how state\nsync works in the ",(0,n.jsx)(s.a,{href:"../configure/state-sync",children:"state sync"})," guide). You can monitor state sync progress\nby querying the metrics port to see what version your node is currently synced to. Run the following example\ncommand to see the currently synced version of your node:"]}),"\n",(0,n.jsx)(s.pre,{icon:a.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-filename":"Terminal","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"curl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" 127.0.0.1:9101/metrics"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" 2>"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" /dev/null"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" grep"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "aptos_state_sync_version{.*'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:'\\"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"synced"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:'\\"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'}"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" awk"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" '{print $2}'"})]})})}),"\n",(0,n.jsx)(s.p,{children:"The command will output the current synced version of your node. For example:"}),"\n",(0,n.jsx)(s.pre,{icon:a.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-filename":"Terminal","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"71000"})})})}),"\n",(0,n.jsxs)(s.p,{children:["Compare the synced version returned by this command (e.g., ",(0,n.jsx)(s.code,{children:"71000"}),") with the highest version shown on the\n",(0,n.jsx)(s.a,{href:"https://explorer.aptoslabs.com/?network=mainnet",children:"Aptos explorer page"}),". If your node is catching up to the highest\nversion, it is synchronizing correctly. It is fine if the explorer page differs by a few versions, as the explorer\nnodes may sync with some variance."]}),"\n",(0,n.jsxs)(h.U,{type:"warning",children:[(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Using fast sync?"}),(0,n.jsx)("br",{}),"\nIf your node is fast syncing, the command may show ",(0,n.jsx)(s.code,{children:"0"})," until it has finally caught up. To verify that the node is\nfast syncing, run the following command:"]}),(0,n.jsx)(s.pre,{icon:a.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-filename":"Terminal","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"curl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" 127.0.0.1:9101/metrics"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" 2>"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" /dev/null"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" grep"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "aptos_state_sync_version{.*'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:'\\"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"synced_states"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:'\\"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'}"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" awk"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" '{print $2}'"})]})})}),(0,n.jsxs)(s.p,{children:["This should show an increasing number of synced states. It may take several hours for your node to fast sync to the\nlatest version. Eventually, once fast syncing is complete, the ",(0,n.jsx)(s.code,{children:'aptos_state_sync_version{.*"synced"}'})," command will\nreturn the current synced version of your node."]}),(0,n.jsxs)(s.p,{children:["You can read more about fast syncing here: ",(0,n.jsx)(s.a,{href:"../configure/state-sync#bootstrapping-phase",children:"State sync bootstrapping"}),"."]})]}),"\n",(0,n.jsx)(s.h3,{id:e[10].id,children:e[10].value}),"\n",(0,n.jsxs)(s.p,{children:["If you wish, you can also check the outbound network connections for your PFN. The number of outbound network\nconnections should be more than ",(0,n.jsx)(s.code,{children:"0"})," for healthy PFNs. Run the following command:"]}),"\n",(0,n.jsx)(s.pre,{icon:a.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-filename":"Terminal","data-copy":"",children:(0,n.jsx)(s.code,{children:(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"curl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" 127.0.0.1:9101/metrics"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" 2>"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" /dev/null"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" grep"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "aptos_connections{direction='}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:'\\"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"outbound"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:'\\"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"'})]})})}),"\n",(0,n.jsx)(s.p,{children:"The above command will output the number of outbound network connections for your node. For example:"}),"\n",(0,n.jsx)(s.pre,{icon:a.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-filename":"Terminal","data-copy":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"curl"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" 127.0.0.1:9101/metrics"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" 2>"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" /dev/null"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" grep"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "aptos_connections{direction='}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:'\\"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"outbound"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:'\\"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"'})]}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"aptos_connections"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"{direction="}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:'"outbound"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:",network_id"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"="}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:'"Public"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:",peer_id"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"="}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:'"aabd651f"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:",role_type"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"="}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:'"full_node"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"}"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" 3"})]})]})}),"\n",(0,n.jsxs)(s.p,{children:["If the number of outbound connections returned is ",(0,n.jsx)(s.code,{children:"0"}),", then it means your node cannot connect to the Aptos blockchain. If this happens to you, follow these steps to resolve the issue:"]}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsxs)(s.li,{children:["Update your node to the latest release by following the ",(0,n.jsx)(s.a,{href:"modify/update-fullnode-with-new-releases",children:"Update Fullnode With New Releases"}),"."]}),"\n",(0,n.jsxs)(s.li,{children:["Remove any ",(0,n.jsx)(s.code,{children:"seed"})," peers you may have added to your configuration file. The seeds may be preventing you from\nconnecting to the network. Seed peers are discussed in the ",(0,n.jsx)(s.a,{href:"modify/fullnode-network-connections#connecting-your-fullnode-to-seed-peers",children:"Connecting your fullnode to seed peers"})," section."]}),"\n",(0,n.jsxs)(s.li,{children:["Ensure that you have used the correct ",(0,n.jsx)(s.code,{children:"genesis.blob"})," and ",(0,n.jsx)(s.code,{children:"waypoint.txt"})," files for your network. This is a common error."]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:e[11].id,children:e[11].value}),"\n",(0,n.jsx)(s.p,{children:"If you are running your PFN using Docker, you can monitor the size of the blockchain ledger by entering the Docker\ncontainer and checking the size. This will allow you to see how much storage the blockchain ledger is currently consuming."}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["First, run ",(0,n.jsx)(s.code,{children:"docker container ls"})," on your terminal and copy the NAME field output. This will be a string similar to ",(0,n.jsx)(s.code,{children:"public_full_node_fullnode_1"}),"."]}),"\n",(0,n.jsxs)(s.li,{children:["Next, run these commands to check the storage size consumed by the ledger, using the NAME field you copied over in place of ",(0,n.jsx)(s.code,{children:"public_full_node_fullnode_1"}),":"]}),"\n"]}),"\n",(0,n.jsx)(s.pre,{icon:a.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-filename":"Terminal","data-copy":"",children:(0,n.jsxs)(s.code,{children:[(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"# Obtain the container ID:"})}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"id"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"="}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"$("}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"docker"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" container"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" ls"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" grep"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" public_full_node_fullnode_1"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" |"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" grep"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -oE"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "^[0-9a-zA-Z]+"'}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:")"})]}),"\n",(0,n.jsx)(s.span,{children:" "}),"\n",(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"# Enter the container:"})}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"docker"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" exec"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -it"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $id "}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:"/bin/bash"})]}),"\n",(0,n.jsx)(s.span,{children:" "}),"\n",(0,n.jsx)(s.span,{children:(0,n.jsx)(s.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"# Observe the volume (ledger) size:"})}),"\n",(0,n.jsxs)(s.span,{children:[(0,n.jsx)(s.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"du"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -cs"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" -BM"}),(0,n.jsx)(s.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" /opt/aptos/data"})]})]})})]})},"/en/network/nodes/full-node/fullnode-source-code-or-docker",{filePath:"pages/en/network/nodes/full-node/fullnode-source-code-or-docker.mdx",timestamp:1728425436e3,pageMap:r.v,frontMatter:{title:"Run a PFN from Source or Docker"},title:"Run a PFN from Source or Docker"},"undefined"==typeof RemoteContent?d:RemoteContent.useTOC)},13844:function(i,e,s){"use strict";s.d(e,{U:function(){return a}});var n=s(31549),t=s(78364),r=s(83185);let l={default:"\uD83D\uDCA1",error:"\uD83D\uDEAB",info:(0,n.jsx)(r.AV,{className:"_mt-1"}),warning:"⚠️"},h={default:(0,t.Z)("_border-orange-100 _bg-orange-50 _text-orange-800 dark:_border-orange-400/30 dark:_bg-orange-400/20 dark:_text-orange-300"),error:(0,t.Z)("_border-red-200 _bg-red-100 _text-red-900 dark:_border-red-200/30 dark:_bg-red-900/30 dark:_text-red-200"),info:(0,t.Z)("_border-blue-200 _bg-blue-100 _text-blue-900 dark:_border-blue-200/30 dark:_bg-blue-900/30 dark:_text-blue-200"),warning:(0,t.Z)("_border-yellow-100 _bg-yellow-50 _text-yellow-900 dark:_border-yellow-200/30 dark:_bg-yellow-700/30 dark:_text-yellow-200")};function a({children:i,type:e="default",emoji:s=l[e]}){return(0,n.jsxs)("div",{className:(0,t.Z)("nextra-callout _overflow-x-auto _mt-6 _flex _rounded-lg _border _py-2 ltr:_pr-4 rtl:_pl-4","contrast-more:_border-current contrast-more:dark:_border-current",h[e]),children:[(0,n.jsx)("div",{className:"_select-none _text-xl ltr:_pl-3 ltr:_pr-2 rtl:_pr-3 rtl:_pl-2",style:{fontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'},children:s}),(0,n.jsx)("div",{className:"_w-full _min-w-0 _leading-7",children:i})]})}},82910:function(i,e,s){"use strict";s.d(e,{c:function(){return a}});var n=s(31549),t=s(74271),r=s(14553),l=s(55754),h=s(46977);function a(i,e,s,n){let r=globalThis[t.ud];return r.route=e,r.pageMap=s.pageMap,r.context[e]={Content:i,pageOpts:s,useTOC:n},d}function d({__nextra_pageMap:i=[],__nextra_dynamic_opts:e,...s}){let h=globalThis[t.ud],{Layout:a,themeConfig:d}=h,{route:c,locale:k}=(0,r.t)(),p=h.context[c];if(!p)throw Error(`No content found for the "${c}" route. Please report it as a bug.`);let{pageOpts:x,useTOC:u,Content:j}=p;if(c.startsWith("/["))x.pageMap=i;else for(let{route:e,children:s}of i){let i=e.split("/").slice(k?2:1);(function i(e,[s,...n]){for(let t of e)if("children"in t&&s===t.name)return n.length?i(t.children,n):t})(x.pageMap,i).children=s}if(e){let{title:i,frontMatter:s}=e;x={...x,title:i,frontMatter:s}}return(0,n.jsx)(a,{themeConfig:d,pageOpts:x,pageProps:s,children:(0,n.jsx)(l.F,{value:s,children:(0,n.jsx)(o,{useTOC:u,children:(0,n.jsx)(j,{...s})})})})}function o({children:i,useTOC:e}){let{wrapper:s}=(0,h.a)();return(0,n.jsx)(c,{useTOC:e,wrapper:s,children:i})}function c({children:i,useTOC:e,wrapper:s,...t}){let r=e(t);return s?(0,n.jsx)(s,{toc:r,children:i}):i}}},function(i){i.O(0,[68889,1117,92888,49774,40179],function(){return i(i.s=23525)}),_N_E=i.O()}]);