> For the complete documentation index, see [llms.txt](https://docs.endless.link/endless/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.endless.link/endless/devbuild/nodes/run-a-public-fullnode/deploy-a-pfn/using-docker.md).

# Using Docker

## Deploy a PFN using Docker

This section describes how to configure and run your PFN using Docker.

{% hint style="info" %}
Supported only on x86-64 CPUs Running endless-core via Docker is currently only supported on x86-64 CPUs.
{% endhint %}

Ensure Docker Cli and service are available. If not, install [Docker](https://docs.docker.com/get-docker/)

Next, the user chooses whether to run the Docker container with the default configuration or a customized configuration.

### Default configuration

The default configurations:

* `endless-node` program is located at `/usr/local/bin/`
* The working directory is located under `/opt/endless/`
  * The data directory stores synchronization `/opt/endless/data`
  * The genesis and waypoint files are located in the `/opt/endless/genesis` directory
  * The P2P synchronization port is set to `0.0.0.0:6182`
  * The GRPC stream service is disabled by default.

### Customized Configuration

If the user wishes to run with a customized configuration, the following steps are required:

We presume user construct the following directory: base\_dir, eg. /opt/endless/

```
base_dir/
        |- fullnode.yaml
        |- data/
        |- mainnet/
                  |- genesis.blob, waypoint.txt 
```

1. User select run the following script to prepare your local configuration and data directory for mainnet. This will download the `fullnode.yaml` configuration file, the `genesis.blob` and `waypoint.txt` files for your PFN, and create a `data` directory to store the blockchain database:

```bash
mkdir -p /opt/endless/mainnet && mkdir -p /opt/endless/data
cd /opt/endless/mainnet && \
curl -o /opt/endless/mainnet/waypoint.txt https://raw.githubusercontent.com/endless-labs/endless-release/main/endless-networks/mainnet/genesis_waypoint.txt && \
curl -o /opt/endless/mainnet/genesis.blob https://raw.githubusercontent.com/endless-labs/endless-release/main/endless-networks/mainnet/genesis.blob
```

{% hint style="info" %}
Don't want to connect to mainnet? To connect to other networks (e.g., `testnet`), you can find the genesis and waypoint here ➜ <https://github.com/endless-labs/endless-networks>. Be sure to download the `genesis.blob` and `waypoint.txt` for those networks, instead of using the genesis and waypoint pointed to by the `curl` commands above.
{% endhint %}

2. Create `fullnode.yaml` configuration file, please refer [Sample Configuration of PFN](/endless/devbuild/nodes/run-a-public-fullnode/deploy-a-pfn/using-precompiled-binary.md#sample-configuration-of-pfn):

Your `fullnode.yaml` should look like the following:

```yaml
base:
  role: "full_node"
  data_dir: "/opt/endless/data"
  waypoint:
    from_file: "/opt/endless/mainnet/waypoint.txt"

execution:
  genesis_file_location: "/opt/endless/mainnet/genesis.blob"

full_node_networks:
   - network_id: public
      seed_addrs:
         0x415ef8d74118495935e60961806f24a8b502072378c73bdd87661d41a486ce1b:
         - /dns/chain-r-1.endless.link/tcp/6182/noise-ik/0x415ef8d74118495935e60961806f24a8b502072378c73bdd87661d41a486ce1b/handshake/0
         0xd8025b203853e3253393c80d8e81184983a4a00dfc23b432112e72ce1f827d69:
         - /dns/chain-r-2.endless.link/tcp/6182/noise-ik/0xd8025b203853e3253393c80d8e81184983a4a00dfc23b432112e72ce1f827d69/handshake/0
         0x52d09187b0bcc2e24f5aea940910ac42a645c231e6c0c9eebc65676350f1e94e:
         - /dns/chain-r-3.endless.link/tcp/6182/noise-ik/0x52d09187b0bcc2e24f5aea940910ac42a645c231e6c0c9eebc65676350f1e94e/handshake/0
         0x40cc7d84ecaf0b4afd364d7d5bb260aa71f31812c4c8f46be6fd68cccaba1d49:
         - /dns/chain-r-4.endless.link/tcp/6182/noise-ik/0x40cc7d84ecaf0b4afd364d7d5bb260aa71f31812c4c8f46be6fd68cccaba1d49/handshake/0
         0x2f9aac167b64843718a362bb2e4188b031ffcec500e80fd17582cde9437ffb07:
         - /dns/chain-r-5.endless.link/tcp/6182/noise-ik/0x2f9aac167b64843718a362bb2e4188b031ffcec500e80fd17582cde9437ffb07/handshake/0
      listen_address: /ip4/0.0.0.0/tcp/6182

api:
  enabled: true
  address: "0.0.0.0:8080"
```

3. Run the following `docker` command:

```bash
docker run --pull=always \
    --rm -p 8080:8080 \
    -p 9101:9101 -p 6180:6180 \
    -v $(pwd):/opt/endless \
    -v $(pwd)/data:/opt/endless/data \
    --workdir /opt/endless \
    --name=endless-fullnode endlesslab/endless-node:latest
```

You have now successfully configured and started running a PFN in the Endless mainnet.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.endless.link/endless/devbuild/nodes/run-a-public-fullnode/deploy-a-pfn/using-docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
